Creating a .jar file [message #520295] |
Thu, 11 March 2010 15:32  |
Eclipse User |
|
|
|
Hi Developers.
My issue is this, i have some java files which i would like to export and use as .jar files.
All files contains classes, the files all ends with .java extention and are contained into a java project.
I've seen the Eclipse tutorial for this case which advise to use:
Click on project>Export>java>jar file>Save as("verkiezingen")>Location("desktop")
Indeed it seems successfull as i see on my desktop the .jar file and while exporting the final dialog box does not tell me "exported with warnings"
I then try to import the jar within a project like so:
Right click on project>Build Path> add external jar's>select jar
all good so far as i see the new item "Referenced package" under the usual "JRE system library"
If now, within the project i create a new class and start with import.verkiezingen;
it gives me an error message saying "The import verkiezingen cannot be resolved"
cant understand why, if i open the jar from the "Reference package" the classes are there.
I will paste the code of a class within the project i've tried to export initially as jar.
public class StemmachineException extends RuntimeException {
public StemmachineException(){
super();
}
public StemmachineException(String s){
super(s);
}
}
Thx guys
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03448 seconds