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

  • SEARCH
  • Home
  • 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 3698350
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:58:14+00:00 2026-05-19T04:58:14+00:00

I hope no-one has asked this before (I couldn’t find anything, but that may

  • 0

I hope no-one has asked this before (I couldn’t find anything, but that may just be poor searching). I am compiling by running ant in my root directory. However, I get this error:

class file has wrong version 50.0, should be 49.0

I know this is because it wants Java 1.6, and is using 1.5, but my mac has Java 1.6 as well (I’ve checked in /System/Library/Frameworks/JavaVM.framework/Versions). How can I get ant to run with 1.6 so that I can compile?

EDIT:
I’ve added the correct path of Java 1.6 to /etc/profile, and
export PATH=$JAVA_HOME/bin:$PATH, after this line. Executing java -version gives the correct version (1.6.0), but running ant -v still produces the same error, and states that Java 1.5 is being used.

Does anyone know how I can force ant to use Java 1.6?!

  • 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-05-19T04:58:15+00:00Added an answer on May 19, 2026 at 4:58 am

    One easy way is to set JAVA_HOME environment variable to point to the jdk you want to use.

    There’re many ways to do that. E.g., if you’re on mac/linux, you could add this to /etc/profile

    export JAVA_HOME=/path/to/java
    

    On windows, IIRC, there’s a menu in My Computer/properties.

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

Sidebar

Related Questions

I guess this has been asked before but I can't find something that I
i'm pretty sure that this question has allready been asked (but i didn't find
I hope that this question has not been asked elsewhere, but I'm having difficulty
This question has been asked before, but none that I have reviewed give a
I know this has been asked before (and I will keep researching), but I
I hope this question (or one similar) hasn't been asked before. Sincere apologies if
I'm sure some variation of this question has been asked before but all other,
I know this question has been asked countless times before, but the other threads
I know this has been asked a million times before but i still can't
I think I already know the answer to this one, but i hope maybe

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.