Hi,
Am creating a package called com.vijay.simple and the CLASSPATH variable is set to D:\vijay\java\jdk1.4\bin. My working directory is D:\vijay\java\programs\tij.
I executed two java source files List.java and Vector.java in my working directory.
// Creating a package.
package com.vijay.simple;
public class Vector
{
public Vector()
{
System.out.println("Executing default constructor in Vector");
}
} ///:~
---------------------------------------------------------------------------
// Creating a package.
package com.vijay.simple;
public class List
{
public List()
{
System.out.println("Executing default constructor in List");
}
} ///:~
---------------------------------------------------------------------------
// Uses the library.
import com.vijay.simple.*;
public class LibTest {
public static void main(String[] args) {
Vector v = new Vector();
List l = new List();
}
} ///:~
---------------------------------------------------------------------------
When I import this package in main program am getting an error message as below
"LibTest.java:3: package com.vijay.simple does not exist
import com.vijay.simple.*;"
Can anyone please help me out with this problem?
Am creating a package called com.vijay.simple and the CLASSPATH variable is set to D:\vijay\java\jdk1.4\bin. My working directory is D:\vijay\java\programs\tij.
I executed two java source files List.java and Vector.java in my working directory.
// Creating a package.
package com.vijay.simple;
public class Vector
{
public Vector()
{
System.out.println("Executing default constructor in Vector");
}
} ///:~
---------------------------------------------------------------------------
// Creating a package.
package com.vijay.simple;
public class List
{
public List()
{
System.out.println("Executing default constructor in List");
}
} ///:~
---------------------------------------------------------------------------
// Uses the library.
import com.vijay.simple.*;
public class LibTest {
public static void main(String[] args) {
Vector v = new Vector();
List l = new List();
}
} ///:~
---------------------------------------------------------------------------
When I import this package in main program am getting an error message as below
"LibTest.java:3: package com.vijay.simple does not exist
import com.vijay.simple.*;"
Can anyone please help me out with this problem?