File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Need help in compiling programs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Need help in compiling programs" Watch "Need help in compiling programs" New topic
Author

Need help in compiling programs

Puja Verma
Greenhorn

Joined: Jul 01, 2006
Posts: 24
Hi friends....

I am getting problem in compiling my programs from command prompt in WINDOW Operating system.
I am giving :

C:\Program Files\Java\jdk1.5.0_06\bin>javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar" -d classes C:\MyProjects\beerV1\src\com\example\web\BeerSelect.java

and output m getting :

C:\MyProjects\beerV1\src\com\example\web\BeerSelect.java:5: error while writing com.example.web.BeerSelect: classes\com\example\web\BeerSelect.class (The system cannot find the path specified)
public class BeerSelect extends HttpServlet {
^
1 error
=======================================================================
Well I have directory structure as MyProjects\beerV1\classes\com\web and MyProjects\beerV1\src\com\example\web where i have put my servlet program.


Till now I have been using "IBM Web Studio Application Developer" for my application development.
But with that i am encountering problems in implement the JSTL ...taglibs programs..
So thot to use the general method to test programs.

Can you please help me ............
thanks,
pooja


Impossible says I M Possible
Surendra Kumar
Ranch Hand

Joined: Jul 04, 2006
Posts: 235
You are compiling from C:\Program Files\Java\jdk1.5.0_06\bin.
So you are saying that the class files should go to classes directory under the above.
Are you sure you have classes directory in C:\Program Files\Java\jdk1.5.0_06\bin ?
Mohd Fuzail
Ranch Hand

Joined: Feb 20, 2002
Posts: 107
Try executing it from C:\MyProjects\beerV1\ directory

Command will look likt

C:\MyProjects\beerV1>javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar" -d classes src\com\example\web\BeerSelect.java


Being defeated is often a temporary condition. Giving up is what makes it permanent.
Puja Verma
Greenhorn

Joined: Jul 01, 2006
Posts: 24
thanks... Mohd Fuzail and Surendra Nichenametla

I tried executing my program from C:\MyProjects\beerV1\ directory
and its working ......
It has created class file in the beerV1\classes\com\web, as desired.

Once again ...thanks for your help
pooja
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help in compiling programs