Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

adding jar file to web server

 
michelle_cheung
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, each jar must be explicity included in the classpath.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
 
michelle cheung
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic