How to run IntelliJ plugin written in Java 8 on OSX? - java

I've developed an IntelliJ plugin in Java 8 on OSX. During the development everything worked, I was able to run a test instance of IntelliJ with my plugin preloaded without any issues.
However, after I've built my plugin and tried to install it in the real IntelliJ I get an error saying "Unsupported major.minor version 52.0", which clearly means that IntelliJ is running on some older Java. Indeed it seems it's running on Java 6.
I tried changing JVMVersion in Info.plist, but the application wouldn't start afterwards. What I can't understand is that the test instance would run smoothly so it would seem running IntelliJ on Java 8 is perfectly possible.
But how to do it?

You should be editing idea.properties instead of the plist. More info at IntelliJ support: https://intellij-support.jetbrains.com/entries/27854363-IDE-doesn-t-start-after-updating-to-Mac-OS-Yosemite-or-Mavericks

Related

IntelliJ Cannot start under Java 1.8.0: Java 11 or later is required

I had some problems with JRE versions, so I tried to change it using the plugin Choose Runtime. I changed it to Java 1.8.0_112-release-287-b2. Now, when trying to start IntelliJ, i get an unsupported Java version error: Cannot start under Java 1.8.0_112-release-287-b2: Java 11 or later is required. I have tried to modify the runtime path in the ide64.exe.jdk file, but it seems like the old jdk IntelliJ ran on has been deleted. I also tried reinstalling intellij, no luck either. Anyone know how to get back the JDK? do I just download it from oracle and install it in the IdeaIC2020.3\jdks\ folder?
Thanks,
Jakob
I went to the jdks folder and deleted all contents. This fixed the issue. IntelliJ started without a problem.

Gradle Sync Failure in Fresh IntelliJ IDEA Install

I have a new MBP (16" 2019). Downloaded a fresh copy of IntelliJ IDEA Ultimate 2020.1.1. Used SDKMan to install Java 11-zulu and latest Gradle, 6.4. Went to File->New-Project and chose Gradle. When it loads, I get a Sync error and gradle won't process in IntelliJ correctly. Everything works fine from the CLI. I tried with importing an existing gradle project, different Java and Gradle versions, all give the same vague error.
idea.log
Caused by:
org.gradle.launcher.daemon.client.DaemonConnectionException: The newly
created daemon process has a different context than expected. It won't
be possible to reconnect to this daemon. Context mismatch: Java home
is different.
I've seen other questions about this but none of those solutions are working for me and I've never had this issue before, 10 years of using IDEA on OSX.
The issue is likely caused by the incorrect Java home path specified for the JDK in IntelliJ IDEA. Make sure it points to the correct location like this:
/Users/rob/.sdkman/candidates/java/14.0.1-zulu/zulu-14.jdk/Contents/Home
On macOS /Contents/Home part of the path is significant.
If some one are using macos with Sdkman use this version: sdk install java 8.0.322-librca for sdk 1.8 or other correlated version from librca, because sdk fom zulu i always had this same problema in intellij idea with java/kotlin and gradlew...

Project facet Java version 1.8 is not supported, Tomcat 9, Eclipse Oxygen

I am currently having an issue with setting up a Tomcat server to run a Java 8 servlet. I've included snippets of the settings that are relevant to the issue. As you can see, I have jdk-1.8 installed and bound to the project build path. I have spent hours trying to figure out why Eclipse keeps saying Java 1.8 is not supported by Tomcat 9. If you look in at the project facets runtimes, you'll see that the server shows jre-1.7 even though I have set the path to the jre-1.8. I'm convinced this is where the issue is, but I have no idea how to fix it. I've tried setting the same Tomcat server up on another machine with no problems so I'm confused as to why it isn't working on this one. The major difference between the two is that the one that works properly shows jre-1.8 in the runtimes.
I am using Eclipse Oxygen on Windows 10
So it looks like I had Java 1.7 still installed in my machine (Java 1.8 was there too) so I went ahead and uninstalled the older version and then I reinstalled Eclipse Oxygen. Everything works now. The runtimes are showing jre-1.8. I have not a single clue exactly why it wasn't working before; but if you have this same issue, try giving this a shot.

I just installed eclipse, why won't eclipse run any of my code?

I cannot get eclipse to run any code whatsoever. I have just begun using eclipse and think I may not have installed the jre/jdk properly because I have tried running different code and always get the same error. This is the error message I got as soon as I opened the workbench and tried to run something the first time:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module tutorial1 not found
Everything appears to be there in my file system, but then again I have never done a successful build so I'm not entirely sure how it should look. I'm just getting started learning java development and this is rather discouraging. Why won't eclipse run any code? Are there other steps I should have taken before installing eclipse?
I have tried running different code and always get the same boot layer message. I have also tried installing multiple versions of the jre, jdk, and eclipse and it still doesn't work.

Can't run service builder (liferay 6.2)

I'm running Eclipse Neon (tried with Mars too) and Liferay 6.2
I try to run the service builder but:
If I run with java 8 (unsupported, I know), it says it requires a 1.6 compliant JVM. Correct.
If I run with java 7, it says "Unsupported major.minor version 52.0". That's my nightmare.
Yes, I've cleaned everything before. In fact, I created a brand new project, in an Eclipse with only jre7 installed, pointing all to jre7 (compiler, facets...)
Eclipse is running over jre8, but can't run on jre7 because some of the plugins requires jre8. Anyway, some days ago it do worked in this Eclipse, so it's not the problem.
Service Builder might pull code from more than your Eclipse project setup - e.g. from the running Liferay installation that the plugin sdk points to.
I've not heard of a com.aspr.seu package in Liferay - is that your own, or unknown to you as well?
If service builder ran in the past (e.g. with Java 8), it created a yourprojectname-service.jar - that might be one that is pulled into the build process and that you might not have cleaned yet. You definitely have a class that was built with Java 8 on the classpath, you'll just need to find it. It might help to know that servicebuilder is executed through an Ant task outside of Eclipse, thus it might not be enough to search through all of the files that Eclipse has configured on its classpath, but rather on what's configured for the Plugins-SDK

Categories

Resources