I am trying to get glassfish working in eclipse, and running into the JRE vs JDK error:
GlassFish v3 requires a JDK 1.6 and not a JRE. Please add/select the correct JDK in the Server properties 'Runtime Environment' section.
I googled around and it seems a bunch of people had this issue. Sure enough in preferences->Server-> Runtime Environment when I clicked edit on the glassfish server runtime environment the JRE was "default JRE". I clicked the dropdown menu and switched it to my JDK: java-6-openjdk and figured I had the problem solved. Unfortunately, I am still getting the exact same error. This leaves me at a loss on how to google the issue since everyone else seems to have resolved it by just switching the JRE to a JDK. Does anyone have any thoughts?
Avtar
make sure the jdk is installed. Look in C:\Program Files\Java\jdk1.6.XXXX
(mine says 0_16). If that has stuff in it the jdk probably was installed, if not you can grab just the jdk from http://java.sun.com/javase/downloads/index.jsp
This is where the error message kinda foobars ya.
Window>Preferences
Standard VM
then Next
C:\Program Files\Java\jdk1.6.XXXX
the rest should fill in automagically. Hit Finish.Still in Preference Window. (May have to hit Okay, and re-open Preference window)
Go to the Servers Veiw (probably down by the Console View). Right click on the Bundled Glassfish...Server and hit restart/start...
Hopefuly this fixes it...
Try setting Eclipse running in JDK as well — maybe Glassfish picks its JDK. To do this, edit eclipse.ini
, and add the line
-vm
path-to-javaw.exe-in-a-JDK
With this configuration, I never had this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With