Questions tagged [tools.jar]
82 questions
196
votes
36 answers
Unable to locate tools.jar
I am building a project in Java.
I have this error:
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
I have installed a JDK and the folder: C:\Program Files\Java\jre6\lib is in my system but the file…

olidev
- 20,058
- 51
- 133
- 197
81
votes
8 answers
JDK tools.jar as maven dependency
I would like to put JDK tools.jar as compile dependency. I found some examples that indicate to use the systemPath property like the following:
com.sun
tools
system
…

Laurent
- 14,122
- 13
- 57
- 89
49
votes
5 answers
"Unable to locate tools.jar" when running ant
When running ant, I get the following message:
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
I have JAVA_HOME set to C:\Program Files\Java\jdk1.7.0_02, PATH includes C:\Program Files…

john
- 903
- 3
- 9
- 9
48
votes
10 answers
Ant needs tools.jar and unable to find it
I am putting together a dev environment for a Java program and after the first try of my Ant build scripts I got this error:
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar
While the path to the jdk is…

Genadinik
- 18,153
- 63
- 185
- 284
46
votes
11 answers
Android Studio 'tools.jar' file is not present in classpath
I downloaded the current version of Android Studio (latest as of 4th July 2013)
I also downloaded the JDK version 7u25.
However, it displays error after startup: Please ensure JAVA_HOME points to JDK rather than JRE.
I don't know how to solve this…

axolotl
- 1,042
- 1
- 12
- 23
42
votes
8 answers
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…

Derek
- 4,985
- 4
- 20
- 9
22
votes
2 answers
Fatal error compiling: tools.jar not found:
When compiling a project in Eclipse, I get below error:
Fatal error compiling: tools.jar not found:
How is this caused and how can I solve it?

Uppi
- 702
- 2
- 13
- 37
20
votes
14 answers
Could not find tools.jar in the active JRE - Spring Tools Suite
I know there are multiple topics about that, but none of it is about Spring Tools Suite. And i'm finding informations that this file no longer exists in newer Java versions, which seems to be true, since i cannot find it.
I'm absolutely lost now.
user8883325
19
votes
1 answer
How to get tools.jar for OpenJDK 11 on Windows?
Background: I am trying to build Hadoop for Windows using instructions found here. I have OpenJDK 11 and have ran into the following issue while running mvn package:
Could not resolve dependencies for project…

R Y
- 455
- 1
- 3
- 13
18
votes
2 answers
Add tools.jar in the classpath of sbt project
The ':javap' command in the scala 2.9.1 console need the tools.jar (from JDK6) in the 'classpath'. From cmd-line it could be done with '-cp' argument or CLASSPATH environment variable.
How to do the same for scala console that invoked from SBT with…

andy legkiy
- 203
- 3
- 7
16
votes
3 answers
Declare maven dependency on tools.jar to work on JDK 9
I have a project that uses this technique that work fine in JDK 8 and older. However, in JDK 9 this jar was removed and it does no longer work:
'dependencies.dependency.systemPath' for com.sun:tools:jar refers to a non-existing file…

Oliver Gondža
- 3,386
- 4
- 29
- 49
14
votes
12 answers
Missing tools-1.6.jar with Eclipse and Maven
I am trying to get a project to run using Maven in Eclipse, but I am getting this error below. The tools.jar is in the JDK's lib folder, but tools-1.6.jar doesn't seem to exist on my computer. I am using the JDK 1.7 and my JAVA_HOME is pointing to…

Soren Johnson
- 2,561
- 4
- 21
- 17
14
votes
5 answers
Where is tools.jar located?
Running CentOS 6, Java 1.7.0_25 OpenJDK
Upon installing the RPM I saw it say
Unpacking JAR files...
rt.jar
jsee.jar
charsets.jar
>tools.jar
Where is tools.jar located? I checked /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64
No where to be found.

Necro.
- 987
- 6
- 17
- 29
10
votes
2 answers
Compile java files programmatically
I know this has been asked and answered a lot but I still don't have a good solution and I still don't understand some parts. So I have the requirement to compile *.java files programmatically.
JavaCompiler compiler =…

user2229298
- 101
- 6
8
votes
1 answer
In Maven: how to attach sources to tools.jar
I have to use libraries in tools.jar and have therefor added this dependency:
com.sun
tools
1.6.0
system
…

Sean Patrick Floyd
- 292,901
- 67
- 465
- 588