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>

Similar Messages

  • 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 create xpi file for my own extension?

    I have created my own extension and directly added profile extension folder in my system.its working fine. but while installing extension using .xpi file its produce error "Install script not found
    -204".Please explian me how to create .xpi file for my extension folder.
    I hope you can help this issues.
    Thanks in advance.
    Regards
    vasanthi

    See this:
    https://developer.mozilla.org/en/Building_an_Extension

  • 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

  • Need how to create DTD file  for database elements

    can any one write the DTD file for below query?
    SELECT TRX_NUMBER,
    INVOICE_CURRENCY_CODE,
    CTT_TYPE_NAME ,
    RAC_BILL_TO_CUSTOMER_NAME ,
    FROM APPS.RA_CUSTOMER_TRX_PARTIAL_V V
    DTD file structure For below query(data from two tables) also?
    SELECT TRX_NUMBER,
    INVOICE_CURRENCY_CODE,
    CTT_TYPE_NAME ,
    RAC_BILL_TO_CUSTOMER_NAME ,
    V.RAT_TERM_NAME
    FROM APPS.RA_CUSTOMER_TRX_PARTIAL_V V,APPS.RA_CUST_TRX_TYPES_ALL H
    WHERE V.CUST_TRX_TYPE_ID=H.CUST_TRX_TYPE_ID;
    DTD file structure For below program (Data should be come in that loop formate (1st c1 loop then 2nd loop details then 1st loop)
    DECLARE
    cursor c1 is SELECT TRX_NUMBER,
    CUSTOMER_TRX_ID,
    INVOICE_CURRENCY_CODE,
    CTT_TYPE_NAME ,
    RAC_BILL_TO_CUSTOMER_NAME ,
    V.RAT_TERM_NAME
    FROM APPS.RA_CUSTOMER_TRX_PARTIAL_V V,APPS.RA_CUST_TRX_TYPES_ALL H
    WHERE V.CUST_TRX_TYPE_ID=H.CUST_TRX_TYPE_ID;
    cursor c2(P_CUSTOMER_TRX_ID number) is SELECT CL.INTERFACE_LINE_ATTRIBUTE1 ,
    CL.CUSTOMER_TRX_LINE_ID,
    MTL.SEGMENT1,
    MTL.DESCRIPTION
    FROM APPS.RA_CUSTOMER_TRX_LINES_V CL,
    APPS.MTL_SYSTEM_ITEMS_B MTL
    WHERE MTL.INVENTORY_ITEM_ID(+)=CL.INVENTORY_ITEM_ID
    AND MTL.ORGANIZATION_ID(+) = CL.WAREHOUSE_ID
    and cl.CUSTOMER_TRX_ID=P_CUSTOMER_TRX_ID
    BEGIN
    FOR I IN C1 LOOP
    DBMS_OUTPUT.PUT_LINE(I.TRX_NUMBER||I.CUSTOMER_TRX_ID||INVOICE_CURRENCY_CODE);
    FOR J IN C1(I.CUSTOMER_TRX_ID) LOOP
    DBMS_OUTPUT.PUT_LINE(J.INTERFACE_LINE_ATTRIBUTE1 ||J.CUSTOMER_TRX_LINE_ID||J.SEGMENT1);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE(I.RAC_BILL_TO_CUSTOMER_NAME);
    END LOOP;
    END;

    how to create batch file for windows application ??
    I hava 2 jar files
         1) b.jar (not have main class)
         2) a.jar (have main class and dependent on b.jar)
    so how i call main class of a.jar     ??Just set the main class in the manifest of a.jar and make sure the manifest knows about b.jar
    http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

  • How to create Variant file for ECATT(MM01)?

    Any one know how to create variant file for ECATT (MM01)

    Hello TJK,
    What do you mean by variant file? Please give some more details.
    Meanwhile here is the link on how to use eCATT,
    New to Materials Management / Warehouse Management?
    Hope this helps.
    Regards
    Arif Mansuri

  • Problem while creating JAR file for my swing application

    Hi...
    Using my swings application I am trying to Run different software�s .
    My program is Running fine from command prompt. If I create JAR file
    It is giving error like �Failed to load Main-Class manifest attribute from .jar�
    Can anybody help me to creating JAR file
    Thanks in advance
    Cheers
    Mallik

    hi,
    User following command
    jar-cmf textfile_name.txt Jarfile_name *
    here you have to make manifest file
    and making jar file you have reach there by command promt
    and manifest file have some constraint also as well as format
    format are
    Manifest-Version: 1.0
    Class-path: jar file name which are using in app separed by space
    Created-By: 1.5.0 (Sun Microsystems Inc.)
    Main-Class: Main class name
    and end of file is not have carriage return

  • How to create jar file in WSAD ide?

    Hi,
    Can any one help me in creating jar file
    in WSAD ide?

    RTFM comes to mind, the manual often knows such things.

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

  • How to create jar file

    Hi
    I installed the j2me software j2me_wireless_toolkit-2_2-windows.exe. After installing the path is C:\WTK22\
    when iam creating the new project. Its woking fine. I can able to see the demo on the simulator. After building the porject. inside the bin folder there is only JAD file and MF files are there. There is no jar file for the project. If i want to execute the project in my mobile i need the jar file.
    So help me how to create the executable jar file for the project in the software.
    Regards
    A.Krishnaraj

    How to create package after building the project. Is there is any link are presented in software or we have to do manually.
    Regards
    A.Krishnaraj

  • How to create jar files from my code?

    Hi, I�m a rookie programmer and i need to create jar files in my application code. Which classes do i need to use?
    Can anybody give me an example?
    Thanx in advance

    Thanx Uwe. You�re right, i�m only trying to create jar
    files (and extract files from a jar file) I will try
    what you told me. Anyway, I have some doubts about how
    to use those classes.Can you give me any example?
    Thanx again!To create jar files use the class JarOutputStream.
    Add a ZipEntry for each entry in the jar file.
    To read jar files use the class JarInputStream and get all JarEntry.
    It should be straight forward.
    Uwe

  • Urgent help: how to create data source for Weblogic RMI driver

    Hi,
    Please let me how to create data source for Weblogic RMI driver using Administrator
    console.
    I understand that the following steps are required:
    1.Create connection pool for the RMI driver by specfiying URL as
    jdbc:weblogic:rmi and Driver as weblogic.jdbc.rmi.Driver. Now
    comes the problem.. what do put in properties text area? I am
    talking about key/value pairs required?
    2. Having done step 1 ( which I was not able to do) , create a new DataSource
    mapping to the connection pool created from step 1.
    How to accomplish step 1 ? I want to finally connect to Oracle
    database. Please help me.
    pradeep bhat

    DataSource will internally do that for you (It will use RMI internaly) . You
    dont have to worry about the details of using RMI driver. Thats what is a
    DataSource is for.
    sree
    "pradeep bhat" <[email protected]> wrote in message
    news:[email protected]...
    Hi Sree,
    What u have written is abt configuting Datasource for type 2 and
    4 drivers.
    But I want to know how to create data source for RMI driver. If
    I map this datasource to connection pool that is created for
    type 2 or 4 drivers, i don't understand why RMI drivers are
    required in first place. If i do map the data source to connection pool
    created
    for type 2 or 4 drivers then where i
    would not have used the URL as jdbc:weblogic:rmi and Driver as
    weblogic.jdbc.rmi.Driver.
    Hope u will help me.
    pradeep bhat
    "Sree Bodapati" <[email protected]> wrote:
    Hi Pradeep
    To create a connection pool you have to use a database driver not RMI
    driver. So use a thin driver or the WebLogic jDriver for Oracle to setup
    your connection pool. Once the connection pool is created you can create
    a
    DataSource and use this datasource to connect to the database.
    The RMI driver can be used to get connections from the database via the
    connection pool and in that case you dont need a datasource. Recommended
    approach is to use a DataSource.
    hth
    sree
    "PRADEEP BHAT" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    Please let me how to create data source for Weblogic RMI driver using
    Administrator
    console.
    I understand that the following steps are required:
    1.Create connection pool for the RMI driver by specfiying URL as
    jdbc:weblogic:rmi and Driver as weblogic.jdbc.rmi.Driver. Now
    comes the problem.. what do put in properties text area? I am
    talking about key/value pairs required?
    2. Having done step 1 ( which I was not able to do) , create a new
    DataSource
    mapping to the connection pool created from step 1.
    How to accomplish step 1 ? I want to finally connect to Oracle
    database. Please help me.
    pradeep bhat

  • Urgent help: how to create data source for Weblogic T3 driver

    Hi,
    Please let me how to create data source for Weblogic T3 driver
    using Administrator console.
    I understand that the following steps are required:
    1.Create connection pool for the RMI driver by specfiying URL
    as jdbc:weblogic:rmi and Driver as weblogic.jdbc.rmi.Driver.
    Now comes the problem.. what do put in properties text area?
    I am talking about key/value pairs required?
    2. Having done step 1 ( which I was not able to do) , create a
    new DataSource mapping to the connection pool created from
    step 1.
    How to accomplish step 1 ? I want to finally connect to Oracle database. Please
    help me.
    pradeep bhat

    Hi,
    Please let me how to create data source for Weblogic T3 driver
    using Administrator console.
    I understand that the following steps are required:
    1.Create connection pool for the RMI driver by specfiying URL
    as jdbc:weblogic:rmi and Driver as weblogic.jdbc.rmi.Driver.
    Now comes the problem.. what do put in properties text area?
    I am talking about key/value pairs required?
    2. Having done step 1 ( which I was not able to do) , create a
    new DataSource mapping to the connection pool created from
    step 1.
    How to accomplish step 1 ? I want to finally connect to Oracle database. Please
    help me.
    pradeep bhat

  • Please help me to create .exe file for my VI.. thanks in million

    Dear all,
    The software I have is LV6.1 full version, so I cant make .exe file.
    Can someone help me to crate .exe file for the attach library thanks.
    I need it for my presentation and the skol PC dont have LV.
    if the file is big, pls send to [email protected]
    thanks in million.
    maymaythar
    When you feel sad, laugh
    Attachments:
    voltage regulator analysis.llb ‏687 KB

    As has been mentioned, you need LabVIEW professional or higher. (If you only have base or full, you need to buy the application builder extra).
    Building an application is as easy as selecting "tools...built application or shared library", and specify the desired source VIs, built settings and installer settings.
    All diagrams and unneeded front panels are removed. The process is thus irreversible and you cannot recreate the original VIs from the application.
    LabVIEW Champion . Do more with less code and in less time .

  • How to create License file for New ADDON.

    Hi,
    Can any one tell me steps to create license file for any addon which is developed in VB.NET.
    Regards ,
    Ganesh

    Hi,
    The license system for addons is working fine for a long time now. The date of January 2005 now changed to 2007 or 2008 is only the date until when you can work without the AddOnIdentifier (we give some extra time for the addons to migrate to the new system).
    If you use the AddOnIdentifier then you have to ask for a LicenseKeyName to SAP to create your solution AddOnIdentifier. Then your clients to be able to run your addon will need a specific license in their file corresponding to your licenseKeyName (when you ask for a license file you can ask for different partners addons licenses). The system is up and running for a long time now.
    What problems are you having with it? I cannot see your point.
    Regards
    Trinidad.
    Hope it helps

Maybe you are looking for