Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool #44

Closed
matyklug18 opened this issue Oct 5, 2019 · 4 comments
Closed

Comments

@matyklug18
Copy link

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.AssertionError: java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at net.openhft.compiler.CompilerUtils.reset(CompilerUtils.java:85)
at net.openhft.compiler.CompilerUtils.(CompilerUtils.java:69)
at tests.javacompile.Main.main(Main.java:22)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at net.openhft.compiler.CompilerUtils.reset(CompilerUtils.java:81)
... 2 more

@RobAustin
Copy link
Contributor

RobAustin commented Oct 6, 2019 via email

@matyklug18
Copy link
Author

java 8. and where should i get tools.jar?

@RobAustin
Copy link
Contributor

its in the JDK, on my mac

/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/lib/tools.jar

image

@kannankalli
Copy link

HI,
We are migrating our application to JRE 11 from JRE 8. we are using 3.23.5 version of chronicle map. Application is shutting down while starting. Below is the error

Exception in thread "main" java.lang.AssertionError: java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at net.openhft.compiler.CompilerUtils.reset(CompilerUtils.java:64)

Based on my understanding, tools.jar is not present any more in jre 11. But chorincle map depends on JAvacTool which is from tools.jar. How should we mitigate this problem ?
Should i add tools.jar as part of the classpath in JRE 11 ( copied from JRE 8 ) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants