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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:33:27+00:00 2026-05-27T00:33:27+00:00

I’m trying to compile my project with ant build, but I’m getting this error:

  • 0

I’m trying to compile my project with “ant build”, but I’m getting this error:

Unable to locate tools.jar. Expected to find it in
/usr/lib/jvm/java-6-openjdk/lib/tools.jar

I searched tools.jar and it is just in /usr/lib/jdk1.7.0_01/lib/tools.jar.

Is a good idea to create a symlink like this below?

ln -s /usr/lib/jdk1.7.0_01/lib/tools.jar
/usr/lib/jdk1.7.0_01/lib/tools.jar

Well.. actually I tried to create that symlink, but then I’m getting this error:

BUILD FAILED /home/me/code/StockWatcher/build.xml:29:
java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main :
Unsupported major.minor version 51.0

So I don’t know if this last error is because the symlink…

Javi

  • 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-27T00:33:27+00:00Added an answer on May 27, 2026 at 12:33 am

    No creating the symlink is not a good idea (mixing two JDKs)

    Ant is using the same Java version used to run Ant itself. If you want to use Java 1.7 you should instruct Ant. From the javac Task documentation:

    It is possible to use different compilers. This can be specified by
    either setting the global build.compiler property, which will affect
    all tasks throughout the build, by setting the compiler
    attribute, specific to the current task or by using a nested
    element of any typedeffed or componentdeffed type that implements
    org.apache.tools.ant.taskdefs.compilers.CompilerAdapter. Valid values
    for either the build.compiler property or the compiler attribute are:

    • classic (the standard compiler of JDK 1.1/1.2) – javac1.1 and javac1.2
      can be used as aliases.
    • modern (the standard compiler of JDK 1.3/1.4/1.5/1.6/1.7) – javac1.3 and javac1.4 and javac1.5 and javac1.6 and javac1.7 (since Ant 1.8.2) can be used as aliases. jikes (the
    • Jikes compiler).
    • jvc (the Command-Line Compiler from Microsoft’s SDK
      for Java / Visual J++) – microsoft can be used as an alias.
    • kjc (the
      kopi compiler).
    • gcj (the gcj compiler from gcc).
    • sj (Symantec java
      compiler) – symantec can be used as an alias. extJavac (run either
      modern or classic in a JVM of its own).

    If you want to use the same Java version as Ant be sure that you installed it correctly (and that you installed the JDK and not only JRE)

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.