- definire in variabili di sistema: ANT_HOME=C:\apache-ant-1.8.4
- modificare in variabili di sistema PATH:
. aggiungendo in fondo C:\apache-ant-1.8.4\bin
. aggiungento in testa, prima di tutto: C:\Program Files\Java\jdk1.6.0_35\bin
- modificare in variabili di sistema JAVA_HOME impostando il jdk e non il JRE: C:\Program Files\Java\jdk1.6.0_35\bin
________________________________________________
http://www.vogella.com/articles/ApacheAnt/article.html
Download Apache Ant from http://ant.apache.org/.
Extract the zip file into a directory structure of your choice. Set the "ANT_HOME" environment variable to this location and include the "ANT_HOME/bin" directory in your path.
Make sure that also the JAVA_HOME environment variable is set to the JDK. This is required for runningAnt.
Check your installation by opening a command line and typing "ant -version" into the commend line. The system should find the command ant and show the version number of your installed Ant.
________________________________________
http://stackoverflow.com/questions/5492937/windows-ignores-java-home-how-to-set-jdk-as-default
________________________________________
http://stackoverflow.com/questions/5492937/windows-ignores-java-home-how-to-set-jdk-as-default
How do I persuade Windows to use the JDK instead of a JRE?
This question has been asked before, here and elsewhere:
The trouble is that Windows ignores JAVA_HOME and it also ignores the fact that I made the JDK bin directory the first entry in the path.
When I run java -version from the command line, instead of invoking my JDK 1.6 installation, it runs the 1.7 JRE.
My guess is that this is a problem specific to 1.7, and Windows 7 is doing something it shouldn't with the registry.
.................................
On Windows, the
java
executable uses the Windows Registry to locate the default version of Java to run.
The copy of
java.exe
to run is found by using the PATH
environment variable. Unless you take steps to change this, by default a copy will be found in the Windows directory. Since this copy isn't in a Java runtime directory, it locates one by looking at the registry.
So, you either need to modify the registry, or put the version of Java you want before the Windows directory in your
PATH
.
Nessun commento:
Posta un commento