Unable to run IntelliJ IDEA CE 12 with Ubuntu Oracle Java 8

10,199

Solution 1

It's a known issue, JDK 8 has removed a method that IDEA is using. It was fixed in IDEA 12.1.5.

We recommend using supported and released JDK versions to avoid problems, like JDK 1.7.

Solution 2

You may already have one instance of IDEA running. Go ahead and check:

$ ps -ef | grep idea

Use kill or kill -9 to stop that instance then try restarting it.

Share:
10,199

Related videos on Youtube

Ramus
Author by

Ramus

Updated on June 21, 2022

Comments

  • Ramus
    Ramus about 2 years

    I am using Ubuntu 13.04 and Oracle Java 8.

    I have set the JAVA_HOME and PATH variables.

    Here is the terminal output of trying to run IntelliJ:

    darren@ubuntu:~$ /opt/intellij-idea-ce/bin/idea.sh
    Java HotSpot(TM) 64-Bit Server VM (build 25.0-b42, mixed mode)
    Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
    Failed to clear URL cache
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:491)
        at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:190)
        at java.lang.Thread.run(Thread.java:724)
    Caused by: java.lang.NoSuchMethodError: sun.reflect.Reflection.getCallerClass(I)Ljava/lang/Class;
        at com.intellij.openapi.util.IconLoader.getIcon(IconLoader.java:116)
        at com.intellij.openapi.application.impl.ApplicationInfoImpl.readExternal(ApplicationInfoImpl.java:491)
        at com.intellij.openapi.application.impl.ApplicationInfoImpl.getShadowInstance(ApplicationInfoImpl.java:426)
        at com.intellij.ui.AppUIUtil.getAppIconImages(AppUIUtil.java:66)
        at com.intellij.ui.AppUIUtil.updateWindowIcon(AppUIUtil.java:49)
        at com.intellij.idea.MainImpl.start(MainImpl.java:46)
        ... 6 more
    ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:491)
        at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:190)
        at java.lang.Thread.run(Thread.java:724)
    Caused by: java.lang.NoSuchMethodError: sun.reflect.Reflection.getCallerClass(I)Ljava/lang/Class;
        at com.intellij.openapi.util.IconLoader.getIcon(IconLoader.java:116)
        at com.intellij.openapi.application.impl.ApplicationInfoImpl.readExternal(ApplicationInfoImpl.java:491)
        at com.intellij.openapi.application.impl.ApplicationInfoImpl.getShadowInstance(ApplicationInfoImpl.java:426)
        at com.intellij.ui.AppUIUtil.getAppIconImages(AppUIUtil.java:66)
        at com.intellij.ui.AppUIUtil.updateWindowIcon(AppUIUtil.java:49)
        at com.intellij.idea.MainImpl.start(MainImpl.java:46)
        ... 6 more
    ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
    java.lang.AssertionError: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
        at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:55)
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:65)
        at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:194)
        at java.lang.Thread.run(Thread.java:724)
    
    Exception: java.lang.AssertionError thrown from the UncaughtExceptionHandler in thread "Idea Main Thread 12.1#IC-129.161, eap:false"
    
  • Shane
    Shane almost 10 years
    Someone needs to tell Jetbrains this as well, since they recommend 8 in this tutorial wiki.jetbrains.net/intellij/…
  • CrazyCoder
    CrazyCoder over 9 years
    @Shane This issue doesn't apply to the current IDE versions, it was fixed more than a year ago.
  • matbrgz
    matbrgz about 7 years
    How did you conclude that that might be the reason?
  • Cory Klein
    Cory Klein about 7 years
    Four years ago? Beats me.
  • matbrgz
    matbrgz about 7 years
    I am curios because I have never seen a NoSuchMethod error being fixed by restarting the program.
  • Cory Klein
    Cory Klein about 7 years
    You have now! :D