org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
Solution 1
That is probably the same problem encountered with the m2clipse plugin : You have to tell eclipse to use the JDK when launching Eclipse. Only setting the JDK/JRE on the Window>Preferences has no effect.
For example add this argument :
C:\eclipse\eclipse.exe -vm C:\Java\jdk1.6.0_20\bin\javaw
Or edit the eclipse.ini file to add the vm argument.
There are plenty of possibilities. Check this link to get the right answer : m2eclipse: Eclipse is running in a JRE, but a JDK is required
Solution 2
For those who can't find an answer here...
For me this problem occured when I kept re-deploying a project on Glassfish for a while and the server ran into PermGem. This message was displayed first and sometimes it doesn't even show up. Restarting the server allways helps.
Solution 3
Had this issue, realized that the issue was actually with my glassfish instance and not eclipse when i deployed the same war to a remote glassfish server and it deployed fine. So i went to glassfish docs and searched how to change the jdk for your domain and this worked for me.
asadmin set "server.java-config.java-home=path-to-java-home"
Solution 4
Solution is simple,
All you need to do below steps : Prerequisites : Make sure JAVA_HOME, JRE_HOME, Path must be set in environment variable (both locally and system variable) and verify the same in cmd
- In Eclipse/STS/DeveloperStudio , Go to Windows -> Preferences -> Java -> Installed JREs
- Remove the old JRE_1.8.012 and add new i,e : Add -> Standard VM ->JRE Home : C:\Program Files\Java\jdk1.8.0_121 (give JDK path not JRE) -> JRE Name : jdk1.8.0_121 -> Finish
- Then Select, the listed JDK -> apply and close
- Go to Server(Tomcat) -> Runtime Environment ->verify selected runtime JREs it should be jdk1.8.0_121 (In my case)
- Restart Eclipse, restart server
Comments
-
uLYsseus over 2 years
Before posting this question here: I looked up at
2) How do I specify the jdk for a glassfish domain?
3) http://alvinalexander.com/blog/post/java/fixing-glassfish-jdk-path-problem-solved
4) https://www.java.net//node/702274
I am able to open the glassfish admin window in eclipse, but when I am trying to run my project, I get this annoying error: "org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required"
I looked at the above listed posts, but werent useful in my case...I have my java environment set..
But They Did not solve my problem. I still get the error as in the heading, there is already a question posted on a similar one, but doesnt have an answer I require....