CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010

    Red face Simple question about finding 3D jars during a build

    I have gotten into the habit of tossing my 3D jars from the directory of installation over into the jre(X)\lib\ext
    directory. Here x = version like 6 or 7.

    So I take the below-mentioned files in this directory:
    C:\Program Files\Java\Java3D\1.5.2\lib\ext
    j3dcore.jar, j3dutils.jar, vecmath.jar

    and I put them in jre6\lib\ext or jre7\lib\ext depending on which jre I'm running on that particular machine.

    Of course, the above is a BAD practice - it puts the libraries in two places. My programs all run fine.

    But since this makes my program compile and run with ease, I do it. It is the only change that I typically
    make to my Java installation other than setting CLASSPATH to . etc.. and JAVA_HOME to the usual jre dir such
    as c:\Program Files\Java\jdk1.6.0_18 or c:\Program Files\Java\jdk1.7.0_25/45 for examples. And I set the
    PATH environment variable to $JAVA_HOME;%PATH%.

    My command-line batch file is simple it's just like "path to javac\javac" packagedir\*.java, nothing fancy.

    Would you recommend that I 1) simply supplement my PATH environment variable or 2) add a reference to the
    jars in the javac command-line. We must bear in mind that the CLASS_PATH variable is a runtime issue. I am
    speaking of a build issue so I would prefer not to change my CLASS_PATH if at all possible.

    I am not adverse to either suggestion I've made: 1) or 2) or some other suggestion if those are not as good.

    Any help appreciated, thank you.

  2. #2
    Join Date
    Nov 2010

    Re: Simple question about finding 3D jars during a build

    I guess I will do some experiments with cp since the Oracle helpfile mentions that a special form of the command can recognize .jar and .JAR files with simply specifying a directory.

    So I will try something like javac - cp pathto3D/* and see if this works. I think that this form of the command will expand out to a list of all the jars in that directory. I hadn't realized that -cp IS looked at
    at compile time so it's actually not correct for others to say that cp is runtime. It is apparently ALSO used
    at compile time. Some people in other forums had stated this, but, perhaps the compiler is going through
    stages of evolution - who knows? But -cp is not just a runtime thing as they stated in those forums.

    I'll try some experiments with -cp since I haven't gotten any takers on this one.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.