facebook

Create a jar package to run out of myeclipse

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #283399 Reply

    I 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.

    #283405 Reply

    Loyal Water
    Member

    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/

    #283412 Reply

    @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?

    #283429 Reply

    Loyal Water
    Member

    You can create a jar by right clicking on your project and going to Export > Java > Jar and following the wizard.

    #283462 Reply

    @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

    #283468 Reply

    Ton Huisman
    Member

    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
    Ton

    #283492 Reply

    @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
    Ton

    What 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

    #283507 Reply

    Loyal Water
    Member

    Glad you got it to work.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Create a jar package to run out of myeclipse

You must be logged in to post in the forum log in