473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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
Jan 10 '07 #1
9 25849
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
Jan 10 '07 #2
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" <pm*****@attglobal.netwrote in message
news:rs*********************@bt.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

Jan 10 '07 #3
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" <pm*****@attglobal.netwrote in message
news:rs*********************@bt.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
Jan 10 '07 #4
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

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

java -cp=\path\to\new\files\to\include\in\the\classpath 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.*********@gmail.com
Jan 11 '07 #5
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=$CLASSPATH:\path\to\new\files\to\include \in\the\classpath
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
java -cp=/path/to/new/files/to/include/in/the/classpath javaprogram
--
HT de Beer
H.*********@gmail.com
Jan 11 '07 #6

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.**********@btinternet.comwrote in message
news:2I******************************@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


Jan 11 '07 #7
Lew
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=$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
Jan 13 '07 #8
Lew
Lew wrote:
Backslash will always be an escape for me.
I should have read your next post, sorry.

- Lew
Jan 13 '07 #9
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

"KevinRobinson" <k.**********@btinternet.comwrote in message
news:2I******************************@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


Feb 1 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ric | last post by:
thx for the help. im having problems with java and jsp. i think im not settup up the enviornmental variables right in w2k advanced tab. im using a wrox book, but the wrox book references a servlet...
7
by: Herman | last post by:
Hi everyone, I recently installed the Sun J2SE SDK on my machine, and I am having trouble running the java.exe interpreter for my Java compiled code. I remember that I had to set my environment...
0
by: slurper | last post by:
i'm currently using software which is bundled as several jar-files. how can i make these available system wide (platform=linux) if i have to set the classpath, it takes so long (you have to...
2
by: David Cook | last post by:
Windows (XP and NT) allows one to specify environmental variable (such as PATH and CLASSPATH) at both the SYSTEM-wide level as well as at the per-USER level. And the behavior has always been...
4
by: Abdelhalim MIMOUNI | last post by:
hi, i'm new to java, and using sun last JDK, and i'm trying to understand how work this feature when we want to compile at command line ? i'm trying to set the classpath to the directory of the...
1
by: Dave Keays | last post by:
I am setting-up an experimental web service using Apache Axis but I'm having problems. AXIS can't find a library that I've verified exists on my computer and that CLASSPATH points to it. I'm using...
2
by: Dave | last post by:
I have an external java stored proc and is working fine if I put the class file in sqllib\function directory. If I want to put the class file in a directory other than sqllib\function, how do...
3
by: jeremiah johnson | last post by:
Okay this is going to sound really dumb. Skeet, you can poke fun of me in your own special way if you see fit. Is there a way to reproduce the CLASSPATH functionality of Java within C#? Would...
7
by: dlarsson | last post by:
Okay folks, I thought I was doing something very, very simple, but I cannot seem to get this to work at all. Can anyone identify what I am doing wrong here-? _________________________________ ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.