JasonEric / openjdk-osx-build

Automatically exported from code.google.com/p/openjdk-osx-build
0 stars 0 forks source link

New drag and drop install for universal build is broken. #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download OpenJDK-OSX-1.7-universal-20110920.dmg
2. Drag 1.7.0.jdk to folder as instructed
3. Set JAVA_HOME and PATH to that jdk
4. Try to build a java project.

I'm trying to build jruby but ant doesn't work with the latest build of 
universal.

$ ant
Unable to locate tools.jar. Expected to find it in 
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Hom
e/lib/tools.jar
Buildfile: /Users/samuelkadolph/Projects/JRuby/jruby/build.xml

init:

prepare-bin-jruby:

jar:

init:

create-dirs:
    [mkdir] Created dir: /Users/samuelkadolph/Projects/JRuby/jruby/build
    [mkdir] Created dir: /Users/samuelkadolph/Projects/JRuby/jruby/build/classes
    [mkdir] Created dir: /Users/samuelkadolph/Projects/JRuby/jruby/build/classes/jruby
    [mkdir] Created dir: /Users/samuelkadolph/Projects/JRuby/jruby/build/classes/test
    [mkdir] Created dir: /Users/samuelkadolph/Projects/JRuby/jruby/build/test-results
    [mkdir] Created dir: /Users/samuelkadolph/Projects/JRuby/jruby/build/test-results/html
    [mkdir] Created dir: /Users/samuelkadolph/Projects/JRuby/jruby/docs/api

copy-resources:
     [copy] Copying 6 files to /Users/samuelkadolph/Projects/JRuby/jruby/build/classes/jruby
     [copy] Copying 14 files to /Users/samuelkadolph/Projects/JRuby/jruby/build/classes/jruby/builtin

extract-rdocs:

update-constants:
     [echo] Updating Constants.java
     [echo] ...using git revision = f71d633, tzdata = 2010k
     [copy] Warning: Could not find file /Users/samuelkadolph/Projects/JRuby/jruby/src_gen/org/jruby/runtime/Constants.java to copy.
     [copy] Copying 1 file to /Users/samuelkadolph/Projects/JRuby/jruby/src_gen/org/jruby/runtime

_uc_internal_:
     [copy] Copying 1 file to /Users/samuelkadolph/Projects/JRuby/jruby/src_gen/org/jruby/runtime

BUILD FAILED
/Users/samuelkadolph/Projects/JRuby/jruby/build.xml:696: The following error 
occurred while executing this line:
/Users/samuelkadolph/Projects/JRuby/jruby/build.xml:248: The following error 
occurred while executing this line:
/Users/samuelkadolph/Projects/JRuby/jruby/build.xml:240: The following error 
occurred while executing this line:
/Users/samuelkadolph/Projects/JRuby/jruby/build.xml:256: Unable to find a javac 
compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to 
"/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Ho
me"

Total time: 1 second

Original issue reported on code.google.com by sam...@kadolph.com on 22 Sep 2011 at 2:17

GoogleCodeExporter commented 8 years ago
A bit more information from me, one of the JRuby guys...

This definitely looks like some sort of mismatch between the new builds and 
ant. Ant will try to determine the proper location of tools.jar based on 
JAVA_HOME and other env stuff. This worked fine in previous builds that had a 
pkg installer, but the new builds seem to be confusing ant into trying to stick 
the weird JRE path on the end of the JDK path.

If our theory is right, this should break any ant build, not just JRuby. We 
don't do anything special in our build script.

Original comment by head...@headius.com on 22 Sep 2011 at 2:22

GoogleCodeExporter commented 8 years ago
Sorry, I didn't figure this ticket before.

I tried also 

{{{
ant
Unable to locate tools.jar. Expected to find it in 
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Hom
e/lib/tools.jar
}}}

Ant like Maven are puzzled by the the new 1.7.0.jre subdir added by Mike at the 
same time we change our deployment procedure.

I'll try a fix on package side until macosx-port fix that. 

Original comment by henri.gomez on 30 Sep 2011 at 10:12

GoogleCodeExporter commented 8 years ago
Issue 23 has been merged into this issue.

Original comment by henri.gomez on 30 Sep 2011 at 10:27

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
On Apple 1.6.x JVM javac is found under JAVA_HOME/Contents/Classes/classes.jar

For OpenJDK it's now here JAVA_HOME/lib/tools.jar (both for OS/X and Linux)

As a tempory fix (while discussing with OpenJDK team),  I'll add the following 
in package process :

ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/lib/tools.jar 
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Hom
e/lib/tools.jar

May be a problem in Ant or JRE_HOME/JAVA_HOME.

Original comment by henri.gomez on 30 Sep 2011 at 12:20

GoogleCodeExporter commented 8 years ago
Added a symlink between lib/tools.jar and jre/lib/tools.jar in 
OpenJDK-OSX-1.7-universal-b210-20110930.dmg to temporary fix this issue. 

JIRA ticket to macosxport to be created

Original comment by henri.gomez on 30 Sep 2011 at 1:50

GoogleCodeExporter commented 8 years ago
http://java.net/jira/browse/MACOSX_PORT-483

Original comment by henri.gomez on 30 Sep 2011 at 2:17

GoogleCodeExporter commented 8 years ago
Fixed by dual bundle mode available since 20111004 release

Original comment by henri.gomez on 4 Oct 2011 at 9:10