File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 19655
    
  18



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.
 
wood burning stoves
 
subject: Package does not exist problem
 
Similar Threads
Why javac does not find this Java file?
a class in default invoked by a class in another package
errors generated when running Ant build file in Eclipse
Beginner at Ant and Servlets
package class.src