0

What version of the scala library jar will support java 1.5 and 1.6

And also how to compile in java?

1
  • I don't understand the question. Commented Feb 3, 2011 at 16:59

2 Answers 2

2

Scala's jar files are compiled with JVM 1.5, as can be seen by looking into the META-INF/MANIFEST.MF file. Here is 2.8.1: Created-By: 1.5.0_22-b03 (Sun Microsystems Inc.).

The Scala compiler generates output that is compatible with jvm-5 (see scalac -target). Also, it has some magic to enable use with jdk 1.6, in which String has added a method that Scala defines on WrappedString.

Sign up to request clarification or add additional context in comments.

2 Comments

RichString is now StringOps/WrappedString/StringLike in 2.8.1 or? (Someone corrected me on that last week)
@oluies It is. What can I say? I'm an old hand in Scala. ;-)
1

Scala is compiled with the scalac compiler and not javac. To run the Scala code you need Java runtime/sdk version 1.5 or later and the scala library jar.

Version 2.7.7 and 2.8.1 are the common versions used today. If you start a new project now you should aim for 2.8.1 or 2.9 (which is going to be available soon-ish). Download site is here

See the FAQ

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.