Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Java runtime error!

  1. #1
    Join Date
    Sep 2012
    Beans
    128

    Question Java runtime error!

    Hello
    I'm trying to run an application and i get this error ...
    Code:
    ~$ webcamstudio
    [warning] /usr/bin/webcamstudio: No JAVA_CMD set for run_java, falling back to JAVA_CMD = java
    Exception in thread "main" java.lang.UnsupportedClassVersionError: webcamstudio/WebcamStudio : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
    How can i fix it?
    Thank you so much
    ---------------------------------------------That was part 1
    ----------------------------------------------
    If you can't help with this please try my other issue...http://ubuntuforums.org/showthread.php?t=2323456
    Thanks
    Last edited by CCgirl6690; May 5th, 2016 at 07:47 PM. Reason: Title modified

  2. #2
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Java runtime error!

    Hello!

    I have modified the title of your thread. A meaningful title rather than something generic like "Help me!" is more likely to get the attention of those who can help.

    Also, I highly recommend that you edit out the second part of your post and create a new thread for that question. It becomes very confusing very quickly when a lot of different people are trying to answer more than one question in a thread. As a rule, please keep each thread to a single issue.

    Cheers!
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  3. #3
    Join Date
    Sep 2012
    Beans
    128

    Re: Java runtime error!

    @Qlll Thank you. I just didnt know how to describe my problem in one line of title.

  4. #4
    Join Date
    Mar 2016
    Location
    Norway
    Beans
    232
    Distro
    Ubuntu Development Release

    Re: Java runtime error!

    You dont say what kind of Java you are running so I'm guessing its java from the official repositories. In my experience many (some) java apps don't run properly on anything but Oracle Java (Original java).

    The way you can get this in Ubuntu is open a terminal and:

    Code:
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt update
    sudo apt install oracle-java9-installer
    This will also install the java plug-in for Firefox.
    20 years ago I ran Gentoo, safe to say I was unemployed an had no wife/children...

  5. #5
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,588
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Java runtime error!

    "Unsupported major.minor version" means that the java version of the runtime is lower than the version used to compile classes, for example if compilation has taken place with Java 8 and you try to run the result on Java 7.

  6. #6
    Join Date
    Sep 2012
    Beans
    128

    Re: Java runtime error!

    Thanks everyone. My java is 7. How can i get 8?

  7. #7
    Join Date
    Sep 2012
    Beans
    128

    Re: Java runtime error!

    Quote Originally Posted by izznogooood View Post
    You dont say what kind of Java you are running so I'm guessing its java from the official repositories. In my experience many (some) java apps don't run properly on anything but Oracle Java (Original java).

    The way you can get this in Ubuntu is open a terminal and:

    Code:
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt update
    sudo apt install oracle-java9-installer
    This will also install the java plug-in for Firefox.
    Hello Sir
    I tried that and i got the followowing errors....
    Besides i have java 7 now and i want 8 and not 9.
    Can oyu please provide commands for 8 and not 9?
    Thanks ,,,
    Code:
    $ sudo add-apt-repository ppa:webupd8team/java
    [sudo] password for none: 
     Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.
    
    More info (and Ubuntu installation instructions):
    - for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
    - for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
    
    Debian installation instructions:
    - Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
    - Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
    
    Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release (it should be released in 2016)! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html
     More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
    Press [ENTER] to continue or ctrl-c to cancel adding it
    
    Error reading https://launchpad.net/api/1.0/~webupd8team/+archive/java: ''

  8. #8
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Java runtime error!

    See post #4.

    However, I would substitute java8 instead of java9, given that the release date for Java 9 is this coming September.

    Come to think of it, I think I read somewhere that the Java 9 release has been pushed back to 2017.
    Last edited by QIII; May 5th, 2016 at 06:55 PM.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  9. #9
    Join Date
    Sep 2012
    Beans
    128

    Re: Java runtime error!

    Quote Originally Posted by QIII View Post
    See post #4.

    However, I would substitute java8 instead of java9, given that the release date for Java 9 is this coming September.

    Come to think of it, I think I read somewhere that the Java 9 release has been pushed back to 2017.
    How can i choose java 8 in that command?
    Can you please provide commands for it?
    Thanks

  10. #10
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Java runtime error!

    In the third command, simply replace "java9" with "java8".
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •