Boot JDK for running Idea Plugin target

Hi, 

Is there is a way to tell idea runner to use embedded JDK instead of installed one while running plugin target ? . As recent Oracle JDK 8u201 causes menus not working. Setting JRE in run dialog doesn't have any affect. In console message I can see that JVM java is used to start for debugger. 

Thank you,

Demyan

14 comments
Comment actions Permalink

Are you using "Plugin" run configuration from DevKit? What version of IntelliJ IDEA are you using? Switching JRE does work for me here.

0
Comment actions Permalink

Hi Yann, 

I use 2018.3 Community and "Plugin" run configuration. In it I set JRE to /Applications/IntelliJ IDEA CE.app/Contents, but when running plugin under debug it ends with running idea under system JDK like this:
/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:64628.........

0
Comment actions Permalink

Your IntelliJ Platform SDK "internal Java Platform" should point to the bundled JetBrains JDK instead (point to /Applications/IntelliJ.app/Contents/jdk/Contents/Home)

0
Comment actions Permalink

Hi Yann, 

Are you referring Platform Settings->SDKs, my `Intellij Platform Pluggin Sdk` ? 
its set to /Applications/IntelliJ IDEA CE.app/Contents

When I try changing it to /Applications/IntelliJ.app/Contents/jdk/Contents/Home I receive "The selected directory is not valid home for Intellij Platform Plugin SDK"

0
Comment actions Permalink

same error if I try to create JDK for this location (/Applications/IntelliJ.app/Contents/jdk/Contents/Home )

0
Comment actions Permalink

The IDE stopped recognizing the bundled JDK as a valid JDK a while back. I never investigated what files are missing from the bundled JDK that cause this but create a hybrid JDK consisting of bundled JDK and files from Oracle JDK (1.8u152 or close to the version of the OpenJDK) to fill in the missing files.

I have an old blog post on this so the versions and paths need to be adjusted for current release but it should still apply. https://vladsch.com/blog/12 

The result is a bundled JDK which the IDE recognizes as valid and has the benefit of better font rendering and bug fixes of the bundled JDK.

 

0
Comment actions Permalink

Please try again, "Internal Java Platform" can be set to bundled JDK for me.

-1
Comment actions Permalink

Hi Yann, 

I can see there only JDKs I configured. Same time as mentioned above I can't create JDK configuration with bundled JDK path. 

How "JB JDK" is  defined ? What is its JDK home path ? 
Also you use Idea 2019.1 while I use 2018.3 CE

 

Reagards,

Demyan

0
Comment actions Permalink

"JB JDK" is plain JDK with path /Applications/IJ.app/Contents/jdk/Contents/Home

 

0
Comment actions Permalink

Yann as mentioned above it doesn't work, check comments above, also one from Vladimir. 

0
Comment actions Permalink

Sorry, indeed reproduced with default installation of IJ. It worked with my local dev-installation, though. Will investigate further.

0
Comment actions Permalink

@Yann, any progress on investigation? I am running into the same problem - my local Sandbox AppCode IDE does not run under JB SDK environment. I have a Gradle Project.


The following suggestion did not work for me because I have a Gradle Project:
https://stackoverflow.com/questions/55783215/intellij-plugin-development-freezes-target-intellij-instance/55783247

And I don't see JB JDK as an option under "Internal Java Platform". There's only one option - 1.8.

Also tried putting `appcode.jdk` file with correct JB JDK path to build/sandbox config folder as well cache/sandbox.

Nothing works. Sandbox IDE keeps looking into the default JRE and keeps freezing in a minute after its launch. Exactly the behavior described at the stackoverflow link posted above.

0
Comment actions Permalink

Dmitry Goliy, " I have a Gradle Project." using "runIde" has these options https://github.com/JetBrains/gradle-intellij-plugin/#running-dsl

1
Comment actions Permalink

Thank you @Yann! Missed that part of the documentation.

runIde {
jbrVersion = 'jbrex8u152b1402.1'
}

Worked like a charm!

0

Please sign in to leave a comment.