- This topic has 7 replies, 3 voices, and was last updated 16 years, 8 months ago by Loyal Water.
-
AuthorPosts
-
Rodolfo RicciMemberI have a project (A client web services) created on MyEclipse.
I would like to know whou to export to a .jar file to run this aplication on another machine without my eclipse.
Loyal WaterMemberIm not sure what your looking for. Can you please rephrase the question for me.
I hope you have gone through this tutorial:-
http://www.myeclipseide.com/documentation/quickstarts/webservices/
Rodolfo RicciMember@support-nipun wrote:
Im not sure what your looking for. Can you please rephrase the question for me.
I hope you have gone through this tutorial:-
http://www.myeclipseide.com/documentation/quickstarts/webservices/I Created a Client Project on MyEclipse.
Now I need to run the application created on MyEclipse on another machine, not inside Myeclipse.
I need export the aplication to a jar file with all packages to put on another machine directory to run like an application without MyEclipse enviroment.Supose you create an apliation and need to send it to a friend run on computer that hasn’t MyEclipse. It has only java enviroment. How can I do it?
Loyal WaterMemberYou can create a jar by right clicking on your project and going to Export > Java > Jar and following the wizard.
Rodolfo RicciMember@support-nipun wrote:
You can create a jar by right clicking on your project and going to Export > Java > Jar and following the wizard.
I made it but there is no lib on jar file only the classes created by the WebServices client wizard.
The xfire lib isn’t there
Ton HuismanMemberThat is normally not present in(side) your .jar, you’ll have to add that yourself when deploying/packaging. You’ll have to add a ‘Main-Class’ setting to your manifest, to have a default class file to run when just typing ‘java -jar myjar.jar’ on a commandline.
Usually the building, packaging and deployment with more than a simple .jar, is performed with ANT or MAVEN (sometimes combined with Ant) and their respective scripts. It allows you to perform each task you need to, including putting the correct information in the manifest, leaving out everything but your own classes, building JavaDoc and source jars, and packing it all up with any external jars and other files into a zip/war/ear-file.
Their respective websites have all the info you need to get started. Go have a look at Ant and Maven here.Btw, (My)Eclipse comes standard with Ant support built-in, but if you need to compile your Java sources, you’ll have to install a full Java JDK, and add a reference to that from Window/Preferences…/Java/Installed JREs. Just add the reference to some standard JDK like 1.5 or 1.6, and make that the default by selecting it’s checkbox.
HTH
Ton
Rodolfo RicciMember@huisma13 wrote:
That is normally not present in(side) your .jar, you’ll have to add that yourself when deploying/packaging. You’ll have to add a ‘Main-Class’ setting to your manifest, to have a default class file to run when just typing ‘java -jar myjar.jar’ on a commandline.
Usually the building, packaging and deployment with more than a simple .jar, is performed with ANT or MAVEN (sometimes combined with Ant) and their respective scripts. It allows you to perform each task you need to, including putting the correct information in the manifest, leaving out everything but your own classes, building JavaDoc and source jars, and packing it all up with any external jars and other files into a zip/war/ear-file.
Their respective websites have all the info you need to get started. Go have a look at Ant and Maven here.Btw, (My)Eclipse comes standard with Ant support built-in, but if you need to compile your Java sources, you’ll have to install a full Java JDK, and add a reference to that from Window/Preferences…/Java/Installed JREs. Just add the reference to some standard JDK like 1.5 or 1.6, and make that the default by selecting it’s checkbox.
HTH
TonWhat I made was get all packages referenced by the project and packed in a jar file with the project’s classes.
and it’s working.thanx
Loyal WaterMemberGlad you got it to work.
-
AuthorPosts