Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17
"File layout Following JPackage standards, any JPackage compatible Java environment is installed under /usr/lib/jvm. For example, gcj is under =/usr/lib/jvm/java-gcj=. Jars are located under =/usr/share/java= . JVM extensions (such as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined! Loy Glenn's Avatar
    Join Date
    Sep 2008
    Location
    Houston,TX
    Posts
    89

    "File layout

    Following JPackage standards, any JPackage compatible Java environment is installed under /usr/lib/jvm. For example, gcj is under =/usr/lib/jvm/java-gcj=. Jars are located under =/usr/share/java=. JVM extensions (such as bouncycastle) are located under =/usr/share/java-ext=."

    If you still have trouble post it and i will get it working on my Mandriva 08.1 machine and post for you... -Loy

  2. #12
    Linux Newbie Max2009's Avatar
    Join Date
    Nov 2008
    Posts
    197
    Yes, I sw that on the Wiki, it wasn't too helpfull.
    I am trying to compile a Java app, in which I need to import class files from a jar that I downloaded from the Internet. When I run javac it tells me that that package does not exist.
    I found somewhere else on the web saying that I need to put the jar in the java-ext folder. I did, and it didn't help.
    I have 2 java-ext foldrs:
    usr/share/java-ext
    usr/lib/java-ext
    I put the jar in both of them, and it didn't work.
    Cogito ergo surf - I think therefore I network.

    Registered Linux user #481826 Get counted!

  3. #13
    Just Joined! Loy Glenn's Avatar
    Join Date
    Sep 2008
    Location
    Houston,TX
    Posts
    89
    Can you post the command you are issuing and it's output?

  4. $spacer_open
    $spacer_close
  5. #14
    Linux Newbie Max2009's Avatar
    Join Date
    Nov 2008
    Posts
    197
    I am a university student, studying computer engineering. As part of the course we are to write a program that will give directions to a little pink arrow (called Karel) to wander around a java world and collect little green things.
    The program I wrote works. It worked on the university computers, and I already submitted it.
    When I try to compile it at home I get:
    Code:
    javac WalkTrail.java                   
    WalkTrail.java:1: package intro.csp.ex1 does not exist            
    import intro.csp.ex1.*;                                           
    ^                                                                 
    WalkTrail.java:2: package intro.proceduralKarel does not exist    
    import intro.proceduralKarel.ProceduralKarel;                     
                                ^                                     
    WalkTrail.java:12: cannot find symbol                                           
    symbol  : variable TrailWorld                                                   
    location: class WalkTrail                                                       
            ProceduralKarel.chooseWorld (TrailWorld.ID,-1);
    And then it goes on to tell me that each time I invoked a ProceduralKarel command it doesn't exist.
    Inside the aforementioned jar file are all the relevant class files. I have seen them.
    In fact, when I unpacked it into the same file that houses the java program, it compiled and ran perfectly. But that is only a temporary fix.
    I am looking for a slightly more elegant and permanent solution.
    Cogito ergo surf - I think therefore I network.

    Registered Linux user #481826 Get counted!

  6. #15
    Just Joined! Loy Glenn's Avatar
    Join Date
    Sep 2008
    Location
    Houston,TX
    Posts
    89
    Looks like you may need to specify "-classpath" or "-sourcepath"

    See here .... javac - Java programming language compiler


    Although that is for Windoze I think the syntax is pretty much the same .... http://java.sun.com/javase/6/docs/te...ngclasses.html

  7. #16
    Just Joined! Loy Glenn's Avatar
    Join Date
    Sep 2008
    Location
    Houston,TX
    Posts
    89
    Try this article....
    The K-Zone: Mastering the Java CLASSPATH


    Also have you tried specifying the sourcepath as well?

    Here is another ref...

    http://forums.sun.com/thread.jspa?threadID=646818

  8. #17
    Linux Newbie Max2009's Avatar
    Join Date
    Nov 2008
    Posts
    197
    Problem solved!
    I started using Eclipse, and there it is dead simple to import jar files.
    Cogito ergo surf - I think therefore I network.

    Registered Linux user #481826 Get counted!

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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