Using JDK 1.4
Folks would be great if you could help me out here :
Lets say I have a file called Sample1.java under
<directory>/a/b :
The file Sample1.java is as follows :
package a.b;
public class Sample1
{
public Sample1()
{
}
public static void main(
String []args)
{
Sample a =new Sample();
System.out.println("hello world");
}
}
and under <directory>
I have got a class.jar that contains just Sample.class ( no package or
anything,just the class file)
How do I compile this??
I do the following:
<directory>/a/b/javac -classpath .:<directory>/class.jar Sample1.java
I get the following error:
--------------------------------------------------------------
Sample1.java:12: cannot resolve symbol
symbol : class Sample
location: class a.b.Sample1
Sample a =new Sample();
^
Sample1.java:12: cannot resolve symbol
symbol : class Sample
location: class a.b.Sample1
Sample a =new Sample();
--------------------------------------------------------------
How do I resolve this issue?What am I doing wrong here.
Please dont ask me to put the Sample.class in a package , I wont be
able to do that since that jar is actually already available.
Thanks
Sumant