Bug 751

Summary: build fails on OS X due to wrong classes.jar path
Product: [JogAmp] Gluegen Reporter: Ricardo Fabbri <rfabbri>
Component: openglAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: ---    
Version: 2   
Hardware: pc_x86_64   
OS: macosx   
Type: --- SCM Refs:
gluegen eabc810f2ed3b1680ac101e828348d49ee939e1d
Workaround: ---

Description Ricardo Fabbri 2013-06-11 10:58:57 CEST
Hi 
when compiling this on OS X 10.8.3 I get an error 

===================================================
rfabbri@Ricardos-MacBook-Pro:~/src/gluegen/make$ ant
Buildfile: /Users/rfabbri/src/gluegen/make/build.xml

jogamp.env.validation:
     [echo] ant.version                Apache Ant(TM) version 1.8.4 compiled on September 18 2012
     [echo] ant.java.version           1.6
     [echo] java.version               1.6.0_37
     [echo] java.home                  /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home
     [echo] jvmJava.exe                /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Home/bin/java
     [echo] jvmJava7.exe               ${jvmJava7.exe}

jogamp.env.init:
     [echo] jogamp.version             2.0.2-rc-20130611
     [echo] jogamp.version.int         0914012
     [echo] junit.is.disabled          ${junit.is.disabled}
     [echo] target.user.set            ${target.user.set}
     [echo] target.sourcelevel         1.6
     [echo] target.targetlevel         1.6
     [echo] target.rt.jar              ${target.rt.jar}

BUILD FAILED
/Users/rfabbri/src/gluegen/make/jogamp-env.xml:181: No target.rt.jar specified not found.

Total time: 0 seconds
===================================================================

I was able to fix this by editing jogamp-env.xml and putting /Library/Java/JavaVirtualMachines/1.6.0_37-b06-434.jdk/Contents/Classes/classes.jar in the path for target.rt.jar and host.rt.jar
instead of the wrong path /System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar


Best,
Ricardo.
Comment 1 Sven Gothel 2013-06-13 20:41:05 CEST
OSX Java-6: Derive host/target-rt jar file from 'java.home'.

-               value="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar">
-               <available file="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar"/>
+               value="${java.home}/../Classes/classes.jar">
+               <available file="${java.home}/../Classes/classes.jar"/>