I have a set of projects under Netbeans that run on Java 1.7; I am starting one that depends on having Java 1.8. It is a web app, and both Netbeans and the Tomcat server that is configured under Netbeans need to run on 8 for the latter project, but cannot run on 8 for any of the former projects.
I was hoping to create a bat file or something that would allow me to specify the Java version for both Netbeans and the Tomcat that runs under Netbeans.
I found the command line argument for setting the jdkhome for Netbeans; that works for Netbeans. But the JDK configured for the server appears to be a Netbeans setting, and I don't know how to change that at the time that I invoke Netbeans, or with an environment variable (I tried JAVA_HOME, that didn't work).
Does anyone know how/whether this can be done?
Open netbeans IDE and go to Tools-->Servers
Then Select your server (tomcat) and on platform tab select your JDK version and lick on close button.
if Your JAVA platform is not listed in combo box click on Manage Platforms and add new JAVA Paltform.
Related
I have recently installed netbeans 11. And open an existing maven project which is run properly on netbeans 8.2.That project runs on jdk1.7.In netbeans select manage platforms and I want to add jdk 1.7, there is error like that
Cannot detect and install the selected platform. The java or javac may not be executable.
I was facing same issue , was not able to add jdk 8 on netbeans 12.2.
In windows normally user do not have write access on "Program Files" folder , make sure if your netbeans is installed in Program Files directory run it as Adminstrator and then try to add new platform it will work.
Disclaimer: I am new to Java, new to Linux, and new to Netbeans - apologies for any over/under explanation - please ask and I will add/remove info.
I have a model written in Java in Netbeans 8.2 that has been successfully running in NetBeans 8.2 on Mac OS. This version of NetBeans was downloaded with JDK8u171 (JDK/Java package).
All components of the model have successfully transferred through FTP (filezilla) to a remote Linux machine.
The Linux machine has a copy of Netbeans 8.2 and has java/1.8.0-oracle (and 1.6.0 and 1.7.0), and has java/1.8.0-openjdk (similarly, 1.6.0 and 1.7.0 also).
I am assuming that 1.8.0-oracle is the equivalent of JDK8u171 but I may well be wrong.
When I load netbeans using
module load java/1.8.0-oracle
module load netbeans
netbeans
The program opens (via remote desktop - x2goclient), and I can search for the project and open it.
Once open, I see:
'myprojectitle (broken)' in the project window on the left of the NetBeans GUI
right click -> resolve problems
...opens a screen saying
'The JDK is missing and is required to run some NetBeans modules Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/FaqRunningOnJre for more information.'
Does this mean I am using the wrong jdk/java package?
Or is the jdk package configured incorrectly in Netbeans, if so how can I reconfigure?
Any help would be greatly appreciated.
The solution to this was found at
The JDK is missing and is required to run some NetBeans modules
Whereby, java/1.8.0_171 needed to be installed and then netbeans needed to be opened as follows:
netbeans --jdkhome /path/java/1.8.0_171
Apologies for a repeat, but hopefully this answer can either redirect or offer a solution
I did an installation on my Mac of a new Java SDK (1.6 -> 1.7).
On command line it shows the 1.7. And I even changed the Mac's Symlink of CurrentJDK.
But JBoss still shows me a path entry "java.home" pointing to 1.6. And it is not possible to change that via admin website.
Anybody know how to change that?
PS: I start JBoss from Eclipse, which knows also 1.7 now as default.
Open the Launch Configuration for your JBoss server in Eclipse. On the JRE tab you can select the specific Java runtime that it will run in. If the option Project Execution Environment is selected (the default), then you can change it by opening the Project properties, going to the Java Build Path section, then the Libraries tab. Select the JRE System Library entry from the Libraries list then use the **Edit...* button to select your desired Execution Environment.
Alright so basically, I'm trying to run Eclipse with JavaFX, but then it gives me this error:
You are not running your eclipse instance with Java7 or Java8. The JavaFX tooling is disabled because of this.Make Java7/8 the default system java or adjust your eclipse.ini to pass -vm pointing to your Java7/8 install.
In case you want to turn off this check open your preferences and go to General > Startup and Shutdown and uncheck 'JavaFX Tooling Java Check'
Now I know it isn't pointing to the right SDK, but I have no idea how to change it, since I'm kind of new to this this stuff. I've already downloaded JDK 7.40 as well. I'm also using Ubuntu on a virtual machine, if that even matters anyway. Can anyone help me, I'd appreciate it.
Pre-requirements:
Install Java™ 8.
Install Kepler SR2 (4.3.2) .
The Kepler is still not supporting Java8. What to do?
Open Eclipse
Help > Install New Software…
Enter the following URL into the ‘Work with’ field:
http://download.eclipse.org/eclipse/updates/4.3-P-builds/
Press ‘Enter’
Select category ‘Eclipse Java 8 Support (for Kepler SR2)’
Click ‘Next’
Click ‘Next’
Accept Licence Agreement
Click ‘Finish’
Now jre8 is correctly located.
Now configure JavaFx
Open Eclipse
Help > Install New Software…
Enter the following URL into the ‘Work with’ field:
http://download.eclipse.org/efxclipse/updates-released/0.9.0/site
Press ‘Enter’
Select category ‘Eclipse Java 8 Support (for Kepler SR2)’
Click ‘Next’
Click ‘Next’
Accept Licence Agreement
Click ‘Finish’
It looks like the default java on your system is not java7. What do you get when opening a shell and execute java -version? Solution is to:
A) make java7 the default java
B) start eclipse with -vm
Apparently, you have installed 32bit Eclipse and 64bit JRE/JDK on a 64bit OS. Please use 64bit Eclipse and the problem will be solved. Please make sure JAVA_HOME And JRE_HOME is present in environment variables.
I had the same issue. I tried re-installing Eclipse, but it wouldn't work. I had to completely remove the project and delete all the project files. After that, I re-started eclipse and created the project again. However, this time I made sure the project path included the Java FX library as shown in the screen shot.
Java Build Path
I did this while I was creating the project and then I was able to create the project without any issues. Give this a try.
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