Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

which jar file for classpath ?

 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At my office on my machine i have weblogic 8.1 and tomcat installed.

weblogic have 2.3 version of servlet and
tomcat have 2.4 version of servlet

weblogic is for production purpose (development of servlet, jsp and ejb)
and tomcat is for my own practice. (just for servlet and jsp)

i have weblogic.jar as well as servlet-api.jar in my class path.

now when i compile my servlet which jar file compiler will use to create the classes.

if the compiler chooses servlet-api.jar will my servlet run in weblogic
else
if the compiler chooses weblogic.jar will my servlet run in tomcat
 
Nobuhiro Watsuki
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'd use the classpath option in the javac command
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic