AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CLASSPATH + Linux

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> comp.lang.java
View previous topic :: View next topic  
Author Message
KevinRobinson
Guest





PostPosted: Wed Jan 10, 2007 2:47 pm    Post subject: CLASSPATH + Linux Reply with quote



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
Back to top
KevinRobinson
Guest





PostPosted: Wed Jan 10, 2007 7:21 pm    Post subject: Re: CLASSPATH + Linux Reply with quote



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 (AT) attglobal (DOT) net> wrote in message
news:rsKdneaNjY06TDnYRVnyugA (AT) bt (DOT) com...
Quote:
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
Back to top
HT de Beer
Guest





PostPosted: Thu Jan 11, 2007 8:10 am    Post subject: Re: CLASSPATH + Linux Reply with quote



KevinRobinson wrote:
Quote:
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=$CLASSPATH:\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\include\in\the\classpath javaprogram

Quote:
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 (AT) gmail (DOT) com
Back to top
HT de Beer
Guest





PostPosted: Thu Jan 11, 2007 8:10 am    Post subject: Re: CLASSPATH + Linux Reply with quote

HT de Beer wrote:

Hmm, wrong slashes ... Damn, I too often get them wrong ,

Quote:
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=$CLASSPATH:\path\to\new\files\to\include\in\the\classpath

export CLASSPATH=$CLASSPATH:/path/to/new/files/to/include/in/the/classpath

Quote:

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

java -cp=\path\to\new\files\to\include\in\the\classpath javaprogram

java -cp=/path/to/new/files/to/include/in/the/classpath javaprogram


--
HT de Beer
H.T.de.Beer (AT) gmail (DOT) com
Back to top
Pete Mullins
Guest





PostPosted: Thu Jan 11, 2007 8:10 am    Post subject: Re: CLASSPATH + Linux Reply with quote

KevinRobinson wrote:

Quote:
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 (AT) attglobal (DOT) net> wrote in message
news:rsKdneaNjY06TDnYRVnyugA (AT) bt (DOT) 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

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
Back to top
Pete Mullins
Guest





PostPosted: Thu Jan 11, 2007 8:10 am    Post subject: Re: CLASSPATH + Linux Reply with quote

KevinRobinson wrote:

Quote:
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
Back to top
KevinRobinson
Guest





PostPosted: Thu Jan 11, 2007 3:19 pm    Post subject: Re: CLASSPATH + Linux Reply with quote

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

"KevinRobinson" <k.s.robinson (AT) btinternet (DOT) com> wrote in message
news:2IadnRst3qitNTnYnZ2dnUVZ8sylnZ2d (AT) bt (DOT) com...
Quote:
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

Back to top
Lew
Guest





PostPosted: Sat Jan 13, 2007 8:10 am    Post subject: Re: CLASSPATH + Linux Reply with quote

Lew wrote:
Quote:
Backslash will always be an escape for me.

I should have read your next post, sorry.

- Lew
Back to top
Lew
Guest





PostPosted: Sat Jan 13, 2007 8:10 am    Post subject: Re: CLASSPATH + Linux Reply with quote

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

HT de Beer wrote:
Quote:
export CLASSPATH=$CLASSPATH:\path\to\new\files\to\include\in\the\classpath

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
Back to top
Joe Schlobotnick
Guest





PostPosted: Thu Feb 01, 2007 8:38 pm    Post subject: Re: CLASSPATH + Linux Reply with quote

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:
Quote:
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

"KevinRobinson" <k.s.robinson (AT) btinternet (DOT) com> wrote in message
news:2IadnRst3qitNTnYnZ2dnUVZ8sylnZ2d (AT) bt (DOT) 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



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> comp.lang.java All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.