Download Java Tools.jar

293 views
Skip to first unread message

Lurline Orban

unread,
Jan 25, 2024, 4:24:58 AM1/25/24
to upislabmye

I was trying to download and install new jdk for brushing up my java, but it seems the jdk installation doesn't have the tools.jar file in the lib directory. Am I missing something?I tried installing it from this link -windowsI tried both exe and msi but none seems to work and when I tried running the code I get Error:Cannot determine path to 'tools.jar' library for 17 (C:\Program Files\Java\jdk-17)

I tried to search for this issue, but most question where asked by people who installed jre instead, or who didn't set the set "JAVA_HOME=C:\Program Files\Java\jdk-17"

download java tools.jar


DOWNLOADhttps://t.co/qVEKogRyYn



The transition from JDK8 to JDK9 broke a ton of java stuff. Including removing this jar. It's now in a module. Whatever software is looking for tools.jar will not be compatible with this new model. Oracle hides behind the idea that none of this was specced, and in fairness to Oracle/OpenJDK, it wasn't. In other words, relying on 'tools.jar' never was actually supported, but then again, the things that 'rely' on this wanted to compile java code. There is no alternative short of shipping the compiler with your app, which has license issues.

The $JAVA_HOME variable pointed directly to my jdk folder (/usr/local/java which was also the correct $PATH entry and alternative sym link). It actually searches for the lib folder outside the java directory, because:

To solve this, the $JAVA_HOME variable should instead point to this location /usr/local/java/jre (assuming the JDK path is /usr/local/java) -- there is actually jre folder inside the JDK installation directory, that comes with each JDK. This new setup will cause maven to look at the JRE directory, that is part of the JDK:

I would also like to mention that on recent versions of the JDK, there is no more tools.jar file. I downloaded the most recent JDK as of today (JDK version 12) and I could not find any tools.jar. I had to download JDK version 8 (1.8.0) here -downloads-2133151.html to get the tools.jar file. I downloaded that version, took the tools.jar file and put it into my recent version's lib folder.

Ant is still trying to find tools.jar in C:\Program Files\Java\jre6\lib folder.
I've fixed it by adding JAVACMD environment variable and set path for it to java.exe in the jdk folder.
In my case it was C:\Program Files\Java\jdk1.6.0_45\bin\java.exe

solving this problem I have simply copied the tools.jar file from C:\Program Files\Java\jre1.8.0_112\lib to C:\Program Files\Java\jdk1.8.0_112\lib so that I have two tools.jar files instead of one and problem disappeared.

I actually set my JAVA_HOME from C:/program files X86/Java BUT after I installed the 1.7 version I had another Java in program files/Java. And at this moment I found the tools.jar here. Then I changed for this new path and it's working

Well, I added a JAVA_HOME env variable and it is working!
I was wrong in assuming that just adding an "org.gradle.java.home"
to gradle.properties file in the gradle directory would be enough.
Thanks!

Following properties files specification a colon is also a separator sign (like =). So it must be quoted in property values. A valid configuration entry in gradle.properties is:
org.gradle.java.home = c\:/Program Files/Java/jdk1.7.0_03
Note the backslash in front of the colon of the drive letter.

Hi Folks,

Newbie here. I have a problem when starting up JBoss. This is on RHEL3. I'm using Java(TM) 2 SDK, Standard Edition, Version 1.4.2.

When I run the run.sh script, I get the following:

run.sh: Missing file: /lib/tools.jar
run.sh: Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE.

I've checked in the run.sh, and the important part seems to be this:

if [ "x$JAVAC_JAR" = "x" ]; then
JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
fi

if I run "echo $JAVA_HOME" at the console, I get "/usr/java/j2sdk1.4.2_02", so I would don't understand why it seems to be populating this as a empty variable in this portion of the script. I've also verified that $JAVA_HOME/lib/tools.jar exists.

I get a bunch of more serious errors later on down the line, but for the moment I'm assuming they're related to this. Can anyone help?

Thanks, Tom

The only error a missing tools.jar will cause is failure to compile jsp pages. I would assume the /usr/java/j2sdk1.4.2_02 installation is corrupt. List the contents of the /usr/java/j2sdk1.4.2_02/lib directory.

I would suggest to replace the value in systemPath by the expected path to JDK8 in the parent pom, removing the reference to java.home from it or using an alternative environment variable. You may also try overriding this dependency on the child pom, using the dependencyManagement section.

base image: timbru31/java-node - this node and java image .
when I try to build ant tasks it is failing with following error . I am able to build this project on my local machine without any issue where JAVA and ant already installed on my local.

When you install Java (JRE) and try build your app, the build now finds Javas JRE which has everything it is needs to run Java but not build it, this is why the new error is Could not find tools.jar.. The JDK includes the compiler (javac) and tools (like javadoc and jdb) and is what is needed to build your app. You then fixed the second error by forcing gradle (build tool) to look in the correct folder for your JDK.

tl;dr Is it legal to redistribute tools.jar and JRE component of OpenJDK 8 with my app? If possible, tell me what OpenJDK vendor I can redistribute (RedHat, Azul,...) Installing JDK on user machine is NOT an answer here.

My application uses the Java Attach API, which needs tools.jar and JRE component of JDK (NOT the JREfrom java.net, and because bundling attach.dll instead of the whole JRE component won't work (it will print out error Cannot find dependent libraries)). I want to include these components (tools.jar and JRE Component) in my app directory (not compiled inside the app), so that one only needs to install Java (normal JRE, from java.net) to run my app.

If possible, I do not wish to bundle tools.jar with my plugin, however, as I foresee that this could lead to several problems with incompatibilities between the SDK used for the Atlassian server application process and the tools.jar provided by the plugin. I would rather use the file included on the server with the JDK.

The question is then: if I cannot go down the route of bundling the tools.jar file with my plugin, how do I bend/extend the OSGi system to also include tools.jar as a container-provided package, and not a plugin-provided one?

(I should add that I have verified that I can access and use the classes within the tools.jar file from ScriptRunner using the classic methods of adding jar files to the classpath, so my code works as long as the classes can be loaded).

I have tried setting JAVA_HOME to /usr/java/jdk/bin and a few other things that are not correct. From what I read this is the most correct as the bin directory has the javac library. Here is the problem whenever I run ant this is the error I see.

I would like to thank everyone for their help. I am happy to tell you that this has been resolved. I looked into the ant script and found that if I turned the no_config=true it would use the right java_home but other paths were messed up so I decided to find what that option changed and found that when set to true it would use the /etc/ant.conf for some configuration changes. I looked in there and sure enough there was the offending line of code. This is what my ant.conf looks like now just in case it might help someone with the same problem

My operating system is centos7, and the version of elasticsearch is 8.5.0. The version of usr/local/java is 1.8. my question is why there is still a jar conflict between / usr/local/java when I print environment variables and use the built-in JDK of Java. How to solve the problem?

I solved this problem by myself. I opened the DEBUG log and found that the path of the log output java.class.path contains the path of / usr/local/java. Then I set-Djava.class.path to the home directory of ES in the jvm.options file, and the problem is solved.

I am facing this problem in Vista. You have provded a solution for XP. How can I dop that in Vista
C:\>ant
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

c:\SOAP>java -classpath tools.jar; force-wsc-53.0.0-uber.jar; ST4-4.0.8.jar; com.sforce.ws.tools.wsdlc Partner.wsdl Partner.jar[WSC][wsdlc.main:72]Generating Java files from schema ...[WSC][wsdlc.main:72]Generated 696 java files.Exception in thread "main" java.lang.NullPointerExceptionat com.sforce.ws.codegen.Compiler.(Compiler.java:48)at com.sforce.ws.codegen.Generator.compileTypes(Generator.java:136)

The tools, which are all listed further below, are invoked as follows:java jvm-args -jar picard.jar PicardToolName OPTION1=value1 OPTION2=value2...See the Tool Documentation for details on the Picard command syntax and standard options as well as a complete list of tools with usage recommendations, options, and example commands.

parquet-tool is a simple java based tool to extract the data and metadata (file metadata, column (chunk) metadata and page header metadata) from a Parquet file(s). We can extract the parquet file information from local or S3/HDFS.

This basic test will perform the open, read/write, close, and delete operations 1000 times to a temporary file in the java.io.tmpdir directory for each measurement, reporting the results as in the assessment section below. This test is the closest we can get to simulating the performance of a Java process when it comes to accessing the file system, allowing it to be an accurate measurement for the application performance when utilizing the disk. Other disk measurement tools may provide different results if they do not measure the specific performance of the Java JDK/JRE.

df19127ead
Reply all
Reply to author
Forward
0 new messages