aspose file tools*
The moose likes Beginning Java and the fly likes adding jar file to web server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "adding jar file to web server" Watch "adding jar file to web server" New topic
Author

adding jar file to web server

michelle_cheung
Greenhorn

Joined: Jun 04, 2001
Posts: 1
I have a jar file that I downloaded called xalan.jar.
I've put xalan.jar into a directory called "C:\jdk1.3\lib"
and "C:\jdk1.3\lib" is on the web server's classpath.
My question is...
Do I need to register the .jar file in the classpath?
In other words, do I need to add "C:\jdk1.3\lib\xalan.jar" into the classpath?
What if you have many .jar files you want to use? Does each jar file need to be added into the classpath also?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

yes, each jar must be explicity included in the classpath.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"michelle_cheung",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
michelle cheung
Greenhorn

Joined: Jun 05, 2001
Posts: 11
Thanks for the reply.
So what happens when you have a lot of jar files?
You just keep adding to web servers classpath?
Is there a better way to manage jar files?
thanks again
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Most times there is a startup script for webservers. If you place all your jars in a certain directory, and then in the startupscript, you would build up your classpath.

The Tomcat startupscript does this. You should examine this for a demonstration.

Also, there may be a directory that web servers inherintly (without classpath) understand is where to locate jars. Usually a lib directory of some sort.
manish paliwal
Greenhorn

Joined: May 18, 2001
Posts: 16
kid",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.

------------------
manish paliwal(or just mann )


manish paliwal(or just mann )
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: adding jar file to web server