Results 1 to 4 of 4

Thread: Classpath

  1. #1
    dawiz001 is offline Member
    Join Date
    Feb 2009
    Posts
    21
    Rep Power
    0

    Default Classpath

    Guys,
    I have been asking this question 4 a while now. Does anyone in this forum uses Vista, set your CLASSPATH and have your packages working? If so could you be kind enough to tell me what you did? Thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    I use Vista, and have .; in my CLASSPATH. Otherwise I leave my system CLASSPATH alone, and I suggest that you do the same.

  3. #3
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    1. If you are using an IDE, set the libraries in the Project properties.

    2. If you are using a Web Container/Application Server, place the external jars into the respective places for common/application usage. See the documentation for your container/server.

    3. If running from the command line with the -cp/-classpath option (and without the "-jar" option) then set the entire classpath in that option.

    4. If running from the command line with the "-jar" option, ensure that your classpath is set properly in the manifest file.

    5. When running from the command line with neither the "-cp/-classpath" nor the "-jar" options, then you can use the system CLASSPATH.

    IDE's and Web Containers and Application Servers ignore the system CLASSPATH.
    the -classpath option takes precedence over the system CLASSPATH (thereby also ignoring it).
    The "-jar" option causes the Manifest file's classpath to take precendence over both the system CLASSPATH and the "-cp/-classpath" option, thereby ignoring both.

    java - the Java application launcher
    Adding Classes to the JAR File's Classpath (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)

  4. #4
    innasronald is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

Similar Threads

  1. j3d classpath
    By sales1 in forum New To Java
    Replies: 3
    Last Post: 12-23-2008, 02:51 AM
  2. Classpath on mac osx
    By jacobb in forum JDBC
    Replies: 0
    Last Post: 06-12-2008, 10:41 PM
  3. Set classPath?
    By rgbosque in forum New To Java
    Replies: 3
    Last Post: 02-07-2008, 03:14 PM
  4. GNU Classpath 0.96.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-01-2007, 05:14 PM
  5. GNU Classpath 0.96
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 10-16-2007, 07:35 PM

Posting Permissions

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