Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath

 
Amali Prem
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

can someone clarify me this? i have set my environment variables as below:

CLASSPATH :C:\Program Files\Java\JDK 1.4
JAVA_HOME :C:\Program Files\Java\JDK 1.4\bin

and now when i give the command ant -verbose, i get something like below :

Detected Java version: 1.5 in: C:\Program Files\Java\jre1.5.0_11

Why does it take 1.5? Can someone explain?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is still strange. Where did you get these environment variables from ? And where did you launch ant from ?
[ December 27, 2007: Message edited by: Christophe Verre ]
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Amali Prem
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am running ant from command line. what property should i set so that the ant compilation happens in 1.4?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure you didn't put a custom ant.bat somewhere in your PATH. By the way, did you edit Ant's ant.bat, in Ant's installation bin directory ? (you don't have to)

JAVA_HOME :C:\Program Files\Java\JDK 1.4\bin

Did you get that on the command line too ? Try "echo %JAVA_HOME%".
 
Amali Prem
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didnt modify ant.bat and when i give echo %JAVA_HOME% also i get only this C:\Program Files\Java\JDK 1.4\bin

The ant i am using came in as an add in with Netbeans IDE 5.5. should i check for any other property?
 
krishnamoorthy kitcha
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Did you install any java webtracks like java java runtime environment like jre1.5 or jre1.6 ?

If it is check and replace the path , because you should set path beginning itself .

check and tell me your feedback
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The version of Java used to run Ant is not dependent on the CLASSPATH. It's determined by the PATH. Which is why I posted the earlier command example.

Note that you can use a Java 1.5 compiler to compile 1.4 code. Just use the "source" attribute on the javac task (that is: source="1.4")
 
Amali Prem
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i give echo %path% i get something as below
C:\WINDOWS\system32;C:\WINDOWS;
C:\WINDOWS\System32\Wbem;C:\Program Files\Informix\ClientSDK\bin;
C:\Program Files\Microsoft SQL Server\80\Tools\BINN;
C:\WINDOWS\system32;
C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Informix\Client-SDK\bin;
C:\Program Files\Microsoft SQL Server\80\Tools\BINN;
D:\NetBeans5.5\ide7\ant\bin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic