• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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: 79703
381
  • 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: 22802
    131
    Eclipse IDE Spring 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:
     
    Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
    We need your help - Coderanch server fundraiser
    https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    reply
      Bookmark Topic Watch Topic
    • New Topic