• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with using javac -d ?

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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?
     
    Greenhorn
    Posts: 5
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
     
    Sheriff
    Posts: 22784
    131
    Eclipse IDE Spring VI Editor Chrome Java Windows
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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:
     
    reply
      Bookmark Topic Watch Topic
    • New Topic