When I open a new directory in intelliJ and create a HelloWorld.java, it asks me to define a Project SDK, and it gives me two options
1.8 (java version "1.8.0_211")
JDK_1.8.0 (java version "1.8.0_202")
One has a bunch of contents: /library/java/jvm/jdk1.8.0_211.jdk/contents/home/jre/....
The other has /Applications/IntelliJ IDEA.app/contents/home/jre/...
Are they the same?
I think the two are too similar for google to return valuable results
You should not use the bundled JetBrains Runtime as your project SDK, it's recommended to use your system JDK to build and run the apps you are developing.
Related
I have downloaded the new eclipse 2022-06 and I wanted to know that what version of Java does it run on. What is the JDK and JRE and how can I create a project to run on Java 7 with a compatible JRE? Where do I select those settings or what do I additionally need to download?
Take a look at the official documentation: Eclipse/Installation
You will find for each version of Eclipse the required JRE/JDK to run it.
Instead, if you are looking for how to run a project with a different JRE/JDK, you can take a look at this guide: How to Change Java Version in an Eclipse Project
I am new with programing and i wanted to install netbeans in my macbook but i kept having this text " 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.”
That means you need the Java Development Kit (JDK). It is important for running files and develop those. You can download the newest version of the JDK under: https://www.oracle.com/java/technologies/javase-downloads.html
If you already have a JDK installed you must change the config file of NetBeans.
We want to use both SWT and JavaFX in an Eclipse plugin within our RCP application. Unfortunately, we're experiencing problems integrating SWT with JavaFX under Java 11. The build environment uses e(fx)clipse 3.5. We're developing against the Community edition of Azul Systems' "Zulu" JDK 11, bundled with Azul's version of OpenJFX.
Formerly, we developed under Java 8. At that point, our build used a compile-time class path referring to jfxswt.jar, which lived in the jre/lib directory of the JDK. We didn't use any special class path settings at run-time.
We are now trying to move to Java 11. There, this JAR has become javafx-swt.jar and lives in the lib directory of the JDK. It no longer seems to be enough to set the class path to refer to this JAR at compile time: it seems to be necessary to do so at run time too. If we don't do this, we get an error (java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas).
As a test, we experimentally embedded javafx-swt.jar within the JAR implementing our Eclipse plugin. We then referred to it in that plugin's .classpath file, and the code worked as expected. Unfortunately, we can't embed the JAR this way for legal and other reasons.
A note on Java modules: javafx.swt does not show up in the output when we issue the --list-module command. We tried running the application using parameters -p /path/to/JDK/lib/javafx-swt.jar --add-modules javafx.swt, but this doesn't seem to solve the problem.
My question: Is there a way to set up the class or module path to allow our Eclipse plugin to find this library in the JRE? Any solution would have to work with whatever JRE the code happens to be run against (I think it is all right to assume lib/javafx-swt.jar will live in that JRE).
Would it help to use a separately-downloaded version of OpenJFX rather than the copy of OpenJFX in our JDK?
Very many thanks ☺
I started a new project that is just a hello world that has the Commons IO v2.4 Apache Library that uses JDK 1.6 but is unable to run after I build the jar. I added it to the Libraries and Modules just fine, and it executes the methods that I took from the libraries fine on Compile time, but I am using JRE 1.7. I took of the methods to prove that it is just the fact that it is interacting with this library. I did nothing else to this new project.
The JDK for the library is 1.6 but is demanding 1.8 JRE. Is there somethign that I'm missing here? I want to let users run my jar with their minimum JRE being 1.6 so I can target more users, but this is throwign an error.
The actual Error that is being thrown is the major.min error of 52.0, which means that it needs to run it at 1.8 JRE to run a simple hello world.
Try manually selecting language level for your project.
Right click project > Open Module Settings:
On right side under sources tab, change language level to required JDK.
Then click on Project tab on left and make sure both JDK version and language version are at correct version.
I am getting this bad version error as shown below. How to fix this. Do I need to have a separate jar file for each version of java?
(source: sourceforge.net)
How to fix this.
Is this a plugin that you created, or did you download it from somewhere?
I've never seen this myself, but I suspect that you are running Eclipse using an older version of Java (e.g. 1.5) and trying to use a plugin that was compiled for Java 1.6. Assuming that is the case you can:
upgrade the JDK used to run Eclipse to 1.6,
try to find a version of the plugin that was compiled for the Java 1.5 platform, or
download the plugin sources and build it for Java 1.5 yourself.
Do I need to have a separate jar file for each version of java?
No. A JAR file built for a Java 1.5 target platform should also work on a Java 1.6 platform. (Just not the other way around ...)
I got similar kind of error once and I was not able to fix it. And I ended up removing the plugin (EMF Plugin) and installing it on a new setup of Eclipse.
Now, I use Yoxos On-demand where you can create/add/remove Eclipse plugins with no effort. This is the best Eclipse customizer I have seen.
You are running on an older version of Java than the code was compiled for.