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

uLYsseus picture uLYsseus · Jul 9, 2013 · Viewed 42.6k times · Source

Before posting this question here: I looked up at

1)Glassfish 3.1.2.2 in IDEA 11.1.4: "PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required"

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

5) "PWC6345: There is an error in invoking javac." error when using Jetty WTP plugin to deploy a JSP page on Jetty

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....

Answer

willome picture willome · Jul 10, 2013

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