2

I'm trying to install Glassfish Server on Eclipse Luna.

I installed Glassfish Tools 7.3.3 (from Oracle) plugin and I downloaded Glassfish 3.1.2 on my computer. However, I can't see Glassfish Server on server lists in Eclipse. When I click on "Download additional servers adapters", it's not visible. I tried to register my Glassfish directory in Preferences > Server > Runtime Environments but it's not working.

Sorry if I missed previous answers on this topic.

Any idea ? Thanks :)

Rififi
  • 121
  • 1
  • 11

2 Answers2

0

Try to install GlassFish tool in Eclipse correctly. http://marketplace.eclipse.org/content/glassfish-tools-luna

And I have tip: Install NetBeans IDE with built-in GlassFish server, if you are new comer. Almost things has been configured for you. enter image description here

Vy Do
  • 46,709
  • 59
  • 215
  • 313
0

Check that you are using the correct JRE with your installation of Eclipse. From GlassFish Tools page:

"Even if the correct version of Java is installed, Eclipse may find an earlier version upon launch, if it exists somewhere else on the system." - See more at: http://marketplace.eclipse.org/content/glassfish-tools#sthash.Ych3VCKr.dpuf

You can see what version you are using by running this code:

public class JavaVersion {
public static void main(String[] args)
    {
        System.out.println(System.getProperty("java.runtime.version"));
    }
}

With Eclipse Luna, you should be using Java 8.

To change what version your installation uses, go to Window - Preferences - Java - Installed JRE's and select add. Select Standard VM and press next. Press Directory and navigate to where your JRE is and select it. Press Finish. It will now be on the list of installed JRE's. Ensure that it is selected as default. Press OK. (Note - it will be a good idea to not just install the JRE, but in fact the JDK instead. Do exactly the same, but navigate to JDK files.)

Now, when you create new projects, the default JRE will be the new one.

And now, GlassFish will be available from the list of server types in the new server wizard. (I restarted my Eclipse - it might be necessary, but I'm not sure).

Kitalda
  • 351
  • 2
  • 18
  • Next you might run into the problem from this question: http://stackoverflow.com/questions/26723197/how-do-i-use-glass-fish-server-with-eclipse-luna-for-java-ee - the accepted answer there will help. – Kitalda Jun 17 '15 at 08:53