Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with using javac -d ?

 
shoeb sayyed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

t1.JPG
[Thumbnail for t1.JPG]
Command Prompt Image
 
Campbell Ritchie
Sheriff
Pie
Posts: 48972
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
    Posts: 48
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 5
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Pie
    Posts: 20532
    54
    Chrome Eclipse IDE Java Windows
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Add the JAR file that includes the servlet classes (servlet-api.jar?) to your class path when compiling as well as the classes folder:
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic