-
Notifications
You must be signed in to change notification settings - Fork 145
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 while executing jar in command line #52
Comments
Duplicate of #46 |
#46 i have gone through the solution but JDK already installed in my local machine for executing jar file local machine(Window 10) using batch command Batch File Can you please assist me? |
Are you using CompilerUtils.addClassPath as suggested in comments in #46? |
Yes but same result |
Well I don't know what can be wrong on Windows - no one over here uses that parody on the OS... But may be you need to check if:
|
I got the solution click here need to copy tools.jar to jre/lib/ext folder thank you :) |
Well the accepted solution on Stackoverflow is the correct one. Copying a jar is a hack, not a proper solution. Proper solution is to set your |
But another issue is target machine has JDK 14 but in my local machine is jdk8 so it's working but for JDK 14 I need upgrade the version but tool.jar is removed in jdk14 any suggestions on this |
We don't support Java 14. We only support LTS versions of Java, with latest
being Java 11 and next being Java 17.
…On Tue, 29 Sep 2020, 17:40 Umesh Shende, ***@***.***> wrote:
But another issue is target machine has JDK 14 but in my local machine is
jdk8 so it's working but for JDK 14 I need upgrade the version but tool.jar
is removed in jdk14 any suggestions on this
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3U7SHOA7CKIIKHQNEQF7TSIIEWFANCNFSM4R3VND2Q>
.
|
That mean package will not on java 14 ? any alternative suggestion? What option do i have ? |
Actually tools.jar was removed in Java 9, but this project works fine with Java 9 and Java 11. Which means if instead of hacking things by copying jars you do it properly by fixing the JAVA_HOME and PATH, it will work fine. See e.g. here for details on tools.jar |
Ok thank you. |
I have an app that taking name(excel sheet) from user and I use those name as method and compile at runtime it's working in eclipse when running the project (not from command line ) but getting java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool exception when running batch file containing command for executing jar file(which has logic for runtime compilation ) I have try with the added dependency in maven com.sun artifact mentioned in the issue but did not work any suggestions
The text was updated successfully, but these errors were encountered: