java & linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shana07
    Contributor
    • Jan 2007
    • 280

    #1

    java & linux

    Hi again.
    Sorry if this question is not appropriate in this forum. Need to consult you guys about running java in Linux from ssh.
    I have ssh profiles in my workstation. I supposed to install one open source java program into linux environment. I'm using windows xp. ..I have transferred the program into server and now about to install it into linux.
    Please give some pointers what should I do...any online tutorial link would be appreciated. Thank u.
  • shana07
    Contributor
    • Jan 2007
    • 280

    #2
    I have these errors when I tried to compile java program from my ssh shell command. what could be the reason?
    Code:
    Mode.java:3: package test.tool does not exist
    import test.tool.Check; 
                            ^
    Mode.java:15: cannot resolve symbol
    symbol  : variable Check 
    location: class Mode
                ^
    2 errors
    This problem's not encountered when I run program from windows prompt- get correct results.
    Perhaps someone could advise me. thanks

    Comment

    • rengaraj
      New Member
      • Jan 2007
      • 168

      #3
      The problem lies in the CLASSPATH, java cannot find the test.tool package in it. From the shell type this:

      echo $CLASSPATH

      and see if that prints out anything. You can set the classpath like this:

      export CLASSPATH = .:/var/projects

      (assuming you are using bash as the shell).

      If you did set the classpath, beware that you need to use a colon ( : ) as the seperator, while you would use a semicolon ( ; ) on windows.

      Comment

      • rengaraj
        New Member
        • Jan 2007
        • 168

        #4
        > Need to consult you guys about running java in Linux > from ssh. Compiling isn't the same as running. > I have ssh profiles in my workstation. I supposed to > install one open source java program into linux > environment. I'm using windows xp. ..I have > transferred the program into server and now about to > install it into linux. > Please give some pointers what should I do...any > online tutorial link would be appreciated. > > I have these errors when I tried to compile java > program from my ssh shell command. what could be the > reason? Why don't you just compile it in windows? > [code]Mode.java:3: package test.tool does not exist
        > import test.tool.Check ;
        > ^
        > olve symbol
        > symbol : variable Check
        > location: class Mode
        > ^
        > de]
        > This problem's not encountered when I run program
        > from windows prompt- get correct results.

        When you compile it - not run it. Or are you running an installation program that does all of this for you?

        If compilation then you did something on your windows box to correctly set the class path.

        If the second then it is the installation program that is the problem - you might want to verify that app that is being installed will run at all on linux before you bother figuring out what the problem is.

        Comment

        Working...