Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43398 - ant bails when JDK_HOME is not set
Summary: ant bails when JDK_HOME is not set
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-01 10:49 UTC by Richard Torkar
Modified: 2004-03-11 12:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Torkar 2004-03-01 10:49:04 UTC
Ant should either give a sane error msg or make sure to set the JDK_HOME variable itself by scanning java-config.
|Warning: JAVA_HOME environment variable not set.
|  If build fails because sun.* classes could not be found
|  you will need to set the JAVA_HOME environment variable
|  to the installation directory of java.
|Error: JAVA_HOME is not defined correctly.
|  We cannot execute java

Reproducible: Always
Steps to Reproduce:
1. Install blackdown jdk _and_ jre
2. Use java-config and set the default JAVA_HOME to the jre
3. emerge dev-java/ant

Actual Results:  
It bails out with the above error msg

Expected Results:  
Compile cleanly and set the JAVA_HOME itself _or_ make sure to give a sane error
msg.
Comment 1 Chris Aniszczyk (RETIRED) gentoo-dev 2004-03-01 11:15:02 UTC
env-update && source /etc/profile 
should fix your issue.

I'll look into giving the sane error message.
Comment 2 Richard Torkar 2004-03-01 12:11:11 UTC
There is a thread about it here:
http://forums.gentoo.org/viewtopic.php?t=143574&view=next
Comment 3 Chris Aniszczyk (RETIRED) gentoo-dev 2004-03-11 12:46:31 UTC
Fixed in 1.6.1. It just got unmasked so please emerge ant 1.6.1 :)