How can I add GlassFish 4.1 server in Eclipse Neon 2? - eclipse

I have a fresh installation of Eclipse IDE for Java EE Developers - for WIndows 64bit - Version: Neon.2 Release (4.6.2)
I have downloaded the newest editions of GlassFish server 4.1.1 - both Full & Web Profie
I've installed the latest GlassFish tolls using Eclipse Marketplace:
https://marketplace.eclipse.org/content/glassfish-tools
Now I am trying to add GlassFish Server to Eclipse using the latest JDK 8, but it complains that Java 6 or 7 is required:
OK, then I am trying to use the latest JDK 7 instead of 8, but this time it complains that this is an invalid GlassFish instalation.
How can I add GlassFish server to Eclipse, what am I doing wrong ?

After lots of trials and errors I finally managed this issue.
A glassfish subdirectory must be pointed instead of base installation directory, and everything works fine.

As for the "Java 6 or 7 is required"-problem; I managed to get past this by adding a trailing slash to the java location.
/usr/lib/jvm/java-8-oracle # "Java 6 or 7 is required"
/usr/lib/jvm/java-8-oracle/ # Works
This is on linux, so it might not apply to your windows environment.

Related

apache tomcat 9 eclipse Kepler IDE

I installed apache tomcat 9 to use it with eclipse IDE.
1*When i try to add in "servers" tab i don't find it. (the latest version found is 8.0).
2*I tried adding it manually in Windows->preferences->server->runtime environement By chosing 8.0 version and introducing tomcat 9.0 installation path istead of 8.0 path but it doesn't accept it showing this message
" The Apache Tomcat installation at this directory is version 9.0.35. A Tomcat 8.0 installation is expected."
3* I uninstalled tomcat and reinstalled it in the default folder (thinking that this was the problems origin), but nothing.
those are the solution i tried. Have any one faced this problem or resolved it?
Additionnal informations:
OS version: Windows 10 64bits
Eclipse: Eclipse Java EE IDE for Web Developers.
Version: Kepler Service Release 2
Build id: 20140224-0627
tomcat: 9.0.35
Apache Tomcat 9 did not exist when Eclipse Kepler was the supported version. Get the current version: 2020-03.

Start Glassfish in Netbeans 10 with JDK11

I am trying to configure everything to develop a web application, but I am not expert about that and I am having problems to start Glassfish.
I installed Netbeans 10, JDK11 and Glassfish 5, but when I try to execute a basic "Hello World!", it returns an error saying "Glassfish server could not be started with JDK11. Please select another Java SE Platform".
Maybe, am I forgettig install something more?
Only the glassfish server no longer supports the java 11 platform
Therefore,the first you need to install java platform 8:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Then you install it.
Back to Netbean, go to Tools>>Java Platforms>>JDK 1.8
If you have JDK 1.8. you can run your project with JDK 1.8
Download jdk 8 with NetBeans 8.2
Download glassfish: https://javaee.github.io/glassfish/download
goto Tools>>>Servers>>>Add server>> choose glassfish>> browse where u just download the glassfish and install.
Jdk 8 will work fine for all your projects
You should change to use Payara Server.
It works like Glassfish (Maybe it's new version of Glassfish)

GlassFish cannot be installed in Eclipse

Tried to install glassfish4 server in eclipse oxygen. Everything is ok except that it cannot recognize the jdk. Its saying JDK required instead of JRE. I have given the right path of my JDK, but still its saying that its JRE. When I am giving "javac -version" command in the command prompt its correctly showing java version "9.0.4". Please help.
No version of GlassFish supports JDK 9 at the moment. You will need to downgrade to JDK 8.
Additionally, the GlassFish Tools for Eclipse IDE have not been formally updated to support GlassFish 5 yet. With the move of Java EE and GlassFish to the Eclipse foundation, this is likely to happen but it is hard to say when at this point.

NullPointerException when Starting Glassfish 4.0 in Eclipse on OSX Mavericks

I am using Mac 10.9 OSX Mavericks and Eclipse IDE for Java EE Developers(kepler).
I've installed Glassfish 4.0 using the 'new server' option in eclipse and the latest JDK - Java SE 7 [1.7.0_55].
but when trying to start the server, I get this error -
An internal error occurred during: "Starting GlassFish 4.0 at localhost".
java.lang.NullPointerException
Is there anything wrong with my setup? Any advice is much appreciated!
Open eclipse.ini file which is located in your eclipse installation directory (in the same folder with eclipse.exe).
Add -Duser.language=en in the bottom of your eclipse.ini.
Restart eclipse.
I installed Eclipse IDE for Java EE Developers(juno) instead of kepler and it works!
I am not sure what the problem with kepler is but this is a solution that worked for me.
I had the same problem while using Windows 8.1, jdk1.8.0_20, & Eclipse Luna.
I deleted the glassfish server, then re-installed, and it was all fine!
Note:
Remember to delete the server from the installation location.
Also in eclipse when you do a new installation, remember to go to "Configure Runtime Variable" (In the New Server Window), delete the existing config for Glassfish. then when you click next you will be prompted to select the JDK where you can select the correct version of the JDK. If you don't see the correct version of the jdk or no jdk version at all, then you will find above JDK a link called "Installed JRE Preferences" add the right version from there!
I had the same problem using Win7,jdk1.7.0_67, Eclipse Luna, glassfish 4.
As I suspected there is something wrong with the JDK settings, so I checked the Servers config in Preferences and in runtime environments my glassfish server got the problem: invalid JRE.
So I tried to set the JDK but the Finish button just isn't working.
I deleted that server and created a new with the same settings, and it's working.
I'm not sure though what caused this problem.

netbeans project properties not showing installed glassfish

im using netbeans 7.3.1. i installed glassfish 3.1.2.2 because glassfish 4 requires at least jdk 1.7 , and i cant upgrade to jdk1.7 because im on mac os snow leopard and it requires at least os lion.
on netbeans, i have added glassfish 3.1.2.2 and it is showing under
services tab->servers
when i
right-click my projects -> properties -> run
i can't select glassfish 3.1.2.2 under server dropdown list.
why is this so, and how can i fix this??
i discover that i was using java ee 7 which doesn't support glassfish 3.1.2.2.