I am trying to learn how to create a package. I am reading this link.
My question is about the CLASSPATH. Not sure where to put this or if I need it.
I am using the IDE Eclipse
I am at the part setting up the CLASSPATH.
STEPS I have taken.
CREATED PACKAGE
package world;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
My package is in the following directory and compiled.
C:\java_samples\learning\src\world
I created the following CLASSPATH VARIABLE.
Name: MyClassPath_LEARNING
PATH:C:/java_samples/learning/src/world
Then I created this class
import world.*;
public class testPackage {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
HelloWorld helloWorld = new HelloWorld();
}
}
There is an error with the import world.*;
It is squiggly underline and it states
The import world is never used.
Please let me know if this is enough information or if there is simpler tutorial
My question is about the CLASSPATH. Not sure where to put this or if I need it.
I am using the IDE Eclipse
I am at the part setting up the CLASSPATH.
STEPS I have taken.
CREATED PACKAGE
package world;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
My package is in the following directory and compiled.
C:\java_samples\learning\src\world
I created the following CLASSPATH VARIABLE.
Name: MyClassPath_LEARNING
PATH:C:/java_samples/learning/src/world
Then I created this class
import world.*;
public class testPackage {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
HelloWorld helloWorld = new HelloWorld();
}
}
There is an error with the import world.*;
It is squiggly underline and it states
The import world is never used.
Please let me know if this is enough information or if there is simpler tutorial