Reputation: 1
I have developed an e-commerce application using JSP, Servlet, Javabeans and MySQL. I have followed the Netbeans tutorial for e-commerce development. My application is running fine in Netbeans environment. But when I want to deploy it in Glassfish server (without using Netbeans), it shows an error:
"org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required".
I have installed JDK into my machine and also set the classpath. I have no idea why this error shows. I want to run the application in Glassfish server without using Netbeans. Please suggest me the full steps for this. (I have placed the war file of my project into the autodeploy folder of the server).
Upvotes: 0
Views: 2883
Reputation: 1
Locate and edit this file: glassfish/config/asenv.bat
Add this entry: AS_JAVA=C:\Program Files\Java\jdk1.8.0 (location of your JDK)
Save this and restart glassfish.
Hope this helps.
Upvotes: 0
Reputation: 794
You can set JAVA_HOME = JAVA_JDK_PATH
and restart the glassfish server
Upvotes: 2
Reputation: 527
I tried all the solutions offered here and on other posts, including setting the path to the jdk in asenv.conf. The ONLY thing that worked for me was going to the glassfish admin console Configurations/server-config/JVM Settings and changing Java Home from ${com.sun.aas.javaRoot} to C:\Program Files\Java\jdk1.8.0\bin\java.exe. Truly, Glassfish is a piece of crap!
Upvotes: 0
Reputation: 2220
Are you sure that the path it's trying to use for a jdk is in fact a jdk? Quick googling shows me this error is common with some plugins where it gets confused and points to a JRE instead of a JDK despite the presence of a JDK
Upvotes: 0