Compilation Failure #226

Closed
byronclark opened this Issue Mar 25, 2012 · 6 comments

Comments

Projects
None yet
3 participants

I'm getting some compile errors with revision 34871c6: https://gist.github.com/ff1d3a95ba3157a86edd
Revision 296dde2 builds without problems.

I'm using OpenJDK7:
java version "1.7.0_03-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.1) (ArchLinux build 7.b147_2.1-3-x86_64)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

Owner

aemoncannon commented Mar 25, 2012

Hey Byron,

Hmm looks like com.sun.jdi is not universally available.. I'll need to look
into this..

On Sat, Mar 24, 2012 at 10:54 PM, byronclark <
reply@reply.github.com

wrote:

I'm getting some compile errors with revision 34871c6:
https://gist.github.com/ff1d3a95ba3157a86edd
Revision 296dde2 builds without problems.

I'm using OpenJDK7:
java version "1.7.0_03-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.1) (ArchLinux build
7.b147_2.1-3-x86_64)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)


Reply to this email directly or view it on GitHub:
aemoncannon#226

Hi.

I got the same error. I'm using Sun JDK 1.7.0_03.

Seems the jdi package is located in the tools.jar inside the JAVA_HOME/lib folder.

You probably have to make sure to add that into the (boot) classpath.

Yes, this makes it work for me:

dependencyClasspath in Compile += file("/usr/java/jdk1.7.0_03/lib/tools.jar")

Of course, you would have to make that generic.

Owner

aemoncannon commented Apr 18, 2012

Great. Thanks for posting the workaround. It looks like this is included in classpath automatically on OSX, but not on other platforms. I'll use JAVA_HOME to reference.

Owner

aemoncannon commented Apr 21, 2012

Ok - This should be resolved on latest. (works for me now on OSX and Ubuntu) .

Owner

aemoncannon commented Apr 21, 2012

Thanks!

Unfortunately, this does not work reliably.

For one, tools.jar is only included in the JDK, a JRE is not sufficient.

Then, {java.home} is set to the home of the JRE, but the JRE doesn't have to be located inside the JDK home.

E.g. on Windows, {java.home} is "C:\Program Files\java\jre7". The path "C:\Program Files\java\jre7..\lib" just doesn't exist.

Maybe it would be possible to determine the JDK home? Using the location of javac perhaps? Or JAVA_HOME env var?

Or just error out early when tools.jar was not found?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment