Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9086181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:25:32+00:00 2026-06-16T21:25:32+00:00

I recently installed the open-jdk 7 in my ubuntu server. But the version is

  • 0

I recently installed the open-jdk 7 in my ubuntu server.
But the version is still displayed as :

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
OpenJDK Server VM (build 20.0-b12, mixed mode)

And if i try to run a java program i get the foll exception :

Exception in thread "main" java.lang.UnsupportedClassVersionError: hello : Unsupported major.minor version 51.0

Which is the consequence of compiling the program with a higher jdk and trying to run in a lower one.
How can i correct this.

Edit:But when i do javac -version I get javac 1.7.0_09 as the response.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T21:25:33+00:00Added an answer on June 16, 2026 at 9:25 pm

    It sounds like:

    1) You have multiple versions of Java installed (which is perfectly OK to do!) … and …

    2) “javac” is picking up the correct version … but “java” is picking up a different version.

    SOLUTION:

    update-java-alternatives

    For example, look at this link:

    https://askubuntu.com/questions/64329/how-to-replace-openjdk-6-with-openjdk-7

    # EXAMPLE:
    $ update-java-alternatives -l
    java-1.6.0-openjdk 1061 /usr/lib/jvm/java-1.6.0-openjdk
    java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64
    $ sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am on Ubuntu x64 bit running: java version 1.6.0_18 OpenJDK Runtime Environment (IcedTea6
I have installed Crystal Reports 8.5 on my computer recently. But When I open
I recently installed Eclipse IDE for Java Developers: Indigo Service Release 2, on Ubuntu
I've connected to a linux-based server using ssh. Recently, I've installed JDK using following
I recently installed KDevelop 4 for C++ development on my Macbook Pro running Ubuntu
I recently installed Ubuntu Jaunty and I'm encountering a problem when I try to
I have recently installed VS 2008. Now I want to open my VS2010 project's
I recently installed PHP APC on our server via our WHM panel (Web Host
I've recently done a fresh install of Ubuntu 11.10, installing the latest version of
I recently installed silverlight 3 tools to my VS 2008 SP1 environment, now when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.