This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to use more than one classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to use more than one classpath" Watch "How to use more than one classpath" New topic
Author

How to use more than one classpath

Marcelo Sena
Greenhorn

Joined: Feb 05, 2008
Posts: 9
I'm reading "head first: sevlets" and I have a problem:

When compilling a servlet I have to use two classpaths, one for the servlet-api.jar, and another to the 'classes' directory(so I can use BeerExpert.class).

I'v tried to use something like "javac -classpath c:\blablabla\servlet-api.jar:classes"

But javac only uses one classpath =/
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41052
    
  43
Welcome to JavaRanch.

There's only one classpath, but it can have several entries. The book you're reading assumes a Unix-like operating system (such as Mac OS X or Linux), whereas you seem to be using Windows. So there are a few things that work differently, e.g. you would need to type

because Windows uses the semicolon to separate classpath entries, while Unix uses a colon.


Ping & DNS - my free Android networking tools app
Marcelo Sena
Greenhorn

Joined: Feb 05, 2008
Posts: 9
Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use more than one classpath
 
Similar Threads
need help when compile the code
problem in HFSJ chapter 3 Beer example
Problem in setting CLASSPATH
package javax.servlet.http does not exist
Tomcat start-up error and setting CLASSPATH permanently