CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Location
    North Carolina
    Posts
    167

    Compiling with ANT: newbie Q

    I'm trying to find out how classpath in ANT works. In a simple build.xml,
    I intentionally species the classpath as "." only. I thought this could let ANT
    believe not to reference system classpath any more. However, my java file
    still compiles (it references java.io.*).

    It seems like that system classpath is by default added to
    classpath parameter. Is it correct? Or, ANT itself ships with some jar file.

  2. #2
    Join Date
    Aug 2004
    Posts
    165

    Re: Compiling with ANT: newbie Q

    javac actually has two classpath options.

    The normal one you manipulate, 'classpath', tells it where your application class files are found.

    The second one, called 'bootclasspath', tells it where to find the system classes that define the Java platform.

    The java.io package is part of the Java platform and so is being found by the second option for which javac has a default setting pointing to it's own platform: your installed JDK.

    You really shouldn't need to mess with this setting for normal applications, but if you want to give it a go, the javac task in ANT has a 'bootclasspath' parameter which is used in the same way as the classpath parameter.

  3. #3
    Join Date
    Apr 2003
    Location
    North Carolina
    Posts
    167

    Re: Compiling with ANT: newbie Q

    So happy to know this! Thank you a million!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured