aspose file tools*
The moose likes Beginning Java and the fly likes problem with using javac -d ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem with using javac -d ?" Watch "problem with using javac -d ?" New topic
Author

problem with using javac -d ?

shoeb sayyed
Ranch Hand

Joined: Mar 14, 2010
Posts: 48
the structure of my files are as follows

E:\AqanTech\WebApp1\WEB-INF\src\S1.java

E:\AqanTech\WebApp1\WEB-INF\classes\

i want to have .class file to be stored in E:\AqanTech\WebApp1\WEB-INF\classes\ after compilation

i am trying to compile it using javac -d .\classes ..\src\*.java while i am in E:\AqanTech\WebApp1\WEB-INF\src

it gives me an error which is attached in the file

Can you please help me with that?




[Thumbnail for t1.JPG]


Thanks,
Shoeb
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
Please copy and paste your error messages.
On Windows:
  • click the top left icon on the command prompt
  • select edit from the drop down list
  • select mark
  • highlight the code with your mouse, remembering to highlight the whole length of the lines
  • use the enter key to copy
  • past the text onto the JavaRanch windows.
  • shoeb sayyed
    Ranch Hand

    Joined: Mar 14, 2010
    Posts: 48
    E:\AqanTech\WebApp1\WEB-INF\src>javac -d .\classes ..\src\*.java
    ..\src\S1.java:4: error while writing S1: .\classes\S1.class (The system cannot
    find the path specified)
    public class S1 extends HttpServlet

    I just pasted the error from the command Prompt Window

    please someone help me with this?
    Marco Pacini
    Greenhorn

    Joined: Mar 16, 2010
    Posts: 5
    Try to compile it using "javac -d E:\AqanTech\WebApp1\WEB-INF\classes\ *.java" while you are in E:\AqanTech\WebApp1\WEB-INF\src.
    Rob Spoor
    Sheriff

    Joined: Oct 27, 2005
    Posts: 19722
        
      20

    Add the JAR file that includes the servlet classes (servlet-api.jar?) to your class path when compiling as well as the classes folder:


    SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
    How To Ask Questions How To Answer Questions
     
    It is sorta covered in the JavaRanch Style Guide.
     
    subject: problem with using javac -d ?