On Tue, May 25, 2010 at 4:57 PM, Miles Sabin <
mi...@milessabin.com> wrote:
> On Tue, May 25, 2010 at 1:38 PM, Alexey Romanov
> <
alexey.v...@gmail.com> wrote:
>> Running File > Export > JAR File on a Scala project does produce
>> a .jar file, but it doesn't include scala-library.jar. So when I try
>> to reference this file in a Java project, I get this error:
>>
>>> The type scala.ScalaObject cannot be resolved. It is indirectly referenced from required .class files
>>
>> File > Export > Runnable JAR File lets the user include required
>> libraries into the .jar, but you need to select a Java application to
>> launch, which my project (a Scala library) doesn't have.
>>
>> So it would be quite nice if there was a simple way to create a .jar
>> which includes the Scala Library. Or maybe there already is, and I
>> missed it?
>
> Interesting.
>
> I can see that there could be uses for creating a runnable jar file
> which included the Scala runtime (or a minimal subset of it).
>
> But I'm not convinced that it makes sense to do this for a library
> which is itself intended to be linked to an application: suppose you
> had two or more of these, all linked into a single app ... you'd end
> up with multiple copies of the Scala runtime (possibly different
> versions) on the classpath ... not a good thing.
We still need to solve this for Scala applications. It seems easiest