Hi There,
See below, CASE(2) and CASE(2). Do you see any reasons why I sould get this error.
Let me know, if you have more questions.
Thanks
siva
~/reading/java % echo $CLASSPATH
.:/home/siva/program/java/jaxp1.0.1/jaxp.jar:.:/home/siva/program/java/jaxp1.0.1/jaxp.jar
CASE(1):
---------
~/reading/java % javac LibTest.java
CASE(2):
---------
~/reading/java % javac -classpath "/home/siva/reading/java/com/siva/simple2" LibTest.java
LibTest.java:19: package com.siva.simple2 does not exist
import com.siva.simple2.*;
^
LibTest.java:34: cannot access List
bad class file: /home/siva/reading/java/com/siva/simple2/List.class
class file contains wrong class: com.siva.simple2.List
Please remove or make sure it appears in the correct subdirectory of the classpath.
List l = new List();
^
2 errors
CASE(3):
---------
~/reading/java % javac -classpath ".:/home/siva/reading/java:/home/siva/reading/java/com/siva/simple2:" LibTest.java
LibTest.java:34: cannot access List
bad class file: /home/siva/reading/java/com/siva/simple2/List.class
class file contains wrong class: com.siva.simple2.List
Please remove or make sure it appears in the correct subdirectory of the classpath.
List l = new List();
^
1 error
~/reading/java %
//********** LibTest.java ********** //
import com.siva.simple2.*;
public class LibTest {
public LibTest(){
System.out.println("LibTest()");
}
public static void main(
String[] args) {
LibTest lt = new LibTest();
List l = new List();
Vector v = new Vector();
}
} ///:~
//********** List.java ********** //
package com.siva.simple2;
public class List {
public List() {
System.out.println("com.siva.simple2.List");
}
public static void main( String[] args ){
List l = new List();
}
} ///:~
//********** Vector.java ********** //
package com.siva.simple2;
public class Vector {
public Vector() {
System.out.println( "com.bruceeckel.util.Vector123");
}
} ///:~
[ March 23, 2003: Message edited by: Sivanantham kandan ]