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

The Archive Base Latest Questions

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

I just picked up the latest version of the Android SDK and started trying

  • 0

I just picked up the latest version of the Android SDK and started trying to use it. Unlike almost everyone else coming up with this problem, I’m running Linux, namely Linux Mint 13. I’m currently trying to compile a Hello World program using ant, installed via

sudo apt-get install ant

and ran in the project folder:

ant debug

However, it fails utterly to compile, eventually spitting out an error to do with setting JAVA_HOME. I amended my ~/.bashrc file accordingly and restarted, but I still get the error:

Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-7-openjdk-amd64/jre"

Total time: 1 second
jamie@jamie-ThinkPad-E525 ~/Downloads/adt-bundle-linux/sdk/tools/projects/new $ echo $JAVA_HOME
/usr/java/jdk1.7.0_05/

As you can see, it’s lying through its teeth.

I’ve found lots of references to this problem, but most people have either set their JAVA_HOME incorrectly, or set it to the JRE. Clearly, I have done neither.

I also amended my project folder’s ant.properties file, adding the line

java.home=/usr/java/jdk1.7.0_05/

to no avail.

Has anyone else experienced/solved this problem, or got any ideas? Thanks.

  • 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-16T02:25:59+00:00Added an answer on June 16, 2026 at 2:25 am

    The chances are that ant is telling the truth and that the environment variable is not set. The chances are that:

    • you put the wrong statement into the “.bashrc” file, or
    • you didn’t restart properly.

    Anyway, you can verify this by running export in the shell before to run the ant command … and looking to see if the JAVA_HOME variable is listed.


    Hints:

    1) This is wrong:

    JAVA_HOME=/usr/java/jdk1.7.0_05/
    

    That only creates a local shell variable, and local shell variables are NOT passed to child process (like the ant command). It should be:

    export JAVA_HOME=/usr/java/jdk1.7.0_05/
    

    2) Try running this:

    export JAVA_HOME=/usr/java/jdk1.7.0_05/
    ant
    

    3) Adding java.home=/usr/java/jdk1.7.0_05/ to ant.properties won’t help. Ant expects the setting in an environment variable.

    4) Computer programs don’t lie. They tell the truth as they see it. Or to be more accurate, the whole notion of lying and telling the truth is meaningless unless the agent is capable of intention. But the point is that if you start to suspect computer programs of trying to deceive you, you are going to have a hard time debugging things.

    (OK, you were joking. But many people faced with a troubleshooting problem take a similarly unproductive approach; e.g. assuming that every tricky Java problem is evidence that the compiler / language / runtime is broken. IMO – it is worth reminding people that this kind of thinking can be very unhelpful ….)

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

Sidebar

Related Questions

I just picked up IronPython and I've been trying to get this IronPython script
I'm new at jQuery (just picked up a book this morning!) and I'm trying
I just picked up TortoiseHg to use for distributed source control on Windows and
This question spans both serverfault and stackoverflow so I just picked this one. I
Hello everyone i just picked up jQuery So my question is i want to
Just picked up an Iconia A500 (yay $100 off coupon) and started messing with
I just picked up someone else's IVR project, which uses a combination of Voxeo
I know this is a bit trivial but I just picked up jQuery tonight
Hello i've just picked up sockets for the first time and im using this
This might be something simple i just haven't picked up but what is the

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.