CLASSPATH + Linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KevinRobinson

    #1

    CLASSPATH + Linux

    Hi,

    Can anyone please tell me how to add or change a Java classpath in SUSE
    Linux 9.3.

    I have set up a Tomcat server but my Java Classes will not run although they
    do on a windows box.

    Kevin


  • Pete Mullins

    #2
    Re: CLASSPATH + Linux

    KevinRobinson wrote:
    Hi,
    >
    Can anyone please tell me how to add or change a Java classpath in SUSE
    Linux 9.3.
    >
    I have set up a Tomcat server but my Java Classes will not run although
    they do on a windows box.
    >
    Kevin
    setclasspath.sh

    --
    _______________ _______________ _
    Pete Mullins

    Comment

    • KevinRobinson

      #3
      Re: CLASSPATH + Linux

      Not sure what that means. Do I create a new file and add the classpath too
      it?

      If so where should the file go?


      Regards

      Kevin


      "Pete Mullins" <pmullin@attglo bal.netwrote in message
      news:rsKdneaNjY 06TDnYRVnyugA@b t.com...
      KevinRobinson wrote:
      >
      >Hi,
      >>
      >Can anyone please tell me how to add or change a Java classpath in SUSE
      >Linux 9.3.
      >>
      >I have set up a Tomcat server but my Java Classes will not run although
      >they do on a windows box.
      >>
      >Kevin
      >
      setclasspath.sh
      >
      --
      _______________ _______________ _
      Pete Mullins

      Comment

      • Pete Mullins

        #4
        Re: CLASSPATH + Linux

        KevinRobinson wrote:
        Not sure what that means. Do I create a new file and add the classpath too
        it?
        >
        If so where should the file go?
        >
        >
        Regards
        >
        Kevin
        >
        >
        "Pete Mullins" <pmullin@attglo bal.netwrote in message
        news:rsKdneaNjY 06TDnYRVnyugA@b t.com...
        >KevinRobinso n wrote:
        >>
        >>Hi,
        >>>
        >>Can anyone please tell me how to add or change a Java classpath in SUSE
        >>Linux 9.3.
        >>>
        >>I have set up a Tomcat server but my Java Classes will not run although
        >>they do on a windows box.
        >>>
        >>Kevin
        >>
        >setclasspath.s h
        >>
        >--
        >______________ _______________ __
        >Pete Mullins
        Sorry Kevin,

        There should be a skeleton included with the tomcat install:
        /usr/share/tomcat5/bin/setclasspath.sh

        You can edit this and add your classpath entry. You can still use the
        WEB-INF/classes or WEB-INF/lib folders as usual. e.g.:
        /usr/share/tomcat5/webapps/ROOT/WEB-INF



        --
        _______________ _______________ _
        Pete Mullins

        Comment

        • HT de Beer

          #5
          Re: CLASSPATH + Linux

          KevinRobinson wrote:
          Can anyone please tell me how to add or change a Java classpath in SUSE
          Linux 9.3.
          In a shell you can set the CLASSPATH environment variable

          export CLASSPATH=$CLAS SPATH:\path\to\ new\files\to\in clude\in\the\cl asspath

          You can also call java with the -cp (classpath option)

          java -cp=\path\to\new \files\to\inclu de\in\the\class path javaprogram
          I have set up a Tomcat server but my Java Classes will not run although
          they do on a windows box.
          Have a look at the documentation of the tomcat server. I am sure it will
          mention how to use it on linux.

          --
          HT de Beer
          H.T.de.Beer@gma il.com

          Comment

          • HT de Beer

            #6
            Re: CLASSPATH + Linux

            HT de Beer wrote:

            Hmm, wrong slashes ... Damn, I too often get them wrong ,
            KevinRobinson wrote:
            >Can anyone please tell me how to add or change a Java classpath in SUSE
            >Linux 9.3.
            >
            In a shell you can set the CLASSPATH environment variable
            >
            export CLASSPATH=$CLAS SPATH:\path\to\ new\files\to\in clude\in\the\cl asspath
            export CLASSPATH=$CLAS SPATH:/path/to/new/files/to/include/in/the/classpath
            >
            You can also call java with the -cp (classpath option)
            >
            java -cp=\path\to\new \files\to\inclu de\in\the\class path javaprogram
            java -cp=/path/to/new/files/to/include/in/the/classpath javaprogram


            --
            HT de Beer
            H.T.de.Beer@gma il.com

            Comment

            • KevinRobinson

              #7
              Re: CLASSPATH + Linux


              Thanks for this but it still won't work.

              If I type env in the console the CLASSPATH appears in the list of variables
              but only if it is entered in the alljava.sh.

              If I put it in the setclasspath.sh and do env then CLASSPATH doesn't appear
              in the variable list.

              However whichever way I do it the app still won't work.

              Kevin

              "KevinRobin son" <k.s.robinson@b tinternet.comwr ote in message
              news:2IadnRst3q itNTnYnZ2dnUVZ8 sylnZ2d@bt.com. ..
              Hi,
              >
              Can anyone please tell me how to add or change a Java classpath in SUSE
              Linux 9.3.
              >
              I have set up a Tomcat server but my Java Classes will not run although
              they
              do on a windows box.
              >
              Kevin
              >
              >

              Comment

              • Lew

                #8
                Re: CLASSPATH + Linux

                KevinRobinson wrote:
                >Can anyone please tell me how to add or change a Java classpath in SUSE
                >Linux 9.3.
                HT de Beer wrote:
                export CLASSPATH=$CLAS SPATH:\path\to\ new\files\to\in clude\in\the\cl asspath
                That will not work - in Linux / UNIX the path separator is the forward slash,
                not the backslash, Windows also accepts forward slashes now, so there is no
                excuse any more to use backslash as a path separator character.

                Backslash will always be an escape for me.

                - Lew

                Comment

                • Lew

                  #9
                  Re: CLASSPATH + Linux

                  Lew wrote:
                  Backslash will always be an escape for me.
                  I should have read your next post, sorry.

                  - Lew

                  Comment

                  • Joe Schlobotnick

                    #10
                    Re: CLASSPATH + Linux

                    The setclasspath.sh that comes with Tomcat should set the classpath used
                    by the server...it shouldn't affect what you see when you type env.

                    After adding your path the setclasspath.sh , you probably need to stop
                    and start Tomcat to pick up the change.

                    Joe

                    KevinRobinson wrote:
                    Thanks for this but it still won't work.
                    >
                    If I type env in the console the CLASSPATH appears in the list of variables
                    but only if it is entered in the alljava.sh.
                    >
                    If I put it in the setclasspath.sh and do env then CLASSPATH doesn't appear
                    in the variable list.
                    >
                    However whichever way I do it the app still won't work.
                    >
                    Kevin
                    >
                    "KevinRobin son" <k.s.robinson@b tinternet.comwr ote in message
                    news:2IadnRst3q itNTnYnZ2dnUVZ8 sylnZ2d@bt.com. ..
                    >Hi,
                    >>
                    >Can anyone please tell me how to add or change a Java classpath in SUSE
                    >Linux 9.3.
                    >>
                    >I have set up a Tomcat server but my Java Classes will not run although
                    >they
                    >do on a windows box.
                    >>
                    >Kevin
                    >>
                    >>
                    >
                    >

                    Comment

                    Working...