IntelliJ JDK not installed - intellij-idea

I just installed intelliJ and tried to import an eclipse project. I have a jre installed but no jdk. It doesnt want to compile without a jdk. What am I doing wrong? Do I need one?

Yes, you need it. JRE required only to run java programs. JDK - for development.

Related

Gradle sync fails when creating a new Kotlin project with default settings in freshly installed IntelliJ IDEA

I wanted to learn some Kotlin so I installed IntelliJ IDEA, created a new Kotlin project with the default settings and then the IDE tells me that Gradle sync has failed. Here's the error message:
Could not open init generic class cache for initialization script 'C:\Users\<my_name>\AppData\Local\Temp\wrapper_init.gradle' (C:\Users\<my_name>\.gradle\caches\6.8\scripts\344chmz69zyndatc9zp4rwux5).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
I googled the error and got a suggestion to try a different JDK version. Tried a few different versions but that didn't help. Then I installed the IDE on my laptop to see if that works and there I don't get any errors. As far as I can tell, the project settings were exactly the same on both machines but obviously something is messed up on my desktop computer. Both have Windows 10.
I'm also not at all familiar with the Java/Kotlin ecosystem or the build tools or whatever so I honestly have no idea how I could even begin fixing some Gradle errors. I don't really even know what Gradle is or what it does. So can you help me?
First, check the version which the project uses: File > Project Structure. Or, during project creation (https://i.stack.imgur.com/SXIzQ.png / example with SDK 1.8)
It has to be the same as JDK / SDK installed on your computer.
To verify java version installed in your terminal:
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~19.10-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

SceneBuilder not loading in Intellij

Scene Builder does not open in my Intellij. I've tried different JDK versions, but I just cant get it to load up in my IDE. It was working before I had to reinstall my OS. I don't get an error or anything, the Scene Builder window is just blank. It works if I run it standalone though.
I'm on Ubuntu 20.04.1. Using JDK 11 and Scene Builder for JDK 11. I tried with JDK 14 and I still get the same issue. I attached an image of the screen I get.
Any help? Intellij asked me to download the Scene Builder kit, then it asked me to download JavaFX. I did. Then I ended up here. JavaFX was included as a global library though so I didn't quite understand that.
What should I do?
You should go to setting-plugins- search for javaFX and install JAvaFX Runtime for Plugins.
Restart again and the problem will be solved.
The solution for me was 'Settings> Plugins> search JavaFX' to enable and disable this plugin, then restart intellij idea
You can run the SceneBuilder from outside Intellij and simply select your FXML, which works better in some cases, because there are some problems with the BuildIn Version (at least on Windows)
You can download it from Gluon.
2023 Answer
I am currently using IntelliJ Ultimate.
Build #: 223.8617.56
Runtime version: 17.0.5+1-b653.25 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
To fix the missing SceneBuilder issue, I completely disabled the JavaFX Runtime for Plugins plugin and restarted IntelliJ.
When I did that, I received 2 banners to install JavaFX and the proper JDK.

Netbeans not opening New Project Dialog

After installation, Netbeans open fine, Open Exiting Project, Or Existing File works. However Netbeans doesn't show New Project or New File Dialog, whether selecting it from menu or from the toolbar. Netbeans version is 8.2, Ubuntu version is 16.04. It is a fresh install, and Oracle jdk-9 installed.
update-alternatives point to oracle-java.
Uninstalled and Reinstalled Netbeans, without any success.
Any suggestions.
Had the same problem with JDK 9, switched back to JDK 8
Change netbeans.conf file and adjust JDK.
Netbeans 8.2 seems to have some problem with JDK11 as well. Do not know whether it has been fixed, since even after dowloading JDK11 the problem persists.
Without deleting the newer ones you can set the path to the previous versions i.e. JDK8 and it works.
Open the following file
/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
Look for #netbeans_jdkhome=
set the path to the older version of java:
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home"
and restart the netbeans.
Funny thing but i changed the jvm in update-alternative to open-jdk jvm and it starts working.
I closed netbeans 8.2, commented out the reference to the JDK home in the netbeans.conf file, in the root of the netbeans 8.2 folder
# netbeans_jdkhome="C:\Program Files\Java\jdk-9.0.4"
When I restarted the navigation pane that were previously missing appeared as they should.
What worked for me was:
In Program Files, go to Java
For me, my computer has already downloaded the latest JDK. Check to see if there are JDKs in your folder
Delete the duplicate/latest JDK's
For me, this problem started after a Mac OS upgrade to 10.15.4.
None of the solutions worked.
I uninstalled NetBeans and reinstalled it, and it worked.

Dart 1.12.0 Intellij upgrade issues

I have updated the dart-sdk and dartium but when I go into intellij to update the plug-in, It will tell me there is not a newer version from 141.1586 when 142.4509 is the latest version. So I have tried to download and install the plugin manually but I get an error "Plugin 'Dart' is incompatible with this installation". I have even gone as far as shutting down Intellij IDEA 14.1.4 and overwritting the files in the plugin directory (which didn't work). Does anyone know what I need to do to fix this issue?
I am running Windows 10 64bit
The latest Dart plugin releases that have version 142.* are compatible only with IntelliJ IDEA 15 EAPs.

IntelliJ always builds for Java 1.7

I have my ANT configured to use a 1.6 JDK, my ENV variables JRE_HOME and JDK home both point to JDK6.
If I modify the JDK 6 folder name in my File explorer then my ANT build fails, cannot find JDK, so I know for sure it is using the correct JDK. However the generated clases are always compiled against java 1.7. Why i this? (My generated classes will only run on a 1.7 jre, I get version error if i run on a 1.6 JRE) All my project/module settings are pointing to 1.6 jdk.
Looks like not all of your Module/Project settings point to JDK 1.7 or you are using in-process javac option in Settings | Compiler while running IDEA under JDK 1.7.
Also check additional javac command line options, it should not contain options like -source 1.7 -target 1.7.