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....