Can I use tools.jar in the ClassPath of my Java project?

1

I would like to know if you have a problem, since it is part of JDK, or even if it is necessary.

    
asked by anonymous 07.01.2016 / 13:04

2 answers

1

You need to add tools.jar to the classpath if you want to use the classes.

This file contains classes used for the development of Java programs, such as Java compiler classes.

It is also distributed with JDK, so unlike the JRE classes that are automatically present for the program, you have no guarantee that this library will be present in the user environment. That's why some tools require you to use a JDK.

Reference: link

    
07.01.2016 / 23:44
0

It's probably not necessary, it's already part of the JDK. Just check that where the application is running, which JAVA_HOME is set.

    
07.01.2016 / 13:26