How to export desktop app into jar file??

Hello,
I have a desktop application needing some jar libraries.
I've exported my application using eclipse exporting wizard, so I've achieved
an app.jar with a simple Manifest.mf (only indicating Main-Class)
I've modified the manifest.mf to include all the jar libraries in the Class-Path.
The manifest.mf looks like this:
Manifest-Version: 1.0
Class-Path: lib/commons-collections-3.1.jar lib/commons-digester-1.7.jar Main-Class: com.pack2.pack2.MainClasse
When I try to execute the application with the command line:
java -jar app.jar
The next exception is thrown:
Exception in thread "main" java.lang.NoClassDefFoundError: pack1/class1
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Can anybody help me please?
Thanks in advance!

I've alredy found the solution:
Class-Path: . ./lib/lib1.jar ./lib/lib2.jar
The clue is both on Class-Path attribute sintax and the TWO returns after the last manifest line.
Hope helps others!

Similar Messages

  • How to export report output into excel file

    hi friends,
    i would like to get the solution from you for how to export the report output into a .xls file. i know how to convert it into .rtf and .txt files but i think it's difficult to do this .xls way, could you help me to comeover this problem?
    thankyou very much.

    The official answer is "delimited", which
    generates adequate comma or other delimited
    text. No formatting, and without extra
    effort no support for non-ASCII characters.
    Might be sufficient for you.
    Note that Excel can read html files - we
    built programs to generate html files with
    name of "blah.xls" and some Excel-ish
    extensions, so Excel is automatically opened
    and the document is all nice and pretty.
    (Oracle html output has some odd logic about
    choosing number of columns, we didn't use
    it.)
    -- Allan Plum

  • How to run Java App in Jar file

    I can run Java App jar-ed into 1 jar file with java -jar App.jar
    But sometimes I need to jar only the app and bind the other classes from different place. So I tried to use:
    java -classpath c:\utils.jar -jar App2.jar
    where classes in App2.jar link to utils.jar. I just can't make it work. Any idea/help.
    thanks
    -ho

    hi HasanOen
    u need to edit the manifest file in yr JAR file u can do this by using the following cammand or by making the batch file but make sure all the files are in same folder.
    first of all u need to make a text file like below
    /////////// first file name: "THIS.txt" /////////
    Manifest-Version: 1.0
    Created-By: java // whatever here
    Main-Class: PUT YOUR MAIN CLASS NAME HERE (like MAIN)
    //////////////////// BATCH FILE "RUN.bat" //////////////
    jar cmf This.txt App2.jar MANIFEST.mf com
    com is the folder where your all the class file are.
    now double click the run.bat file. this will edit yr manifest file.
    hope this should work for u
    Note : Make sure yr jar file, txt file, bat file, and yr classes folder is in the same folder(I mean at same level)
    regards
    Satinderjit

  • How to export all tracks into audio files with the same duration

    Hi everybody.
    I am trying to export all the tracks into different audio files.
    It's 10 soft. instruments and an audio track. I tried with "File>Export>All Tracks as Audio File but the result is 11 audio files with different lengths. As the song is 3 minutes and 20 seconds I would like every single track to be 3.22 sec long.
    How do I do it? In fact, each track is composed not only by played instruments but also by moments of silence.
    Thanks!!
    Alessandro

    sambino wrote:
    I tried with "File>Export>All Tracks as Audio File but the result is 11 audio files with different lengths. As the song is 3 minutes and 20 seconds I would like every single track to be 3.22 sec long.
    The files are different lengths because each instrument does not stop playing at the same moment. It would accomplish nothing other than waste disk space if Logic appended silence to the end of each file in order to make each track the same length. The different lengths you see mean nothing because the absence of appended silence means nothing.
    each track is composed not only by played instruments but also by moments of silence.
    Naturally. And that silence is accounted for in your exported files, when the silence appears at the beginning of the track, and when it appears during the track. It just isn't appended at the end because that would be pointless. Consider this project, consisting of four tracks:
    When I use the command File > Export > All Tracks as Audio Files, Logic will produce four files that look like this:
    The files are not equal in length, which is perfectly fine. What's important is that they all start at bar 1, and will align properly when imported into some other program. So all you need is the command you already used: File > Export > All Tracks as Audio Files. In one step, it will produce all the files you need, and it will produce them correctly.
    By using Bounce, you would be gaining nothing except extra work, because you would have to do it separately for each file you wanted to produce. With Export > All Tracks as Audio Files, you get all your files with just one command.
    iSchwartz wrote:
    exporting tracks means that any panning or automation will not be rendered. So if you want the engineer to put up all of your tracks at unity gain (all faders at zero) and have your tracks & stems reproduce the mix you're hearing at your studio, use bounce, not export.
    If you want to have your tracks & stems reproduce the mix you're hearing at your studio, there's no need to go to the extra effort of using Bounce instead of Export. You only need to enable (in the Export dialog) the checkbox "Include Volume/Pan Automation." This is explained on p. 1022. When you do this, any panning or automation will indeed be rendered.

  • How to export waveform data into text file

    Hi..
        I am trying to export my waveform graph data into write spreadsheet file. When running the proram, I am getting graph values (values in a matrix) when checking with the probe. But once I save it to a text file, the values recorded are just zeros. I have attached the text file along with this. Could anyone please tell me why the graph data is not recorded in the spreadsheet? I have extracted the Y component of the graph and then wired it to the write to spreadsheet function. It seems like the labview is getting the data.. but now the problem is how to get the data out of labview?

    Please find the attched image of the whole program. I tried running the program after removing the array to matrix but still I am not able to export the graph values to spreadsheet. The program as a whole is working as I am able to display the oscilloscope graph into the waveform graph but I am not able to export the values. When I tried using probes, I am getting differnet matrix values till the end of the connection given to 'write to spreadsheet' but not able to export the values. The second image shows the write to spreadsheet file inside the while loop as i thought it will reduce the memory.. but it is still not working...
    Attachments:
    Scanner complete program.jpg ‏713 KB
    full scanner program 2.jpg ‏664 KB

  • How to create and use library JAR files with command-line tools?

    Development Tools -> General Questions:
    I am trying to figure out how to put utility classes into JAR files and then compile and run applications against those JAR files using the command-line javac, jar, and java tools. I am using jdk1.7.0_17 on Debian GNU/Linux 6.0.7.
    I have posted a simple example with one utility class, one console application class, and a Makefile:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130520-2134.tar.gz
    Here is a console session:
    2013-05-20 21:39:01 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-20 21:39:12 dpchrist@desktop ~/sandbox/java/jar
    $ cat src/com/example/hello/HelloConsole.java
    package com.example.hello;
    import static com.example.util.Hello.hello;
    public class HelloConsole {
        public static void main(String [] args) {
         hello("world!");
    2013-05-20 21:39:21 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -f hello
    find . -name '*.class' -delete
    javac src/com/example/util/Hello.java
    javac -cp src src/com/example/hello/HelloConsole.java
    echo "java -cp src com.example.hello.HelloConsole" > hello
    chmod +x hello
    2013-05-20 21:39:28 dpchrist@desktop ~/sandbox/java/jar
    $ ./hello
    hello, world!I believe I am looking for:
    1. Command-line invocation of "jar" to put the utility class bytecode file (Hello.class) into a JAR?
    2. Command-line invocation of "javac" to compile the application (HelloConsole.java) against the JAR file?
    3. Command-line invocation of "java" to run the application (HelloConsole.class) against the JAR file?
    I already know how t compile the utility class file.
    Any suggestions?
    TIA,
    David

    I finally figured it out:
    1. All name spaces must match -- identifiers, packages, file system, JAR contents, etc..
    2. Tools must be invoked from specific working directories with specific option arguments, all according to the project name space.
    My key discovery was that if the code says
    import com.example.util.Hello;then the JAR must contain
    com/example/util/Hello.classand I must invoke the compiler and interpreter with an -classpath argument that is the full path to the JAR file
    -classpath ext/com/example/util.jarThe code is here:
    http://holgerdanske.com/users/dpchrist/java/examples/jar-20130525-1301.tar.gz
    Here is a console session that demonstrates building and running the code two ways:
    1. Compiling the utility class into bytecode, compiling the application class against the utility bytecode, and running the application bytecode against the utility bytecode.
    2. Putting the (previously compiled) utility bytecode into a JAR and running the application bytecode against the JAR. (Note that recompiling the application against the JAR was unnecessary.)
    (If you don't know Make, understand that the working directory is reset to the initial working directory prior to each and every command issued by Make):
    2013-05-25 14:02:47 dpchrist@desktop ~/sandbox/java/jar
    $ cat apps/com/example/hello/Console.java
    package com.example.hello;
    import com.example.util.Hello;
    public class Console {
        public static void main(String [] args) {
         Hello.hello("world!");
    2013-05-25 14:02:55 dpchrist@desktop ~/sandbox/java/jar
    $ cat libs/com/example/util/Hello.java
    package com.example.util;
    public class Hello {
        public static void hello(String arg) {
         System.out.println("hello, " + arg);
    2013-05-25 14:03:03 dpchrist@desktop ~/sandbox/java/jar
    $ make
    rm -rf bin ext obj
    mkdir obj
    cd libs; javac -d ../obj com/example/util/Hello.java
    mkdir bin
    cd apps; javac -d ../bin -cp ../obj com/example/hello/Console.java
    cd bin; java -cp .:../obj com.example.hello.Console
    hello, world!
    mkdir -p ext/com/example
    cd obj; jar cvf ../ext/com/example/util.jar com/example/util/Hello.class
    added manifest
    adding: com/example/util/Hello.class(in = 566) (out= 357)(deflated 36%)
    cd bin; java -cp .:../ext/com/example/util.jar com.example.hello.Console
    hello, world!
    2013-05-25 14:03:11 dpchrist@desktop ~/sandbox/java/jar
    $ tree -I CVS .
    |-- Makefile
    |-- apps
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.java
    |-- bin
    |   `-- com
    |       `-- example
    |           `-- hello
    |               `-- Console.class
    |-- ext
    |   `-- com
    |       `-- example
    |           `-- util.jar
    |-- libs
    |   `-- com
    |       `-- example
    |           `-- util
    |               `-- Hello.java
    `-- obj
        `-- com
            `-- example
                `-- util
                    `-- Hello.class
    19 directories, 6 filesHTH,
    David

  • I have two different itunes music files on my computer.  How do I combine them into one file?

    I have two different itunes music files on my computer.  How do I combine them into one file?

    I don't think so. The only other ID I have is a developer id, and I didn't get that until several months after I got the phone. In addition purchases I made from the App Store onthe phone would sync up with It unes on the Mac meaning it would be the same id.
    However I looked at the AppStore on my phone while it was connected to the Mac with iTunes open, and now the balance has changed to the same as the others.

  • How to handle 2 or more .jar files with an applet

    Hey out there
    I have created an ftpClient application that uses "jakarta ftpClient". It works fine as an JFrame application � But when I converted the Application into an JApplet I get the following Exception:
    java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
    I have bundled the main application into a .jar file (Application,jar). But I don't know how to handle the 2 jakarta .jar files with my JApplet??
    I Tried to append the 2 jakarta .jar files to the Application,jar with the following code:
    jar cvf Application.jar 1.class 2.class�. commons-net-1.4.1.jar jakarta-oro-2.0.8.jar
    But with the same result / Exception (I have signed the Jar file!)
    Can anyone help me

    Hi i have a question with your application can you down- or upload more files at the same time? Because i'm having problems with my ftp application.
    Here is the link with my problem maybe you can help me. I will be very pleased when you can help me.
    http://forum.java.sun.com/thread.jspa?threadID=5162042&tstart=0
    Thx
    Satanduvel

  • How to install a Application in *.jar file format?

    How to install a Application in *.jar file format?
    I have taken the *.jar file into the device into media folder. but device is not recognizing the file format
    could some one plz provide some suggestion to proceed with this?
    Thanks
    Mohamed Javeed

    I'm having the same problem.  I've put .jar into the 'system' folder but that doesn't seem to make the program work neverless see it on my device.  Help.

  • Exporting R3 tables into Flat Files for BPC

    Dear BPC experts,
    I understand currently the way for BPC to extract data from R3 is via flat files. I have the following queries:
    1) What exactly are the T codes and steps required to export R3 tables into flat files (without going through the OpenHub in BI7)? Can this process be automated?
    2) Is Data Manager of BPC equivalent to SSIS (Integration Services) of SQL Server?
    Please advise. Thanks!!
    SJ

    Hi Soong Jeng,
    I would take a look at the existing BI Extractors for the answer to Q1, I am working on finishing up a HTG regarding this. Look for it very soon.
    Here is the code to dump out data from a BI Extractor directly from ERP.
    You need dev permissions in your ERP system and access to an app server folder. ...Good Luck
    *& Report  Z_EXTRACTOR_TO_FILE                                         *
    report  z_extractor_to_file                     .
    type-pools:
      rsaot.
    parameters:
      p_osrce type roosource-oltpsource,
      p_filnm type rlgrap-filename,
      p_maxsz type rsiodynp4-maxsize default 100,
      p_maxfc type rsiodynp4-calls default 10,
      p_updmd type rsiodynp4-updmode default 'F'.
    data:
      l_lines_read type sy-tabix,
      ls_select type rsselect,
      lt_select type table of rsselect,
      ls_field type rsfieldsel,
      lt_field type table of rsfieldsel,
      l_quiet type rois-genflag value 'X',
      l_readonly type rsiodynp4-readonly value 'X',
      l_desc_type type char1 value 'M',
      lr_data type ref to data,
      lt_oltpsource type rsaot_s_osource,
      l_req_no type rsiodynp4-requnr,
      l_debugmode type rsiodynp4-debugmode,
      l_genmode type rois-genflag,
      l_columns type i,
      l_temp_char type char40,
      l_filename    like rlgrap-filename,
      wa_x030l      like x030l,
      tb_dfies      type standard table of dfies,
      wa_dfies      type dfies,
      begin of tb_flditab occurs 0,
    *   field description
        fldname(40)  type c,
      end of tb_flditab,
      ls_flditab like line of tb_flditab,
      l_file type string.
    field-symbols:
      <lt_data> type standard table,
      <ls_data> type any,
      <ls_field> type any.
    call function 'RSA1_SINGLE_OLTPSOURCE_GET'
      exporting
        i_oltpsource   = p_osrce
      importing
        e_s_oltpsource = lt_oltpsource
      exceptions
        no_authority   = 1
        not_exist      = 2
        inconsistent   = 3
        others         = 4.
    if sy-subrc <> 0.
    * ERROR
    endif.
    create data lr_data type standard table of (lt_oltpsource-exstruct).
    assign lr_data->* to <lt_data>.
    call function 'RSFH_GET_DATA_SIMPLE'
      exporting
        i_requnr                     = l_req_no
        i_osource                    = p_osrce
        i_maxsize                    = p_maxsz
        i_maxfetch                   = p_maxfc
        i_updmode                    = p_updmd
        i_debugmode                  = l_debugmode
        i_abapmemory                 = l_genmode
        i_quiet                      = l_quiet
        i_read_only                  = l_readonly
      importing
        e_lines_read                 = l_lines_read
      tables
        i_t_select                   = lt_select
        i_t_field                    = lt_field
        e_t_data                     = <lt_data>
      exceptions
        generation_error             = 1
        interface_table_error        = 2
        metadata_error               = 3
        error_passed_to_mess_handler = 4
        no_authority                 = 5
        others                       = 6.
    * get table/structure field info
    call function 'GET_FIELDTAB'
      exporting
        langu               = sy-langu
        only                = space
        tabname             = lt_oltpsource-exstruct
        withtext            = 'X'
      importing
        header              = wa_x030l
      tables
        fieldtab            = tb_dfies
      exceptions
        internal_error      = 01
        no_texts_found      = 02
        table_has_no_fields = 03
        table_not_activ     = 04.
    * check result
    case sy-subrc.
      when 0.
    *      copy fieldnames
        loop at tb_dfies into wa_dfies.
          case l_desc_type.
            when 'F'.
              tb_flditab-fldname = wa_dfies-fieldname.
            when 'S'.
              tb_flditab-fldname = wa_dfies-scrtext_s.
            when 'M'.
              tb_flditab-fldname = wa_dfies-scrtext_m.
            when 'L'.
              tb_flditab-fldname = wa_dfies-scrtext_l.
            when others.
    *         use fieldname
              tb_flditab-fldname = wa_dfies-fieldname.
          endcase.
          append tb_flditab.
    *        clear variables
          clear: wa_dfies.
        endloop.
      when others.
        message id sy-msgid type sy-msgty number sy-msgno
        with  sy-subrc raising error_get_dictionary_info.
    endcase.
    describe table tb_flditab lines l_columns.
    " MOVE DATA TO THE APPLICATION SERVER
    open dataset p_filnm for output in text mode encoding utf-8
      with windows linefeed.
    data i type i.
    loop at <lt_data> assigning <ls_data>.
      loop at tb_flditab into ls_flditab.
        i = sy-tabix.
        assign component i of structure <ls_data> to <ls_field>.
        l_temp_char = <ls_field>.
        if i eq 1.
          l_file = l_temp_char.
        else.
          concatenate l_file ',' l_temp_char  into l_file.
        endif.
      endloop.
      transfer l_file to p_filnm.
      clear l_file.
    endloop.
    close dataset p_filnm.
    Cheers,
    Scott
    Edited by: Jeffrey Holdeman on May 25, 2010 4:44 PM
    Added  markup to improve readability
    Edited by: Jeffrey Holdeman on May 25, 2010 4:47 PM

  • How to export report output into excel.

    Hi all
    how to export report output into excel sheet can any on give me answer step by step please as soon as possible
    kk

    Hi Prashanth,
    If you are executing Query from WAD  ---> Right click on Table (only on Characteristics Data)  --> Enhanced Menu ---> Export as --> CSV file or MS Excel
    assign points if this helps,
    Thanks,
    Sudhakar

  • How to convert database table into xml file

    Hi.
    How to convert database table into XML file in Oracle HTML DB.
    Please let me know.
    Thanks.

    This not really a specific APEX question... but I search the database forum and found this thread which I think will help
    Exporting Oracle table to XML
    If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
    http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
    Hope this helps
    Chris

  • How to export image data into XDP

    Hi, All
      I'm working on a healthcare project that needs to export the doctor's signature image into XDP file from the database to fill in the Insurance company claim form. My question is how to export image data into a field node in the XDP file, we know the name of the image field which defined in the PDF form, Is it something like:
      the signature image data ?
    Should the image data in this node be base64 encoded or text encoded or something else?
    Can the image be any kind? e.g. BMP, PNG, JPEG, ..., etc?
    Thanks
    William

    Hi Andre,
    Document will be of ASCII characters right?? but image data will be in binary format. as per database concept it is stored as binary large object. But in datawarehousing the back end is also going to be some database such as Oracle or other DBs.
    which can take blob's. so it would be possible to store the binary data.
    If any one has faced this situation can reply.to this ques.
    can post the step to load image(jpg/bmp or any image format) data in to info cube??
    hi andre if u have done loading image data as you say.pls reply me if you have the steps with you.
    thanks Andre

  • Export batch data into CSV file using SQL SP

    Hi,
    I have created WCF-Custom receive adapter to poll Sql SP (WITH xmlnamespaces(DEFAULT 'Namespace' and For XML PATH(''), Type) . Get the result properly in batch while polling and but getting error while converting into CSV by using map.
    Please can anyone give me some idea to export SQL data into CSV file using SP.

    How are you doing this.
    You would have got XML representation for the XML batch received from SQL
    You should have a flat-file schema representing the CSV file which you want to send.
    Map the received XML representation of data from SQL to flat-file schema
    have custom pipeline with flat-file assembler on the assembler stage of the send pipeline.
    In the send port use the map which convert received XML from SQL to flat file schema and use the above custom flat-file disassembler send port
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How can I get a single jar file with NetBeans?

    How can I get a single jar file with NetBeans?
    When I create the project I get these files:
    dist/lib/libreria1.jar
    dist/lib/libreria2.jar
    dist/software.jar
    The libraries that have been imported to create the project are in separate folders:
    libreria1/libreria1.jar
    libreria2/libreria2.jar
    libreria1, libreria2, dist folders are all located inside the project folder.
    I added the following code to the build.xml:
    <target name="-post-jar">
    <jar jarfile="dist/software.jar">
    <zipfileset src="${dist.jar}" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria1.jar" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria2.jar" excludes="META-INF/*" />
    <manifest>
    <attribute name="Main-Class" value="pacco.classeprincipale"/>
    </manifest>
    </jar>
    </target>
    Of course there is also the project folder:
    src/pacco/classeprincipale.form
    src/pacco/classeprincipale.java
    Can you tell me what is wrong? The error message I get is as follows:
    C:...\build.xml:75: Problem creating jar: archive is not a ZIP archive BUILD FAILED (total time: 2 seconds)

    This is not a NetBeans forum, it is a JDeveloper forum. You might want to try http://forums.netbeans.org/. I also saw your other question - try looking in the New to Java forum: New To Java

Maybe you are looking for

  • RoboHelp HTML v9 - Browse Sequence not appearing when generated

    RoboHelp HTML v9 New project - eg not converted from previous version Added a browse sequence as per the help documentation - I've followed the help documentation however when I get to view result of the generated WebHelp - the browse sequence is not

  • A C-runtime error occured (bad allocation) from xmlViewService

    Hi There, I have a .NET code which calls OBI webservice xmlViewService. I observed xmlViewService.executeXMLQuery works fine when there are records between 0 - 80000, but when records go beyond 80000-100000 it fails & returns an exception "A C-runtim

  • Business Objects 4.0 on Netweaver 7.3 BI

    Will business objects 4.0 run on only the abap stack on Netweaver 7.3 BI or does it also need the java stack? We will most likely be installing business objects on top of netweaver and creating Crystal, Bex and maybe Webi reports. Thanks very much! J

  • Can you please send the link for Release Note of Solaris 9.2.0.7??

    I can find the one for 9.2.0.8 but not for 9.2.0.7 and 9.2.0.6 !! -ashokM

  • Steps for in process inspection

    Hello experts, I am new to QM, I have configured system by reading documents please explain me the  steps to be followed.. I have created a production order Inspection lot is created Confirmation is done what is the next step to be followed I thought