Hi. I just installed Eclipse for EE developers and Glassfish v3. The IDE detected the server and registered it, but when it comes to run the applications I get the following message:
GlassFish v3 requires a JDK 1.6 and not a JRE. Please add/select the correct JDK in the Server properties 'Runtime Environment' section.
Can anyone suggest what to do in a more less detailed way. I tried accessing the Administration Console page but I don't know what to change. Also, I tried right-clicking the server within the IDE but I don't see anything useful
I was also experiencing this problem...I installed the bundle from here http://download.java.net/glassfish/eclipse/ the one that supposedly has the jdk bundled. But apparently it either doesn't install it, or doesn't properly configure the bundled eclipse to point to it...So:
1) 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
2) This is where the error message kinda foobars ya...
- Get eclipse started, ignore the message.
- Go to Window>Preferences
- Then under JavaInstalled JREs hit Add.
- Select 'Standard VM' then Next
- JRE Home = C:\Program Files\Java\jdk1.6.XXXX the rest should fill in automagically. Hit Finish.
- MOST IMPORTANT!!! Click the check box back in the Preferences Window for the new jdk runtime...I don't know why it's necessary, but it definitely is...
3)Still in Preference Window.
- Get to +Server, Runtime Environments
- Select the Glassfish SRE, hit Edit...
- From the JRE drop down grab the JDK and hit Finish
- Hit Okay.
4)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...