Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / July 2003

Tip: Looking for answers? Try searching our database.

Ant: env prop and Linux?

Thread view: 
JVarsoke - 13 Jul 2003 19:39 GMT
For some reason I can't get access to the environment properties on
Linux in my Ant build.xml.  I realize the Docs say it only works on
some platforms, but I'd figure linux was one such platform.

Here's the test script (mostly copied from the Ant Documentation)

<project name="env" default="debug">

  <!-- tasks -->
  <target name="debug">
  <property environment="env"/>
  <property name="junit.home"        value="${env.JUNIT_HOME}"/>
  <echo message="Number of Processors =
${env.NUMBER_OF_PROCESSORS}"/>
  <echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>
  <echo message="${junit.home}"/>
  <echo message="${env.JUNIT_HOME}"/>
  </target>

</project>

Here's the output I get:
Buildfile: build.xml

debug:
    [echo] Number of Processors = ${env.NUMBER_OF_PROCESSORS}
    [echo] ANT_HOME is set to = ${env.ANT_HOME}
    [echo] ${env.JUNIT_HOME}
    [echo] ${env.JUNIT_HOME}

BUILD SUCCESSFUL
Total time: 5 seconds

any suggestions?

-j
JVarsoke - 14 Jul 2003 01:36 GMT
> For some reason I can't get access to the environment properties on
> Linux in my Ant build.xml.
[snip]

Remembering to "export" the environment variables did wonders.  D'oh.

-j


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.