Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
Just a remark, when I run the application and /opt/jdk1.6.0_06/lib/tools.jar to the classpath. It gives me a different error message: "Compile failed; see the compiler error output for details." there is no error msg and it still says BUILD SUCCESSFUL -- David Nemer Sent from Kaiserslautern, RP,

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
Hello Michael, here is my code on how I'm invoking Ant: Project p = new Project(); p.setUserProperty("ant.file", buildFile.getAbsolutePath()); DefaultLogger consoleLogger = new DefaultLogger(); consoleLogger.setErrorPrintStream(System.err);

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread Michael Ludwig
David Nemer schrieb am 16.05.2009 um 20:51:31 (+0200): > ne...@kubrick:~$ java -jar /home/nemer/apache-ant-1.7.1/lib/ant-launcher.jar > -version > Apache Ant version 1.7.1 compiled on June 27 2008 > > ne...@kubrick:~$ /opt/jdk1.6.0_06/bin/java -jar > /home/nemer/apache-ant-1.7.1/lib/ant-launcher.

Re: API for setting a property reference?

2009-05-16 Thread Michael Ludwig
Matt Benson schrieb am 16.05.2009 um 11:25:06 (-0700): > > The special treatment of the "antlib:" namespace URI scheme laid > > out in the manual is similar to such auto-lookup, but requires > > additional configuration. I guess that's what you were pointing > > me to? http://ant.apache.org/manua

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
Hello Michael, I undid that change into JavaEnvUtils.java. I executed the commands you said, and here is the outcome: ne...@kubrick:~$ java -jar /home/nemer/apache-ant-1.7.1/lib/ant-launcher.jar -version Apache Ant version 1.7.1 compiled on June 27 2008 ne...@kubrick:~$ /opt/jdk1.6.0_06/bin/jav

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread Michael Ludwig
David Nemer schrieb am 16.05.2009 um 18:52:34 (+0200): > So here's what I did... I modified the source file JavaEnvUtils.java > from ANT (ant.jar), I changed the line #47: > > private static final String JAVA_HOME = System.getProperty("java.home"); > to: private static final String JAVA_HOME = Sy

Re: API for setting a property reference?

2009-05-16 Thread Matt Benson
--- On Sat, 5/16/09, Michael Ludwig wrote: > From: Michael Ludwig > Subject: Re: API for setting a property reference? > To: "Ant Users List" > Date: Saturday, May 16, 2009, 12:36 PM > Matt Benson schrieb am 14.05.2009 um > 18:57:09 (-0700): > > > > Read the whole section about antlibs in t

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
I found this on a Forum online: "Does the javac task in your buildfile have fork="yes"? If not, then it doesn't matter what the java.home property is set to; ant will attempt to call the javac Main method in the same java process, which from your error is a JRE, not a JDK. *EDIT* Try setting the

Re: API for setting a property reference?

2009-05-16 Thread Michael Ludwig
Matt Benson schrieb am 14.05.2009 um 18:57:09 (-0700): > > Read the whole section about antlibs in the Ant manual under "Concepts > and Types." Thanks, Matt. Not sure how exactly that answers my question, which was: > > Is there some auto-lookup feature for classes that attempts dynamic > > clas

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
Hello Everyone, So here's what I did... I modified the source file JavaEnvUtils.java from ANT (ant.jar), I changed the line #47: private static final String JAVA_HOME = System.getProperty("java.home"); to: private static final String JAVA_HOME = System.getenv("JAVA_HOME"); I compiled everything

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
Hello Ashley, So I ran the code you suggested and System.out.println("JAVA_HOME: " + System.getenv("JAVA_HOME")); System.out.println("PATH: " + System.getenv("JAVA_HOME")); Prints the right path to the JDK. So, would you suggest me to go into the ANT CompilerAdapterFactory.java source file

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread Ashley Williams
Try adding these lines to the start of main(): System.out.println("java.home: " + System.getProperty("java.home")); System.out.println("JAVA_HOME: " + System.getenv("JAVA_HOME")); System.out.println("PATH: " + System.getenv("JAVA_HOME")); Ant will print out the error message if it can't fin

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
Hello Martin, The vars are all set up right. And it is "not" an ANT problem. The problem is that the "java.home" points to JAVA_HOME/jre , if I ever call this method "System.getProperty("java.home");" it will return to me JAVA_HOME/jre (/opt/jdk1.6.0_06/jre in my case). And all we want is the pure

RE: Java in JDK but ANT can't find it!

2009-05-16 Thread Martin Gainty
Herr Nemer you would'nt be able to run ANT if your JAVA environment vars was fouled up JRE_HOME points to JRE folder (which contains only java.exe) JDK_HOME points to location of BASE FOLDER of javac.exe PATH=%JDK_HOME%/bin Mit Freundliche Gruben Martin GMT+5 das Amerika ___

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread David Nemer
Hello Supareno, I running it using the command line (running in a linux-server ). And ant is also running properly. Cheers, -- David Nemer On Sat, May 16, 2009 at 12:51 PM, supareno wrote: > David , > > are you using an IDE to run this simple code or are you using the command > line? > is the

Re: Java in JDK but ANT can't find it!

2009-05-16 Thread supareno
David , are you using an IDE to run this simple code or are you using the command line? is the 'ant' command line tool is working properly in a terminal? supareno Hey all, Well, I did some testing, and I tried to run this simples Java code: public static void main(String args[]){