I would like to know if you have a problem, since it is part of JDK, or even if it is necessary.
I would like to know if you have a problem, since it is part of JDK, or even if it is necessary.
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
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.