2

I'm having a problem with my web application in INTELLIJ. I'm new to INTELLIJ so I dont really know how to fix this. Others IDEs had nevere such a problem.

When I'm trying to run my web application it gets me this error:

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

The JDK is chosen and glassfish is working. Others had the same problem, some fixed it with a change in config file of glassfish. But that didnt fix my problem.

Does someone actually know how I can fix that and be able to run my web applications in INTELLIJ?

Thanks in advance!

Beau Grantham
  • 3,435
  • 5
  • 33
  • 43
pythoniosIV
  • 237
  • 5
  • 18
  • File -> Project Structure -> SDKs (in list) -> Add the path to your JDK (e.g., /path/to/x86/java/jdk1.6.0.35) and not a JRE. The JRE only contains the things necessary to run Java programs. The JDK contains code necessary to compile and debug programs. – pickypg Mar 20 '13 at 20:46
  • 1
    Already added: ![jdk](http://img692.imageshack.us/img692/9863/fac5bd58dc0f4739ad5cab9.png) error still there :/ – pythoniosIV Mar 20 '13 at 20:51
  • Hmm. Try the solution found here: http://stackoverflow.com/questions/9113346/pwc6345-there-is-an-error-in-invoking-javac-error-when-using-jetty-wtp-plugi . From your screenshot, it appears that you are doing the right thing, but can you show what is says under SDKs? – pickypg Mar 20 '13 at 20:59
  • Problem with that is, that it is for an eclipse extension and not specific for INTELLIJ – pythoniosIV Mar 20 '13 at 21:00
  • The system property being set is used by Jasper, and not Eclipse. It happens that that person is an Eclipse developer. http://youtrack.jetbrains.com/issue/TW-23098 – pickypg Mar 20 '13 at 21:05
  • Really dont know how I should use that for IntelliJ & glassfish. Proably I should go back to netbeans :x – pythoniosIV Mar 20 '13 at 21:10
  • As a Netbeans convert myself, IntelliJ is far superior in my opinion. This issue needs to be corrected, as others will face the same quirkiness in your development team. I'm surprised that it's happening actually because usually Glassfish and IntelliJ "just work" together. It definitely seems like a configuration issue. How did you configure Glassfish? – pickypg Mar 20 '13 at 21:45

1 Answers1

2

Glassfish is using JAVA_HOME environment variable and starts under the JDK defined by this variable. On your system this variable may point to the JRE instead. You can either change it in the system settings or directly in IntelliJ IDEA (repeat the same for Debug):

enter image description here

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • That fixed it thanks! It's the only solution on the internet that actually works for this specific problem! Thank you very much! – pythoniosIV Mar 21 '13 at 16:20