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 Is my packaging correct? 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 "Is my packaging correct?" Watch "Is my packaging correct?" New topic
Author

Is my packaging correct?

northfield Sid
Ranch Hand

Joined: Aug 08, 2002
Posts: 106
Here is the error:
D:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs\WEB-INF\classes\ftpbean>javac Conn
ectToFtp.java
ConnectToFtp.java:12: cannot resolve symbol
symbol : class FtpBean
location: class ftp.ConnectToFtp
FtpBean ftp;
^
ConnectToFtp.java:16: cannot resolve symbol
symbol : class FtpBean
location: class ftp.ConnectToFtp
ftp = new FtpBean();
^
2 errors
Here is the code for ConnectToFTP.java

Here is the "dir" on dos
D:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs\WEB-INF\classes\ftpbean>dir *.java

Volume in drive D has no label
Volume Serial Number is 1953-1604
Directory of D:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs\WEB-INF\classes\ftpbean
FTPBEA~1 JAV 60,193 09-19-02 6:16p FtpBean.java
CONNEC~1 JAV 624 09-20-02 9:40a ConnectToFtp.java
2 file(s) 116,537 bytes
0 dir(s) 1,038,680,064 bytes free

Please help???
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
Two things, I think:
ConnectToFtp is in a package named ftp, yet is in classes/ftpbean directory (package and directory should match).
When you compile, you need to make sure that CLASSPATH includes the .../classes directory. There's several ways to make that happen:
cd ...\WEB-INF\classes
javac -classpath . ftpbean\*.java
Or,
cd WEB-INF\classes\ftpbean
javac -classpath .. *.java
Or,
SET CLASSPATH="...\WEB-INF\classes"
javac *.java
northfield Sid
Ranch Hand

Joined: Aug 08, 2002
Posts: 106
Thanks that was a lucid explanation
 
Consider Paul's rocket mass heater.
 
subject: Is my packaging correct?
 
Similar Threads
my first servlet please help.
why do I get NoClassDefFoundError????
simple JSP and JavaBean, error 500
Need help with jsp page so that it calls a good working bean
How to compile Servlets