cannot compile web application(jar file in WEBINF/lib)

A

arpanaj

I am trying to compile my webapp. The directory structure is

src
Application.java
WEB-INF
classes
lib
foo.jar

foo.jar contains
main/table.class

and I am accessing this table object from Application.

When I compile
javac -classpath $PATH/WEB-INF/lib/foo.jar Application.java

I get the error "package main does not exist" in line 1 of
Application.java
import main.table;
 
J

Jon Martin Solaas

I am trying to compile my webapp. The directory structure is

src
Application.java
WEB-INF
classes
lib
foo.jar

foo.jar contains
main/table.class

and I am accessing this table object from Application.

When I compile
javac -classpath $PATH/WEB-INF/lib/foo.jar Application.java

I get the error "package main does not exist" in line 1 of
Application.java
import main.table;

What's in the PATH variable? Usually it's the OS search-path for
executables. Doesn't make much sense to put that in your classpath.
Maybe you can use the `pwd`command? (Note backward quotes).

javac -classpath `pwd`/WEB-INF/lib/foo.jar Application.java
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top