File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package problems...

 
Prashanth Lingala
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends...
I got a peculiar problem...

i have a directory c:\first in which i have placed A.java
i have a directory c:\second in which i have placed B.java

Here's the source:



and


A.java compiles fine
So far so good...
when i compile from B.java c:\second on the command prompt

i get the following error

C:\second>javac B.java
B.java:3: package first does not exist
import first.*;
^
B.java:5: cannot resolve symbol
symbol : class A
location: class second.B
class B extends A {}
^
2 errors


I dont know what mistake i am making...???
kindly explain me...
 
A Kumar
Ranch Hand
Posts: 980
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Ur package A is not in the classpath...

Set it and u wud be on ur way..

Bye
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need help with setting your CLASSPATH, see this page from our friendly FAQ!

Layne
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic