 |
 |
Up the garden CLASSPATH (Help installing a little jav app...)
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2002
Location: London, UK
Status:
Offline
|
|
OK so I'm getting into developing web sites using XML as a data source and transforming it into XHTML using XSLT and the Xalan XSLT processor. Only I would be if I knew how to install Xalan.
My UNIX skills would best be rated as weak-to-lame so I'm a bit lost as to how exactly to go about installing this Java app. The instuctions for how to install the app can be found at:
Xalan: Getting Started
But I'm not sure where the correct place to install the app is (/usr/local/bin ?) and how I should go about setting the system classpath.
So if anyone could help this pathetic UNIX newbie reach XSLT nirvana he would be most appreciative 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
It's a jar file. You can put it wherever you like, as long as you add it to your classpath. Apple generally recommends user-level jar files go into ~/Library/Java -- which is where I put all of mine.
To actually get it in your classpath, you need to add it. How to do that depends on your shell. If you're using csh or tcsh, switch!  If you're using zsh, ksh, or bash, add this to your appropriate resource file (for bash it's ~/.bashrc, for ksh it's ~/.kshrc, etc):
Code:
CLASSPATH="${CLASSPATH}:/Library/Java/xalan.jar:/Library/Java/xml-apis.jar:/Library/Java/xercesImpl.jar"
export CLASSPATH
You can get pretty fancy with this stuff, but that's the bare bones basic for those three jars.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2002
Location: London, UK
Status:
Offline
|
|
Well I'm running the default 10.2.6 shell (tcsh???) so how would I go about setting the classpath in that?
Oh and seeing as I should probably trying to learn how the UNIX shell works (mainly so I don't go screwing everything up too badly) what exactly is the classpath and what does it do?
To be honest I think its best for me to stick with the default shell seeing as I don't use it for anything more exciting than running the occasional top/ps, ssh and mysql session and generally any docs for OS X UNIX newbies assume that you're running the default as far as I can tell.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by tru322:
Well I'm running the default 10.2.6 shell (tcsh???) so how would I go about setting the classpath in that?
Oh and seeing as I should probably trying to learn how the UNIX shell works (mainly so I don't go screwing everything up too badly) what exactly is the classpath and what does it do?
Not sure WHAT the default shell is. If you're using csh or tcsh, set verialbles like this:
Code:
setenv CLASSPATH "${CLASSPATH}:/Library/Java/xalan.jar:/Library/Java/xml-apis.jar:/Library/Java/xercesImpl.jar"
Classpath is not a UNIX thing, it's a java thing. Learn more about it here:
http://www.kevinboone.com/classpath.html
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2002
Location: London, UK
Status:
Offline
|
|
OK, thanks Arkham_c.
How do find out which shell I'm running then? 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by tru322:
OK, thanks Arkham_c.
How do find out which shell I'm running then?
Code:
[arkham@flybook ~] ps
PID TT STAT TIME COMMAND
632 std S 0:00.06 -bash (bash)
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Jul 2002
Location: Australia
Status:
Offline
|
|
As I've mentioned in the Developers forum before, putting .jars in /Library/Java/Extensions automatically adds them to the classpath without any further modifications.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by asmodeus:
As I've mentioned in the Developers forum before, putting .jars in /Library/Java/Extensions automatically adds them to the classpath without any further modifications.
Good to know. Found that documented here as well:
http://developer.apple.com/qa/qa2001/qa1170.html
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2002
Location: London, UK
Status:
Offline
|
|
Cheers guys, got it all sorted now. Pretty easy when you know how
Asmodeus, that tip on where to stick the .jars worked a treat and Arkham_c, cheers for the link and by the way the default shell appears to be tcsh.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|