Exception: Unsupported major.minor version 51.0
peterpp opened this issue · 4 comments
I get this exception very often:
cz/juzna/intellij/nette/NetteObjectFieldsCompletionContributor : Unsupported major.minor version 51.0 [Plugin: Nette framework helpers]: cz/juzna/intellij/nette/NetteObjectFieldsCompletionContributor : Unsupported major.minor version 51.0 [Plugin: Nette framework helpers]
com.intellij.diagnostic.PluginException: cz/juzna/intellij/nette/NetteObjectFieldsCompletionContributor : Unsupported major.minor version 51.0 [Plugin: Nette framework helpers]
at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:130)
at com.intellij.ide.plugins.cl.PluginClassLoader.a(PluginClassLoader.java:77)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at com.intellij.openapi.extensions.AbstractExtensionPointBean.findClass(AbstractExtensionPointBean.java:42)
at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:63)
at com.intellij.openapi.extensions.CustomLoadingExtensionPointBean.instantiateExtension(CustomLoadingExtensionPointBean.java:45)
at com.intellij.lang.LanguageExtensionPoint.access$000(LanguageExtensionPoint.java:28)
at com.intellij.lang.LanguageExtensionPoint$1.compute(LanguageExtensionPoint.java:42)
at com.intellij.openapi.util.NotNullLazyValue.getValue(NotNullLazyValue.java:36)
at com.intellij.lang.LanguageExtensionPoint.getInstance(LanguageExtensionPoint.java:52)
at com.intellij.openapi.util.KeyedExtensionCollector.buildExtensions(KeyedExtensionCollector.java:145)
at com.intellij.codeInsight.completion.CompletionContributor$MyExtensionPointManager.buildExtensions(CompletionContributor.java:265)
at com.intellij.codeInsight.completion.CompletionContributor$MyExtensionPointManager.buildExtensions(CompletionContributor.java:250)
at com.intellij.openapi.util.KeyedExtensionCollector.forKey(KeyedExtensionCollector.java:112)
at com.intellij.codeInsight.completion.CompletionContributor.forLanguage(CompletionContributor.java:247)
at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.a(CodeCompletionHandlerBase.java:207)
at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.access$000(CodeCompletionHandlerBase.java:73)
at com.intellij.codeInsight.completion.CodeCompletionHandlerBase$1$1.run(CodeCompletionHandlerBase.java:173)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:981)
at com.intellij.codeInsight.completion.CodeCompletionHandlerBase$1.run(CodeCompletionHandlerBase.java:176)
at com.intellij.openapi.command.impl.CommandProcessorImpl.runUndoTransparentAction(CommandProcessorImpl.java:330)
at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.invokeCompletion(CodeCompletionHandlerBase.java:180)
at com.intellij.codeInsight.editorActions.CompletionAutoPopupHandler.invokeCompletion(CompletionAutoPopupHandler.java:105)
at com.intellij.codeInsight.AutoPopupController$3.run(AutoPopupController.java:126)
at com.intellij.codeInsight.editorActions.CompletionAutoPopupHandler$2$1.run(CompletionAutoPopupHandler.java:127)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:346)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.UnsupportedClassVersionError: cz/juzna/intellij/nette/NetteObjectFieldsCompletionContributor : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:189)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:185)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:161)
at com.intellij.ide.plugins.cl.PluginClassLoader.b(PluginClassLoader.java:124)
... 45 more
I have this problem too and I suppose you are on a Mac.
What's the output of java -version
? I believe it's 1.6 ...
Because Apple disabled Oracle's Java and OS X is using (defaultly) only Apple's version of Java 1.6 (6) in system, PhpStorm's default settings on Mac also use Java 6.
But this plugin is (as I suppose) compiled for a different (newer) Java version, so it throws that "Unsupported major.minor version 51.0"
IMHO, the correct solution is compiling of the plugin for Java 6 (because, PhpStorm on Mac runs defaultly on Java 6)
Alternative user's fix/hack is by updating Java, which is not as easy as it looks, because Apple is using it's own version of Java (6) and installed Java SE from Oracle doesn't override system settings to use Java system wide.
The most simple way is to install JDK 8, which overrides the system settings and because PhpStorm also runs on 1.6, user has to change settings of the PhpStorm, to run with Java 8 with editing the Info.plist in PhpStorm package like this
<key>JVMVersion</key>
<string>1.8*</string>
But as I see it, PhpStorm's UI is not much prepared for Java 8 (some UI components are not well displayed or placed), because it still counts with Java 6.
Right, I am on Mac. Output of java -version
is:
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
but you are right, phpStorm is using 1.6 instead of 1.8.
However, I've just upgraded phpStorm to brand new 8.0.1 version and it seams that there are no more exceptions.
... than you are happier than me. I've updated to 8.0.0 when it comes out, edited Info.plist to use 1.8 (because it runs on 1.6). But updating to 8.0.1 throws away my (edited) configuration and overrided Java version back to the 1.6 ... btw some UI is misplaced while running on Java 8 (deep dialogs), that's why I think the most correct solution is compiling the plugin for Java 6, because phpStorm on Macs runs on that version.
@peterpp @jirismika this issue is really old. If you have still problems, please reopen it.