aspose file tools*
The moose likes Beginning Java and the fly likes Package does not exist problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Package does not exist problem" Watch "Package does not exist problem" New topic
Author

Package does not exist problem

Ravisankar Karunanithy
Greenhorn

Joined: Jul 27, 2007
Posts: 4
Hi All,

I have directory structure like this

C:>work
repos
src
common
-->Record.java
sms
-->Parse.java.



my programs are..

Record.java
-----------
package work.repos.src.common;
public class Record
{
public static void main(String ar[])
{
First f = new First();
f.callMe();
}
}
class First
{
public void callMe()
{
System.out.println("Prit me first");
}

}

Parse.java
------------

package work.repos.src.sms;
import work.repos.src.common.*;
public class Parse
{
public static void main(String arg[])
{
Record record = new Record();

}
}


c:>cd work\repos\src\common
c:\work\repos\src\common>javac Record.java.

I got class file of Record.class and First.class

While I trying to compile this Parse.jave....

c:\work\repos\src\sms>javac Parse.java

I have been getting error like...

package work.repos.src.common does not exit..

is this right way to compile.?
what is the error?
how to set classpath here?

I would be happy if anyone give me the answer?

please....
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20



SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ravisankar Karunanithy
Greenhorn

Joined: Jul 27, 2007
Posts: 4
Hi Rob Prime,

Thank you.

Ravi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Package does not exist problem