Recently we started working on technology upgrade of our system and would like to know if Java 9.0 supported for Glassfish 4.0.
Also I wanted to know if Netbeans 8.X version is having support on Java 9. If so how to configure Java in netbeans? As I see, when I try to configure Java 9, I could not see any jar files loaded.
Please suggest me how to configure Java 9 with Glassfish 4.0 and NetBeans 8.x (To be precise, I am using Netbeans 8.0.2)
would like to know if Java 9.0 supported for Glassfish 4.0.
Yes, the current version of Glassfish 4.x (4.1.2) will run web applications built using Java 9.
I wanted to know if Netbeans 8.X version is having support on Java 9.
Definitely not. NetBeans 8.x only supports JDK 8 and earlier.
Please suggest me how to configure Java 9 with Glassfish 4.0 and
NetBeans 8.x
As mentioned above, you can't use Java 9 with NetBeans 8.x so discard that option. But you can build Java 9 web apps that run on Glassfish 4.x using NetBeans 9 Beta. To do that:
Download and install JDK 9.
Download and unzip Glassfish 4.1.2
Download and unzip Apache NetBeans 9 Beta.
Start Apache NetBeans 9 Beta by running netbeans64.exe (or netbeans.exe on 32-bit).
Select Tools -> Plugins -> Available Plugins and install everything with a Category of Java Web and EE. NetBeans will restart.
Select Tools -> Java Platforms to add JDK 9 as a platform (as shown in the OP).
Select the Services tab, right click on the Servers node and select Add Server... from the popup menu.
In the Add Server Instance wizard select Glassfish Server and click the Browse... button to navigate to your unzipped installation of Glassfish 4.1.2.
From the Services tab start the Glassfish server you just added, and then go to http://localhost:8080 in a broswer to verify that Glassfish 4.1.2 is running OK.
Use the File -> New Project... -> Java Web -> Web Application wizard to create a simple web application that is configured to run on the Glassfish server you just added.
In the Projects panel select your web project, right click and select Properties.
Select Libraries from the Categories list and set Java Platform to JDK 9.
Select Sources from the Categories list and set Source/Binary Format to JDK 9. Click OK.
In the Projects panel select the web project, right click and select Run. The page for your JDK 9 web app should open in the default browser.
Notes:
You can install and use JDK 10 instead of JDK 9 (or as well as JDK 9) on NetBeans 9 Beta.
You can freely run NetBeans 9 Beta concurrently with an existing installation of NetBeans 8.x. They are completely separate and will not impact each other.
Use the latest version of Glassfish (currently 4.1.2) rather than version 4.0 since a lot of bugs have been fixed.
Go to the Apache Netbeans 9 Beta web site for more details.
Related
I am currently having JAVA servlet in my curriculum and for lab sessions we need to integrate Apache Tomcat with the NetBeans IDE. We need to stay version specific, specified in our curriculum. So, we are using Apache Tomcat version 6.0.33, JDK version 1.6 and NetBeans version 6.5.1. I want to add a new Tomcat 6.0 server in my NetBeans IDE. For that I am performing following steps.
Tools -> Servers -> Add Server.
When I click on Add Servers button, the system is supposed to show me a new panel that allows me to select a server and create it. But, in my case nothing is happening. Please help me with this issue.
I have two versions of JDK installed in my system. JDK 1.6 and JDK 1.12. Can this be the reason behind this error.
Updated:
Here's the image of log after I tried to add server.
NetBeans Log
Nothing wrong appears in the log.
I want to create a Java 9 project with Netbeans but netbeans IDE 8.2 is not working with "Java 9.0.4". Menu buttons doesn't response anything.
When I make some search Can't create project on Netbeans 8.2
Uninstalling jdk 9.0.4 offered as solution. Is there any way to create a Java 9 project with Netbeans?
NetBeans 8.2 does not support Java 9, but there is a beta version of NetBeans 9 available for download:
https://www.apache.org/dyn/closer.cgi/incubator/netbeans/incubating-netbeans-java/incubating-9.0-beta/incubating-netbeans-java-9.0-beta-bin.zip
The download is a zip file which runs on all platforms. It supports all Java releases including JDK 9, and JDK 10. It is to be formally released later this month.
You can view and report bugs here: https://issues.apache.org/jira/projects/NETBEANS/issues/NETBEANS-330?filter=allopenissues
Also note that you can run NetBeans 8.2 and NetBeans 9 beta concurrently.
See here for more information: https://netbeans.apache.org/
Another approach is to run the nightly dev build of NetBeans (http://bits.netbeans.org/download/trunk/nightly/latest/) which supports JDK 9 but not JDK 10. Hoever, this is a release from Oracle which is currently in the process of handing over NetBeans to Apache, and I doubt if there is much support if you have problems.
I have installed Netbeans 8.0 that comes with pre installed Java ME plugin.
Now when I tried to create a new Java ME project it said No Java ME Platform found. Please add at least one
Also, the field "Java ME platform" was blank. So I clicked on Manage platforms and added Java ME CDLC Emulator Platform and gave the path to JAVA ME SDK.
It discovered the platform and added the devices.
After doing this, the field "Java ME platform" is still blank and I'm not able to select the Java Me platform.
Please help!
Had the same problem during installation on a new PC.
I'm developing for J2ME, CLDC 1.1, MIDP 2.1,
but I just couldn't manage to add a platform that would allow me to compile and run my app on an emulator.
The PC is a 64-bit PC, and I'm using the SDK 3.4, which is 32 bit
so finally I installed Virtual Box, Windows 7 32-bit as guest, and finally it worked
- installed first java jdk-8u25-windows-i586
- then netbeans 8 netbeans-8.0.1-windows
- once netbeans installed, activated java me plug in, there was no need to install it, it's pre-installed
- then java me sdk 3.4 oracle-jmesdk-3-4-rr-win32-bin
- then in netbeans, tools - java platforms, add the platform java me 3.4 just installed
Now I can emulate my app again
There are two kinds of projects available Java ME embedded and Java ME. The Java ME CDLC Emulator Platform is used for Java ME projects.
One thing you should check is the activation step as described here: https://netbeans.org/kb/73/javame/cdc-quickstart.html
For my case I had the EE version of Netbeans 8.0 so I wen to the start page then to plugins and downloaded everything that had to do with JME. I also had to download SDK Java ME SDK 3.2.
I also downloaded the plugins for Netbeans (even though I did the plugin installation through the IDE) Java ME SDK 3.2 Plugins for NetBeans from: http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk/index.html. Then went to Tools->Plugins selected the Downloaded tab and finally Add PLugins ...
UPDATE - Tried with NetBeans 8.0 All (contains JAVA ME)
Even after activating the plugins I still had to download Java ME SDK 3.2 Plugins for NetBeans. Only then the IDE is offering me Java ME when I click at new project.
What I did:
1) Activate Java ME plugin, restart the IDE:
2) Install Java ME SDK 3.2
3) Go to Tools add platform. Restart IDE just in case. Still offered only Java ME embedded as project:
4) Go to http://www.oracle.com/technetwork/java/javame/javamobile/download/sdk/index.html and download the plugins for the Netbeans IDE. Unzip the file and install them (press ctrl-a to select all the nbm files and click open):
5) Click install. This will install everything needed and it will prompt you to restart the IDE:
6) Restart the IDE and there it is:
Im trying to launch glassfish-4 using glassfish-eclipse-plugin. Unfortunately it does not seem to recognize the JDK-8 Release candidate i just installed (The "Finish" button stays disabled).
Finish button will be enabled if i select a java 7 jdk
Is there any options to work around this?
Now Lambda support works "out-of-the-box" if using below combination of software
Oracle JDK 8
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Glassfish from 4.01 branch
http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/latest-glassfish.zip
Eclipse 4.4 Luna
http://www.eclipse.org/downloads/ (pick the java ee package)
I had the same problem getting Eclipse Luna and Glassfish to play nicely. I scrapped everything, re-download and installed eclipse-jee-luna-R-win32-x86_64. And then upon creating a new dyanmic web app in Eclipse I had install a new extension for the server runtime environment. That extension was the GlassFish Tools extension from Oracle v7.2.1.2014071142. An Internet connection was required in order for Eclipse to find this. And Voila! So far, so good. Your mileage might vary.
This question already has answers here:
How do I import the javax.servlet / jakarta.servlet API in my Eclipse project?
(16 answers)
Closed 1 year ago.
I have tomcat 5.5 installed, running and verifiable at http://localhost:8080/. The Tomcat menu option appears in the Eclipse menu bar and I can start and stop Tomcat from there. In Eclipse, it does not show as a Server Runtime Environment in Window - Preferences - Server - Runtime Environments, nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.
Edit:
Running on Windows XP.
Eclipse version is 3.5.1
In my case I needed to install "JST Server Adapters". I am running Eclipse 3.6 Helios RCP Edition.
Here are the steps I followed:
Help -> Install New Software
Choose "Helios - http://download.eclipse.org/releases/helios" site or kepler - http://download.ecliplse.org/releases/kepler
Expand "Web, XML, and Java EE Development"
Check JST Server Adapters (version 3.2.2)
After that I could define new Server Runtime Environments.
EDIT: With Eclipse 3.7 Indigo Classic, Eclipse Kepler and Luna, the steps are the same (with appropriate update site) but you need both JST Server Adapters and JST Server Adapters Extentions to get the Server Runtime Environment options.
You need to go to Help>Eclipse Marketplace . Then type server in the search box it will display Eclipse JST Server Adapters (Apache Tomcat,...) .Select that one and install it .Then go back to Window>Preferences>Server>Runtime Environnement, click add choose Apache tomcat version then add the installation directory .
I had the same problem and I solved it with the following steps
Help > Install New Software...
Select "Eclipse Web Tools Platform Repository (http://download.eclipse.org/webtools/updates)" from the "Work with" drop-down.
Select "Web Tools Platform (WTP)" and "Project Provided Components".
Complete all the installation steps and restart Eclipse. You'll see a bunch of servers when you try to add a server runtime environment.
Window > Preferences > Server > Runtime Environments (as you said)
Add
Apache > Apache Tomcat 5.5
That has worked for the past 3 versions of Eclipse at least. If there is not such an option on your eclipse, get a fresh installation (for Java EE developers).
nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.
Go get "Eclipse for Java EE developers". Note the extra "EE". This includes among others the Web Tools Platform with among others a lot of server plugins with among others the one for Apache Tomcat 5.x. It's also logically; JSP/Servlet is part of the Java EE API.
You may get more success if you do a "search" for the runtime env from the preferences screen instead of hitting "add" - see this demo on youtube. http://www.youtube.com/watch?v=EOkN5IPoJVs&playnext_from=TL&videos=rVnITzSU2Z8 - When you hit search, you are prompted to point to the tomcat directory and then it SHOULD add it as a server runtime environment. Unfortunately for me, that is not the case (I get "no new server runtime environments were found") But you might have more success.
Scenario 1:
You had Eclipse showing server and now after removing the particular version you want to configure at Eclipse a new local server instance. But you can not move further.
This happens due to reason Eclipse still looks for configured version of Tomcat directory, which directory is no longer there.
There is no need till LUNA to make fresh installation!
All we need is to REPLACE the new server run time environment into eclipse after removing old one, which is non-existent. Eclipse will
Help -> check for updates upon Eclipse update solved the issue