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 8776005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:56:46+00:00 2026-06-13T18:56:46+00:00

I am following this tutorial: http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html But I have run into some problems. Here

  • 0

I am following this tutorial: http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html

But I have run into some problems.

Here is what I have done (the code is in ~/src/ant-demo/oata/):

javac -d ~/src/ant-demo/build/classes ~/src/ant-demo/oata/Hello*

java -cp ~/src/ant-demo/build/classes oata.HelloWorld

Here is the error that I get:

Exception in thread "main" java.lang.UnsupportedClassVersionError: oata/HelloWorld : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: oata.HelloWorld. Program will exit.

I am using Ubuntu with openjdk-7-jdk.

UPDATE

#java -version

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

#which java
/usr/bin/java
  • 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-13T18:56:47+00:00Added an answer on June 13, 2026 at 6:56 pm

    It seems you’re compiling with JDK7, but running with a previous version. Use java -version and which java to know which version of java you’re actually using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following this tutorial http://netbeans.org/kb/docs/javaee/maven-osgiservice-cdi.html I have managed to create a simple OSGI bundle and
I'm following this tutorial http://www.vogella.com/articles/AndroidIntent/article.html for having some data transfered to parent activity by
I'm following this tutorial http://aishack.in/tutorials/sudoku-grabber-with-opencv-detection/ But it's not fot the iOS. some methods described
Hi I am following this tutorial: http://www.mastertheboss.com/hibernate/182-hibernate-tutorial.html I have done all the code so
i am following this tutorial: http://www.vogella.de/articles/Android/article.html#first_start but when i come to step 10.7 i
I'm following this tutorial (http://lightbird.net/dbe/cal1.html) to build a calendar app, but I can't get
I've been following this tutorial http://book.cakephp.org/2.0/en/development/rest.html for restful web services integration with cakephp over
I've been following this tutorial: http://developer.android.com/resources/tutorials/views/hello-mapview.html but in onTap mContext is throwing a NullPointerException..
I have been following this tutorial http://www.android10.org/index.php/articleslibraries/291-twitter-integration-in-your-android-application I entered these details for the consumer_key
I'm following this tutorial: http://hughevans.net/2009/03/10/thinking-sphinx-dreamhost I'm run into an issue when I run: ./configure

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.