Friday 15 June 2012

java - NetBeans IDE 6.7.1 Ant Script variables -


How do I get the location of rt.jar in my ant script with NetBeans without editing my project? Properties? $ {Java.home} is returning the JR folder's location and not the JDK folder.

I know that I can easily add value to the project. but I do not want. I also know that whenever I change the computer, I can easily modify the path, but I would not like to do this.

Edit: Maybe $ {Java. Home} is the best solution and I should just fix my computer environment variable properly

Edit 2: I realized that Java is not the same as JAVA_HOME. More info:

Do you have JAVA_HOME set? If so, does it matter on JDK? From the ant:

When you need the functionality of JDK (such as for Javak work or RMIC work), then tools.jar should be added. In the bin directory, the required JDK class will automatically add the scripts supplied with the ant if the JAVA_HOME environment variable is set.


No comments:

Post a Comment