Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2005

    Java: New Package and Classpath

    I'm using FC4 (out of the box, not additional patches or nething). During installation, I had selected java development tools. Its working fine, compiling and running the programs. I want to add a new .jar file. In which directory should I place it so I can import it in my program
    //file name is pgdst.jar
    import ncst.pgdst.*;

    Also will i need to modify the CLASSPATH or any variable? How do I do that?

    Thank you

  2. #2
    Just Joined! tom-tjtech's Avatar
    Join Date
    Apr 2006

    Arrow re: Java: New Package and Classpath

    Hope this helps:

    Make sure you know where your java and SYSTEM PATH variables are using,

    [root]$ java -version
    [root]$ which java

    a list of variables on your system can be seen using,
    [root]$ env

    so to store this info use,
    [root]$ env> /home/mynamed-home-folder/env.log

    Say your app package is called ncst and lives in..

    Your class is pgdsp.jar and lives at /usr/java/myClasses

    so use
    [root]$ java -classpath /usr/java/myClasses/pgdsp.jar myProgs.ncst

    I think thats the idea!

Posting Permissions

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