ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Java in JDK but ANT can't find it!
Date Tue, 19 May 2009 11:06:42 GMT
David Nemer wrote:
> Hey Guys, thank you all for your help, I'm answering the questions from
> Ashley, Steve and Kevin, some answers are huge due to the compilation
> message ANT provides. Just a reminder, I'm running ANT in a Linux Server, my
> overall goal is to download a version from a repository, build the version,
> and report to a mySql database whether it built or not, if not, mention the
> reason. All that in JAVA.
> 
> *1. Ashley, I'm running my stuff in a Linux server*
> *
> 2. Steve: is this a package-manager installation of Ant?*
> I'm not sure. I just downloaded the bin files from the Ant webpage and
> installed it.


That's a no then.

> 


> java.runtime.name : Java(TM) SE Runtime Environment
> sun.boot.library.path : /opt/jdk1.6.0_06/jre/lib/amd64

OK, the JVM

FWIW, I have JAVA_HOME on an x86_64 box set to
/usr/java/jdk

which is then a symlink to the JVM version I want to use -currently 
JRockit.

> java.vm.version : 10.0-b22
> ant.library.dir : /home/nemer/apache-ant-1.7.1/lib
> java.vm.vendor : Sun Microsystems Inc.
> java.vendor.url : http://java.sun.com/
> path.separator : :
> java.vm.name : Java HotSpot(TM) 64-Bit Server VM
> file.encoding.pkg : sun.io
> user.country : US
> sun.java.launcher : SUN_STANDARD
> sun.os.patch.level : unknown
> java.vm.specification.name : Java Virtual Machine Specification
> user.dir : /home/nemer
> java.runtime.version : 1.6.0_06-b02
> java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment
> java.endorsed.dirs : /opt/jdk1.6.0_06/jre/lib/endorsed
> os.arch : amd64
> java.io.tmpdir : /tmp
> line.separator :
> 
> java.vm.specification.vendor : Sun Microsystems Inc.
> os.name : Linux
> ant.home : /home/nemer/apache-ant-1.7.1
> sun.jnu.encoding : UTF-8
> java.library.path :
> /opt/jdk1.6.0_06/jre/lib/amd64/server:/opt/jdk1.6.0_06/jre/lib/amd64:/opt/jdk1.6.0_06/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib
> java.specification.name : Java Platform API Specification
> java.class.version : 50.0
> sun.management.compiler : HotSpot 64-Bit Server Compiler
> os.version : 2.6.18-6-amd64
> user.home : /home/nemer
> user.timezone : Europe/Berlin
> java.awt.printerjob : sun.print.PSPrinterJob
> file.encoding : UTF-8
> java.specification.version : 1.6
> user.name : nemer
> java.class.path :
> /home/nemer/apache-ant-1.7.1/lib/ant-launcher.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar:/home/nemer/apache-ant-1.7.1/lib/ant-jai.jar:/home/nemer/apache-ant-1.7.1/lib/ant-jdepend.jar:/home/nemer/apache-ant-1.7.1/lib/ant-nodeps.jar:/home/nemer/apache-ant-1.7.1/lib/ant-testutil.jar:/home/nemer/apache-ant-1.7.1/lib/ant-apache-bsf.jar:/home/nemer/apache-ant-1.7.1/lib/ant-jsch.jar:/home/nemer/apache-ant-1.7.1/lib/ant-apache-regexp.jar:/home/nemer/apache-ant-1.7.1/lib/ant-swing.jar:/home/nemer/apache-ant-1.7.1/lib/ant-commons-net.jar:/home/nemer/apache-ant-1.7.1/lib/ant-apache-bcel.jar:/home/nemer/apache-ant-1.7.1/lib/xercesImpl.jar:/home/nemer/apache-ant-1.7.1/lib/ant-apache-oro.jar:/home/nemer/apache-ant-1.7.1/lib/ant-starteam.jar:/home/nemer/apache-ant-1.7.1/lib/ant-commons-logging.jar:/home/nemer/apache-ant-1.7.1/lib/ant-weblogic.jar:/home/nemer/apache-ant-1.7.1/lib/ant-stylebook.jar:/home/nemer/apache-ant-1.7.1/lib/ant-apache-log4j.jar:/home/nemer/a
pache-ant-1.7.1/lib/xml-apis.jar:/home/nemer/apache-ant-1.7.1/lib/ant-junit.jar:/home/nemer/apache-ant-1.7.1/lib/ant-apache-resolver.jar:/home/nemer/apache-ant-1.7.1/lib/ant-antlr.jar:/home/nemer/apache-ant-1.7.1/lib/ant.jar:/home/nemer/apache-ant-1.7.1/lib/ant-javamail.jar:/home/nemer/apache-ant-1.7.1/lib/ant-launcher.jar:/home/nemer/apache-ant-1.7.1/lib/ant-jmf.jar:/home/nemer/apache-ant-1.7.1/lib/ant-trax.jar:/home/nemer/apache-ant-1.7.1/lib/ant-netrexx.jar:/opt/jdk1.6.0_06/lib/tools.jar

so there's tools.jar on the CP

> java.vm.specification.version : 1.0
> sun.arch.data.model : 64
> java.home : /opt/jdk1.6.0_06/jre

But here java.home has been forced into the jre.


> java.specification.vendor : Sun Microsystems Inc.
> user.language : en
> java.vm.info : mixed mode
> java.version : 1.6.0_06
> java.ext.dirs : /opt/jdk1.6.0_06/jre/lib/ext:/usr/java/packages/lib/ext
> sun.boot.class.path :
> /opt/jdk1.6.0_06/jre/lib/resources.jar:/opt/jdk1.6.0_06/jre/lib/rt.jar:/opt/jdk1.6.0_06/jre/lib/sunrsasign.jar:/opt/jdk1.6.0_06/jre/lib/jsse.jar:/opt/jdk1.6.0_06/jre/lib/jce.jar:/opt/jdk1.6.0_06/jre/lib/charsets.jar:/opt/jdk1.6.0_06/jre/classes
> java.vendor : Sun Microsystems Inc.
> file.separator : /
> java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
> sun.cpu.endian : little
> sun.io.unicode.encoding : UnicodeLittle
> sun.cpu.isalist :


I'm confused here, and had a look at my settings to see what's up

-------------------------------------------
  System properties
-------------------------------------------
java.vm.vendor.url.bug : http://support.bea.com
java.runtime.name : Java(TM) SE Runtime Environment
sun.boot.library.path : /usr/java/jrockit-1.6.0_02/jre/lib/amd64
java.vm.version : R27.4.0-90-89592-1.6.0_02-20070928-1715-linux-x86_64
ant.library.dir : /home/slo/Java/Apache/ant/lib
java.vm.vendor : BEA Systems, Inc.
java.vendor.url : http://www.bea.com/
path.separator : :
java.vm.name : BEA JRockit(R)
file.encoding.pkg : sun.io
user.country : GB
sun.java.launcher : SUN_STANDARD
sun.os.patch.level : unknown
java.vm.vendor.url : http://www.bea.com/
java.vm.specification.name : Java Virtual Machine Specification
user.dir : /usr/java/jrockit-1.6.0_02
java.runtime.version : 1.6.0_02-b05
java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment
java.endorsed.dirs : /usr/java/jrockit-1.6.0_02/jre/lib/endorsed
os.arch : amd64
java.io.tmpdir : /tmp
line.separator :

java.vm.specification.vendor : Sun Microsystems Inc.
https.proxyHost : web-proxy
os.name : Linux
ant.home : /home/slo/Java/Apache/ant
sun.jnu.encoding : UTF-8
java.library.path : 
/usr/java/jrockit-1.6.0_02/jre/lib/amd64/jrockit:/usr/java/jrockit-1.6.0_02/jre/lib/amd64:/usr/java/jrockit-1.6.0_02/jre/../lib/amd64
http.proxyPort : 8088
java.specification.name : Java Platform API Specification
java.class.version : 50.0
sun.management.compiler : BEA JRockit(R) Optimizing Compiler
os.version : 2.6.27-14-generic
user.home : /home/slo
user.timezone : GB
java.awt.printerjob : sun.print.PSPrinterJob
java.specification.version : 1.6
file.encoding : UTF-8
user.name : slo
java.class.path : (all the ant stuff and then) 
:/usr/java/jrockit-1.6.0_02/lib/tools.jar
java.vm.specification.version : 1.0
sun.arch.data.model : 64
java.home : /usr/java/jrockit-1.6.0_02/jre
java.specification.vendor : Sun Microsystems Inc.
user.language : en
java.vm.info : compiled mode
java.version : 1.6.0_02
java.ext.dirs : /usr/java/jrockit-1.6.0_02/jre/lib/ext
sun.boot.class.path : 
/usr/java/jrockit-1.6.0_02/jre/lib/amd64/jrockit/jrockit1.6.0.jar:/usr/java/jrockit-1.6.0_02/jre/lib/amd64/jrockit/jmapi.jar:/usr/java/jrockit-1.6.0_02/jre/lib/amd64/jrockit/jmxmapi.jar:/usr/java/jrockit-1.6.0_02/jre/lib/amd64/jrockit/rmp.jar:/usr/java/jrockit-1.6.0_02/jre/lib/amd64/jrockit/latency.jar:/usr/java/jrockit-1.6.0_02/jre/lib/resources.jar:/usr/java/jrockit-1.6.0_02/jre/lib/rt.jar:/usr/java/jrockit-1.6.0_02/jre/lib/sunrsasign.jar:/usr/java/jrockit-1.6.0_02/jre/lib/jsse.jar:/usr/java/jrockit-1.6.0_02/jre/lib/jce.jar:/usr/java/jrockit-1.6.0_02/jre/lib/charsets.jar:/usr/java/jrockit-1.6.0_02/jre/classes
http.proxyHost : web-proxy
java.vendor : BEA Systems, Inc.
file.separator : /
java.vendor.url.bug : http://support.bea.com
sun.cpu.endian : little
sun.io.unicode.encoding : UnicodeLittle
https.proxyPort : 8088
sun.desktop : gnome
sun.cpu.isalist :

So, its the same java.home behaviour as yours: we get the JRE under the 
JDK. And yet javac works

Looking at javac
 > ls -l `which javac`
lrwxrwxrwx 1 root root 23 2007-11-06 10:14 /usr/bin/javac -> 
/etc/alternatives/javac
 > ls -l  /etc/alternatives/javac
lrwxrwxrwx 1 root root 23 2008-12-09 17:20 /etc/alternatives/javac -> 
/usr/java/jdk/bin/javac

So, it points to the one under JAVA_HOME.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message