Hi guys,
I am trying to create a package, jar so that I can reuse it later.
- This is my package
/* START OF CODE */
package com.me.MyClass;
public class MyClass {
public void myMethod() {
/* ... */
}
}
/* END OF CODE */
- I compile it using
% javac -d c:\jdk1.3\jre\classes MyClass.java
- Then I jar it
%jar cf c:\jdk1.3\jre\classes\MyPackage.jar c:\jdk1.3\jre\classes\*.*
- I set the classpath to
c:\jdk1.3\jre\classes\MyPackage.jar
- Then I import it
I set the classpath in the environment variables (i run win2k)
c:\jdk1.3\jre\classes\MyPackage.jar
- But when i compile, i get the following error
MyProgram.java:4: cannot resolve symbol
symbol : class MyClass
location: package me
import com.me.MyClass;
^
Thanks for helping!
I am trying to create a package, jar so that I can reuse it later.
- This is my package
/* START OF CODE */
package com.me.MyClass;
public class MyClass {
public void myMethod() {
/* ... */
}
}
/* END OF CODE */
- I compile it using
% javac -d c:\jdk1.3\jre\classes MyClass.java
- Then I jar it
%jar cf c:\jdk1.3\jre\classes\MyPackage.jar c:\jdk1.3\jre\classes\*.*
- I set the classpath to
c:\jdk1.3\jre\classes\MyPackage.jar
- Then I import it
I set the classpath in the environment variables (i run win2k)
c:\jdk1.3\jre\classes\MyPackage.jar
- But when i compile, i get the following error
MyProgram.java:4: cannot resolve symbol
symbol : class MyClass
location: package me
import com.me.MyClass;
^
Thanks for helping!