org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required

44,722

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

  1. In Eclipse/STS/DeveloperStudio , Go to Windows -> Preferences -> Java -> Installed JREs
  2. 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
  3. Then Select, the listed JDK -> apply and close
  4. Go to Server(Tomcat) -> Runtime Environment ->verify selected runtime JREs it should be jdk1.8.0_121 (In my case)
  5. Restart Eclipse, restart server
Share:
44,722
uLYsseus
Author by

uLYsseus

Like interacting and asking questions.....

Updated on January 21, 2022

Comments