Find the answer to your Linux question:
Results 1 to 4 of 4
So here i am and ive installed successfully just about everything i need to complete my first semester course of Programming one on my linux machine. Then i realize i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Sep 2003
    Location
    Brisbane, Australia
    Posts
    123

    Setting a classpath for Java


    So here i am and ive installed successfully just about everything i need to complete my first semester course of Programming one on my linux machine.

    Then i realize i cant compile MORE programs.. and after putting it off, trying myself to set classpaths for java to find breezyswing and terminalIO, i still havnt seemed to get it right so far. Of course in this kind of thing, its kind of hard for me to know what ive done wrong...

    I have added the following line to my profile in etc
    Code:
    export CLASSPATH=$CLASSPATH:/usr/java/class
    However, im not exactly sure of a couple of things (including the correct placement of this topic) and that is, if that will correctly reference the BreezySwing.jar or if thats supposed to referecne the breezyswing folder.. or..

    Basically i need to import them into my programs that ive been creating but it hasnt been working (i assume) because it doesnt understand the commands that SHOULD be in the files within that folder. Ive been trying for weeks, but no success, and only found help for how to do it to redhat, and so i kind of used a similar method for doing the same in mandrake...

    Ill stop babbling.

    Again all help is appreciated. and all previous help has been a major help to me =D i now use my linux box exclusively over my windows (and for the momment more powerful computer).
    soon ill be able to reformat that newer PC and install linux now i know how to do things =D
    /skythra

  2. #2
    Linux Newbie
    Join Date
    Aug 2001
    Location
    USA, Texas
    Posts
    217
    To add the contents of a .jar file into your classpath you need to specify that file in the classpath ...
    Code:
    export CLASSPATH=$CLASSPATH:/path/to/jarfile.jar
    if you just want to add a folder to the classpath then you do as you mentioned.

    Also, the best place for this was the Programming/Scripting forum. I moved it for you.
    [ [ SykkN alloc ] initWithThePowerTo: destroyYouAll ];
    /* Don\'t make me use it! */

  3. #3
    Linux Newbie
    Join Date
    Sep 2003
    Location
    Brisbane, Australia
    Posts
    123
    Thanks :]

    ill check that out, but right now, the folder option doesnt seem to be working.. i dont know whats up yet.. ill have to restart again i supose and work from there =D

    Ill let you know how it pans out soon.
    /skythra

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Sep 2003
    Location
    Brisbane, Australia
    Posts
    123
    The son-of-a-***** doesnt work

    But!

    I think its because of the breezyswing java resource file thing i have.

    TerminalIO works perfectly and its in the same folder. *shruggs* If i just fix that up, i think it should be fine. I obviously am just not using the breezyswing package i have right... so its not seeing it right etc.

    Anyhow thanks for solving it from this end its a big help in cutting down the causes :]
    /skythra

Posting Permissions

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