Find the answer to your Linux question:
Results 1 to 3 of 3
Dear Sir, I have set classpath in bash.bashrc file using export CLASSPATH="/home/struts.jar:.". Now when I compile classes where I have imported struts APIs, it gives compilation error on bash, dash, ...
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    23

    Need help in setting Classpath on Sarge 3.1r0a

    Dear Sir,

    I have set classpath in bash.bashrc file using export CLASSPATH="/home/struts.jar:.". Now when I compile classes where I have imported struts APIs, it gives compilation error on bash, dash, sh or on tsh but it compiles file on GNOME Terminal.

    My question is how do I set global classpath so that I can compile from everywhere.

    Please help. Any pointer would be highly appreciated.

    I don't know much difference between bash, dash, sh, tsh or GNOME Terminal. I installed it just to explore different java/j2ee technologies on it but it looks like I have to understand Debian first .

    Thanks in advance

    Naseem

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,212
    In your ~/.bashrc file, you add a line like that :
    Code:
    export CLASSPATH=".:/home/yourself/JavaRessources/"
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Posts
    23
    Quote Originally Posted by antidrugue
    In your ~/.bashrc file, you add a line like that :
    Code:
    export CLASSPATH=".:/home/yourself/JavaRessources/"
    Thanks for your prompt reply. I tried your suggestions but no luck. Still it gives compilation error in bash, dash etc. Compilation succeeds only in GNOME Terminal.

    Naseem

Posting Permissions

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