• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
Bartenders:
  • Himai Minh
  • Carey Brown
  • Frits Walraven

classpath

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Saloon Keeper
Posts: 23935
163
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Amali Prem
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23935
163
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic