How to compile jar file including all dependencies ?

Hi all,
I have an application with more than 50 classes that use third party libraries.
I would like to compact everything in just one single jar file BUT just the classes I need, not the whole external libraries.
Archive builder from JBuilder works pretty fine, but I need a command line tool to integrate this into an automatic compilation process from a bigger project.
What can I use ?
Thanks a lot!

Yes, I can live with it but, I cannot
believe
that there is no any command line tool for doingwhat
Archive Builder from Borland does !!I'd bet a year's salary that Archive Builder isn't
foolproof anyway. When you consider classes may be
instantiated dynamically thru reflection and so
forth, there's no way any tool can really tell with
100% certainty what all the dependencies are.But apart from dynamic class loading? I can manage dynamical loaded classes manually, but would be really helpful to have an automatic tool for including all 'static' dependecies.
This is a common task in other programming languages. How to do this using standard (free?) java tools?

Similar Messages

  • How to make jar file for this compilation method ?

    can any one tell me how to make jar file for this compilation
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJava
    *this is a compile code:-*
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    *and this is a run code:-*
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJavanow how make JAR file ?

    Assuming IEInJava only uses classes inside the jdic jar, this is one way. D:\java\browser\IEInJava> jar cf yourjar.jar IEInJava.classThen to run it you would use D:\java\browser\IEInJava> java -cp jdic.jar;yourjar.jar IEInJavaAnother way would use the jar manifest file to specify the Main-Class and Class-Path.

  • Creating jar file including 2 another jar files

    hi
    My project has java files, properties files,batch files as well as two jar files,mail.jar & activation.jar(for importing packages).
    I have to include these jar files while setting environment variables.
    Now i want to make "MyPrj.jar" file for myproject ,can anyone pls help me how to include these all files into a single jar file. and how to make setup file
    I have tried to extract out .class files of mail.jar & activation.jar & i ve created MyPrj.jar by including all class files(including class files of mail.jar & activation.jar) but manifest file(headers) are not added to MyPrj.jar.
    i have also tried to give mail.jar & activation.jar in Class-Path of menifest file, but it is also not working.
    Pls Help
    Thanks a lot

    [http://sourceforge.net/projects/one-jar]
    "One-JAR(TM) is a simple solution to a vexing problem in Java: how to distribute an application as a single jar-file, when it depends on multiple other jar-files. One-JAR uses a custom classloader to discover library jar files inside the main jar. "

  • Help! How to create Jar file for a packaged class?

    Hi!
    I am new in jar complexities. I made a swing frame that just prompts a JOptionPane when executed. I accomplished the same using jar without packaging my class SwingTest.
    But when i package it, it doesn't run. Can any one tell me how to make jar file of packaged classes and include images in the jar files too!
    Really Thanx!

    Call the Jar from the commandline to see the exceptions thrown.
    java -jar <jarFileName> <className>

  • How to make .jar file for a multiple class program

    I have a code for a chat room that contains two folders , one for Server and one for Client
    What I need is to create a jar file for the server and a jar file for the clients
    but here the first problem , I have a file that named (SocketMessengerConstants.class) that is located outside the two folders and is being read by the two projects .
    I mean the server uses it while running and the client uses it too .
    the second problem is : I don't know how to create a jar file at all !
    please tell me how to do it in detail
    Thank you

    ChuckBing wrote:[Packaging Programs in JAR Files|http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]
    I tried to read this tutorials before I come here but I couldn't understand it
    can you please tell me a specific steps to follow instead of the explaining .. because I understand the explanation but I can't apply it

  • How to make jar files availabe for deployed EJBs

    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
    classpath, but I think that shouldn't be the way. Is there somthing in the admin
    console to make jars available or do I have to insert it in the ear file? And
    if so, where do I hve to place it?
    Thanks
    Claudia

    Put the util.jar in the ear with your ejb jars - at the same level (i.e. in
    the root) - but do not include them in the manifest.xml.
    Also each ejb jar that refers to util.jar must have util.jar on its internal
    classpath in the manifest.
    "Claudia" <[email protected]> wrote in message
    news:3d537db5$[email protected]..
    >
    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
    classpath, but I think that shouldn't be the way. Is there somthing in theadmin
    console to make jars available or do I have to insert it in the ear file?And
    if so, where do I hve to place it?
    Thanks
    Claudia

  • How to compile .pll files

    Hi all,
    Seems to be a trivial one but i guess this is the fastest way to get help on how to compile .pll files
    in unix shell. Additionally if someone can also tell how to convert the .pll to a readabe .pld file.
    Regards
    Shishir

    Hi,
    I haven't actually done this on UNIX but I imagine it should be the same as on a Windows PC.
    For Forms 9i/10g try this: ifcmp90 lib.pll user/passwd@db batch=yes module_type=library
    ifcmp90 (ifcmp60 for Forms 6i) is in the bin directory of the developer suite.
    Achim

  • How to build jar file in JBuilder 9?

    Hi,
    I created a jar file by Archive Builder in JBuilder 9, I chose Executive jar as I need to run it on windows 2000 server. It is good if it is an exe file.
    I right click the jar file and build it. However, it is still zero byte, no files are packaged into it.
    How should I do it?
    Thanks for advice.

    I have JBuilder 9 but I didn't find any option of creating an Executive Jar. There is an option of creating an executable jar. You can try the following :
    1. Create a regular jar files having all files of your project using "Basic" Archive Builder option.
    2. Create executable jar file by selecting jar file created in step 1, main class file (the class having main method) and type of executable jar file.
    It worked for me.
    Thanks.

  • How TO DEPLOY JAR FILES INTO XI Server using SDM

    Hi XI Gurus,
       im working on adapter development. we have created jar file in NWDS.
       now going ahead to deploy into XI server through SDM.
       can we deploy jar files directly into xiserver through SDM. or it needs to convert to any other formate like EAR, SDA. then how would i convert to SDA.
      i any have clear idea on this... pls throw the ways how to convert........
               JAR File to EAR format
               JAR file to SDA format
               EAR file to SDA format         
       can any one explain the procedure step by step how to convert jar file into deployment archive file in order to succesfully into XI server.
              thanks  i advance. points will be rewarded.
      Regards
      Rajesh

    Hi Rajesh,
    JAR file in itself in not deployable.
    So v need to envelop this jar file into an EAR file and then v deploy this EAR file on SDM.
    Creating Jar
    Inside NWDS --> Windows --> Open perspective --> J2EE Development --> right click on ur proj --> Build EJB Archive
    Converting .EAR file to .SDA
    Converting .EAR file to .SDA
    Regards,
    Prateek

  • How to make Jar files in JBuilder

    I would like to know how to make jar files using JBulider. I have a problem with a project that I am working with in Swing. I have made the project on JBuilder and when I make a jar file it will not run upon clicking.
    Any body with an answer, please help
    Abhi

    It sounds like your Main-Class is not set properly in your manifest. To set your Main-Class, please follow these directions:
    http://java.sun.com/docs/books/tutorial/jar/basics/run.html

  • How to add jar files which point to project

    when i create project in jse8 i added jar files form system.
    then when i move that project to another system it is asking for jar files.it is pointing to location from where we added.
    how to make jar files available locally so that i can move anywhere.

    This might be a CRUDE solution, but it helps :-)
    1. Create a new folder (e.g. lib) under your project
    2. Copy the interested Jars to the folder. ( I am not sure how to do from within the IDE, I just copied the jars using Explorer.
    3. Right-Click on the Libraries Node to add the Jars and Add them from the folder created in step 1.
    This works... :-)

  • Where is the jar file includes ejb3.0 interface

    I just start using ejb 3.0, when i create a stateless session bean, i can not find the Stateless interface when import javax.ejb.Stateless. Appreciated if someone can let me which jar file includes those interface (like javax.ejb.Remove, javax.ejb.Stateful, etc.) and where to download?

    Hi,
    check jdeveloper_home\jdeveloper_10133_<version>\jlib\identitystore.jar
    Frank

  • How to load jar file in oracle 9i???

    Hi Friends,
    Can you help me, how to load jar file oracle 9i? I have to tried to load in 10g using loadjava command but it's not working in oracle 9i because the loadjava batch file itself is not there in oralce 9i.
    Is there any other way then pls let me know.
    - Hiren Modi

    Hi,
    I have oracle version : Release 2 (9.2.0.1.0) for Windows. I have tried to execute the loadjava command from SQL prompt but its giving as below.
    H:\>loadjava
    The system cannot find the path specified.
    Do you know why its giving error like this. I have checked in dir : C:\oracle\ora92\bin but loadjava executable file is not there in it.
    - Hiren Modi

  • How many Ways jar files from ear file on a jboss can be downloaded on clien

    Aoa
    How many Ways jar files from ear file on a jboss can be downloaded on client side
    like jnlp etc..
    Regards
    M Fazal Ur Rehman

    First, you need to be able to boot from the Recovery HD:
    Boot Using Command+R keys:
      1. Restart the computer.
      2. Immediately after the chime press and hold down the
          "COMMAND" and the "R" keys together.
      3. Release the keys when the Utilities Menu appears.
    Once at the Utilities Menu select Terminal from the Utilities menu in the screen's menubar. Now, you need to know where these new files are located. You move to any location using the 'cd' command such as cd /Users/user_name/Documents, then press RETURN. Replace user_name with your actual username. Next you need to do a directory listing to see if your files are in that location, Documents. Use ls -al to do a directory listing of the files and folders in Documents. If you find your new files there, then connect an external drive or flash drive. You will need to know the name you have assigned to this drive. It needs to be already formatted. Copy your files using cp /Documents/filename /Volumes/volname/filename. Replace volname and filename with those that apply. Press RETURN.
    Or take it to your local Apple Store and see if they can do the chore for you.

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

Maybe you are looking for

  • Help required on mapping to remove duplicate entries

    Hi all experts, I need some help in mapping. I am new to this tool. How would I remove duplicate entries in source payload? My structure is as follows Message Structure <List> 1-1 <ParentNode> 0-unbounded <Child1> 0-1 <Child2> 0-1 Source: <List>     

  • Category field in Service Ticket

    Hi all, CRM 5.0 ICWC How/where can we see the categroy field in the ICWC service ticket. Scenario : e mail service ticket will have category E-mail and Telephonic call service ticket will have TEL as the categroy . CRM Online has the Category filed i

  • HT204053 Can't I just transfer my mobile me address

    I had a me.com e-mail adress it's going away soon, I set up an I Cloud address thats differnet. Why can't i link my old me.com to my I Cloud adress so it just flows like a river, smooth and down hill. Is there a worm in my Apple? What up with this Ap

  • Highlights, but no comments on PDF annotated outside of Reader for iOS

    I can't seem to view comments on a PDF which was annotated before importing to Reader for iOS. Highlights show up, just not the comments associated with them.

  • Wanting to know more about using my iphone to skype

    Hi, everyone.. i did a quick serach about skype on the forum but there is not much information about it. So i'm going to ask you guys a bit more using the iphone to skype. Me and my husband both of us got iphone4 and many of our friends as well. So c