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
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

classpath

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
here is the directory structure:
C:\ dirA\dirB\dirC\A.java
when i try to compile using the command
1:-c:\javac -cp dirA\dirB\dirC\A.java
it displays the error message
javac: no source files
but when i pass this command
2:-c:\java -cp \dirA \dirA\dirB\dirC\A.java
it compiles successfully. what is the difference between 1st command & 2nd command.

if I am inside dirA i.e c:\dirA>
what should I give as classpath variable to complie & execute A.java.
what is relative classpath i.e what is meaning of -cp dirB;dirB\dirC?
if i execute the command c:\dirA> javac -cp dirB;dirB\dirC\A.java.The error message is "javac: no source files is found ".
why did I get this error message when A.java file is inside dirC.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not cross-post. It makes people less inclined to take the time to respond when they find the same question has been answered in another forum.
 
Friends help you move. Good friends help you move bodies. This tiny ad will help:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    Bookmark Topic Watch Topic
  • New Topic