tools.jar

Ant error when trying to build file, can't find tools.jar ??

When I run ant it says: Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar Buildfile: build.xml does not exist! Build failed What package can I use to download the file required > C:\Program Files\Java\jre6\lib\tools.jar I just downloaded this one: jre-6u19-windows-i586-s.exe but unfortu...

JDK tools.jar as maven dependency

I would like to put JDK tools.jar as compile dependency. I found some examples that indicates to use the systemPath property like the following: <dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <scope>system</scope> <systemPath>${java.home}/../lib/tools.jar</systemPath> </dependency> The problem is that t...

Java compiler at Runtime

Hi, In my current project, I need to compile java code at runtime (in the background to process input from the user). This works fine with tools.jar in the classpath. However, not all users of my program have JDK installed on their system. Some of them only have JRE and in that case there is no java compiler available at runtime. I can...

In Maven: how to attach sources to tools.jar

I have to use libraries in tools.jar and have therefor added this dependency: <dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <version>1.6.0</version> <scope>system</scope> <systemPath>${java.home}/../lib/tools.jar</systemPath> </dependency> Now I would like to attach the sources in Eclipse, ...