Can't run Plugin in Mac OS
已回答
Hi
I have developing an IntelliJ IDEA plugin But I can't run or debug.
When run/ debug it is opening another IDE and prompt to select or open projects.
After creating one java(tried java, kotlin, plugin) project it shows initializing plugin org.jetbrains.android. and it is not opening anything.
below I am attaching screenshots for the same.
The working project, It is tested in windows. (released tag)
When trying to run the project
Thanks in advance
请先登录再写评论。
Try running on Java 8 instead of Java 11.
I can't find any other plugin sdk there
IntelliJ IDEA Community Edition IC-183.5912.21
This is the current one
How to find the version 8 SDK?
Install JBR8 or Oracle Java 8, see https://intellij-support.jetbrains.com/hc/articles/206544879 for the https://bintray.com/jetbrains/intellij-jdk/ links.
Now That problem is fixed, But anyway my plugin is not starting. It shows some error in the plugin. But same code, in Windows it is working perfectly.
Please post full stacktrace from idea.log of test instance.
com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing plugin com.godwin.json.parser
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:253)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
at com.intellij.openapi.components.impl.ComponentManagerImpl.registerComponents(ComponentManagerImpl.java:390)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:81)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:264)
at com.intellij.openapi.project.impl.ProjectManagerImpl.initProject(ProjectManagerImpl.java:285)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadProjectWithProgress(ProjectManagerImpl.java:549)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$200(ProjectManagerImpl.java:60)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.compute(ProjectManagerImpl.java:495)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.compute(ProjectManagerImpl.java:492)
at com.intellij.openapi.progress.Task$WithResult.run(Task.java:320)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:442)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:592)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.intellij.diagnostic.PluginException: While loading class com.jsonparse.ParserComponent: com/jsonparse/ParserComponent has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 [Plugin: com.godwin.json.parser] [Plugin: com.godwin.json.parser]
... 25 more
Caused by: com.intellij.diagnostic.PluginException: While loading class com.jsonparse.ParserComponent: com/jsonparse/ParserComponent has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 [Plugin: com.godwin.json.parser]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:135)
at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:60)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:47)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.intellij.openapi.components.impl.ComponentManagerImpl.registerComponents(ComponentManagerImpl.java:371)
... 22 more
Caused by: java.lang.UnsupportedClassVersionError: com/jsonparse/ParserComponent has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:295)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:291)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:260)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:132)
... 28 more
Rebuild the plug-in with Java 8 target level.
Hi Serge,
I didn't get the point. In the above comment, I put a screenshot of Project structure window. In that, I used IntelliJ IDEA Community Version (Java 1.8.0_201) with project level language 8- Lambdas, type annotations etc.
Any other way to build? Please elaborate.
I decompiled one class and It shows byte code version(52 java 8)
Or is there any issue with my mac's JRE?
According to the error, the jar file of the plug-in you are loading in the IDE contains classes that were compiled with Java 11 target level.
It could be either the core classes of the plug-in or some library you are using in your dependencies. You need to rebuild all the classes with Java 8 target and try again.
Try to delete the sandbox directory in case it contains some old plug-in classes previously built with Java 11.
Ok Serge
Now the problem fixed.
What I did is, removed the production/ out folder and imported as a new project. Then overwrite the .idea folder.
Thanks for your time.