anthraxx/intellij-awesome-console

Error on IntelliJ Start: Major.Minor 51.0

Closed this issue · 9 comments

I'm sure this has something to do with Awesome Console being compiled on a different JDK than what I have set as default. I'm installing it within IntelliJ though so I'm not sure if it's IntelliJ screwing up when importing or when compiling. Either way, here's what I get when trying to enable the plugin:

Plugin 'awesome.console' failed to initialize and will be disabled.  Please restart IntelliJ IDEA.

com.intellij.diagnostic.PluginException: awesome/console/config/AwesomeConsoleConfig:

Unsupported major.minor version 51.0 [Plugin: awesome.console]
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:130)
    at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(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.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:426)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.loadClasses(ComponentManagerImpl.java:416)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$000(ComponentManagerImpl.java:402)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:107)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:86)
    at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:110)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:511)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:493)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:158)
    at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:46)
    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.dispatchEvent(IdeEventQueue.java:364)
    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: awesome/console/config/AwesomeConsoleConfig : 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:213)
    at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:209)
    at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:185)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:124)
    ... 30 more

By default I have the JDK 1.7.0_75 with IntelliJ version 14 CE. Is there something I need to change (or perhaps try installing the code directly from Github)?

Sorry, didn't see that you already addressed a similar issue. Closing now to be archived and removed if need be

@kamakazikamikaze just out of curiosity: did you overlook something and run IntelliJ with java6 by accident? Because major.minor version 51 should be indeed java7 compatible 😄
If you are accidentally running java6 to start IntelliJ we highly recommend to update the JRE as java6 is considered dangerous and unsupported by upstream (oracle).

No, I actually have my system set to Java8. After having some issues with Minecraft wanting to use the system-derived default Java6 I had to do some harsh overriding and changes.

Since your awesome-console.iml sets the requirement of Java7 it may be conflicting with the system default Java8

@kamakazikamikaze hm that sounds strange, can you double-check that the minecraft changes related to java6 did not affect your IntelliJ? (should be written somewhere in the IntelliJ about window). Java compiled bytecode should always be downwards compatible (its just not upwards compatible).
I'm also using java8 to run IntelliJ so i guess it should work with java8 pretty well 😋

@anthraxx I'll check. It should be noted that I am using OS X 10.10.x

In Terminal java -version outputs:

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

/usr/libexec/java_home -V shows all installed JDKs:

    1.8.0_31, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
    1.8.0_20, x86_64:   "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home
    1.7.0_75, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
    1.7.0_71, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
    1.7.0_67, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
    1.6.0_65-b14-466.1, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-466.1, i386:   "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

I even opened the IntelliJ package (the app bundle if you're not intimately familiar with OSX) and gone to Contents -> Bin -> idea.properties and modified JVMVersion=1.6* to JVMVersion=1.6+ with no success

@kamakazikamikaze I think idea.properties should be something like JVMVersion=1.7* or JVMVersion=1.7+ ?
As i'm not familiar with OSX i can't give you support about how your environment starts IntelliJ.

But what i asked for, please check your IntelliJ used JVM explicitly under:
open Intellij IDEA -> Help -> About and please tell what is written in the small popup under JRE: and JVM:

It's JRE 1.6.0_65. I'll manually change JVMVersion to 1.7+ but having read this bug tracker I was skeptical to do so in case I "break" IntelliJ like others have. I'll check it out.

Sorry about all the fluff and thanks for responding even though it's not your problem.

Ok, I got it to work. For legacy/archiving reasons I'll leave this link on how to change IntelliJ to 1.7* so other Mac OS X developers can work around this issue

EDIT: I would advise using 1.7+ instead of 1.7* as 1.8.0_* has a great performance boost

@kamakazikamikaze sure, you're welcome. I always try to help people wherever I can. We may consider adding some infos to the README and description that java >= 7 is required.

Also thanks for providing that link, we may point other users to this.
Currently I'm confident that it will run smooth.