Large project in JBuilder 2007... How do I create an executable JAR?

First, I've googled quite a bit and keep getting thiings about "Jbuilder Application Wizard", etc... Well, I don't see any "wizard" menu in the version of JBuilder I'm using!
I'm using JBuilder 2007 Enterprise edition, however it's a trial version apparently. I'm not sure if that matters, and perhaps the functionality was taken out with the trial version..
Anyway, the issue is that I have a multi class (with one main function) program that I want to run (it's a command line based application) as an executable JAR file. The program uses LOTS of include statements including quite a few custom libraries ("external JARs") that I had to import.
Basically I want the application to do exactly what it does now when I hit the ol' "RUN" button. Except I want to be able to run it from a batch file with "java -jar (or whatever) myProgram".
Anybody have any experience with this type of thing?

OK, here's what I've got:
I've got a jar file that contains:
1. a folder "importQD"
2. a folder called META-INF
3. a .classpath file
4. a .project file
Inside the importQD folder are my three .class files that are the classes I created myself.
Inside the META-INF folder is the MANIFEST.MF file which looks like:
Manifest-Version: 1.0
Main-Class: importQD.ImportQDInside the .classpath file we have:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
     <classpathentry kind="src" path=""/>
     <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
     <classpathentry kind="lib" path="C:\Programs\CMQualityDocumentImport\CMUploadInterface83.jar"/>
     <classpathentry kind="lib" path="C:\Programs\CMQualityDocumentImport\DBCon.jar"/>
     <classpathentry kind="lib" path="C:\Programs\CMQualityDocumentImport\SENAeMail.jar"/>
     <classpathentry kind="lib" path="C:\Programs\CMQualityDocumentImport\SENAFileHandler.jar"/>
     <classpathentry kind="output" path=""/>
</classpath>NOTE: All of the paths point at the .jar files as they are located on the machine the final version will be running on.
Inside the .project file we have:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
     <name>importOldQD</name>
     <comment></comment>
     <projects>
     </projects>
     <buildSpec>
          <buildCommand>
               <name>org.eclipse.jdt.core.javabuilder</name>
               <arguments>
               </arguments>
          </buildCommand>
     </buildSpec>
     <natures>
          <nature>org.eclipse.jdt.core.javanature</nature>
     </natures>
</projectDescription>Now, it would make sense to me that this should be all good to go, and that I should be able to run this via a command line now. When I try
java -jar importQD.jar I get a ton of various errors such as "Exception in thread "main" java.lang.UnsupportedClassVersionError: importQD/importQD (unsupported major.minor version 49.0) + a nice stack trace with a bunch of java.lang and java.net references.
What am I doing wrong?

Similar Messages

  • How do I create an executable JAR File ?

    Hi,
    Let's say I have several Class Files that perform a special task.
    How do I bundle them in a JAR file and make it executable, so that the user simply types "prog.jar" and is happy.
    I wonder how that works, as I have to tell the starting point for execution.
    Does anybody now ?
    cu
    Oliver

    Three importants things to do :
    - don't forget to indicate in your manifest.mf the main class and the pacckage
    ex:
    Manifest-Version: 1.0
    Main-Class: mypackage.MyMainClass
    Created-By: 1.3.0 (Sun Microsystems Inc.)
    - don't forget to associate the .jar file with the application java.exe -jar -classpath %CLASSPATH%
    - don't forget to set the environment CLASSPATH correctly
    Hope this help
    Jean

  • How do i create an executable jar?

    I have built a GUI, and want to make it executable. I have tried compiling it to a jar, but when i double click this nothing happens. I even added Main-Class to the manifest file but still no luck.
    any help would be appreciated, or a link to a good tutorial. I have already tried the sun tutorial, but it still doesnt work.
    Thanks
    Ben

    I got it working :D
    jar -cfm TestJar.jar manifest.txt GUI.class GUI$1.class ./org/gui/*.class ./info/clearthought/layout/*.class
    java -jar TestJar.jar
    This created the .jar. I will experiment with Class-Name: later, atleast i have something to show now.
    Thanks to everyone for their help on this matter
    Ben
    edit:
    just changed the manifest file to include,
    Class-Path: JCalendar4.jar TableLayout.jar
    Worked a dream..... thanks everyone i think i have a pretty good grasp on how to create jars now. Just need to learn now how to create jnlp files :D
    Message was edited by:
    CyborgAvenger

  • How do I create an executable with arguments that executes once and terminates

    I'm just starting with LabView, so I'm sure this issue has been address somewhere already.  I just can't locate the answer.
    I am running version 6i (I may be able to get 7 or 8).
    I need to create a command line executable program with parameter input that executes only once and then terminates.
    This is for instrument control (sets the signal generator frequency, level, RF on/off and arms the Trigger).  I have written a simple VI that works from within LabView (programs the instrument when the Run button is pressed).  I have further managed to perform an Application Build to create an executable however, the application continues to run, waiting for the Run button to be pressed.  Also, I need to know how to pass parameters to this executable (freq, level, RF on/off, trigger arm).
    This executable will (eventually) be called repeatedly by a Matlab file.
    Thanks,
    D

    LabVIEW 7 added a property to get a command line argument. For older versions see http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DA5B56A4E034080020E74861.
    I'm not sure I understand you problem with the Run button. If you set the execution mode to Run When Opened from VI Properties, it should execute once whenever it's called. I think that when building an executable, it changes the property to this if it's not already set. If the application does not have this set, it will not be running at all. I'm assuming that you are talking about the Run button on the toolbar and not a run Boolean that you've created on the front panel.
    Since you have the app builder, your other option is to create a DLL. If you can call a DLL in Matlab, then that would probably be simpler.
    Message Edited by Dennis Knutson on 11-28-2005 02:46 PM

  • How do I create an executable for a computer that does not have IVI drivers

    I'm creating an executable driver (based on the NI drivers) for a TDS 3054 intended for a computer that does not have the IVI engine. I would prefer to install as little software on this computer as possible. Is it possible for me to build the driver with the appropriate support DLL's without installing IVI on the user's computer? How do I do this?
    Thank you,
    Zach Oberman

    Zach,
    Since the tkds30xx driver you are using is IVI based, you will not be able to use it without the IVI Engine.
    If you must build an executable that does not require the IVI Engine, then you will need to use a traditional LabVIEW driver or convert a VXIpnp driver into LabVIEW. Neither of those drivers would require the IVI Engine.
    At this time the only TDS 3054 driver on NI's IDNet website is the IVI-based tkds30xx driver.
    You may be able to obtain a traditional LabVIEW driver from
    Tektronix
    Developer Exchange
    Requesting a
    driver
    Other Resources
    Thanks,
    --Bankim

  • How do I create an executable file?

    How exactly do I create an executable file from my .java file?

    I've tried to run it from the DOS prompt two ways.
    If I type "java -jar Plist" (Plist is the .jar file
    name, the .java file name, and the class name), It
    says...
    Exception in thread "main" java.util.zip.ZipException:
    The system cannot find the file specifiedThat seems pretty clear - there is no file called "Plist" and that's it. "The system cannot find the file specified."
    If I type "java -jar Plist.jar", It says...
    Exception in thread "main"
    java.lang.NoClassDefFoundError: Plist
    Two questions...
    1. What am I doing wrong??Two possibilities, I'd put my money on the first one:
    1. That jar file of yours really doesn't contain a class called Plist. Check the contents with "jar -tf Plist.jar". The file Plist.class (along with other stuff you put in the jar) should be listed.
    2. If it is listed, your classpath may be set wrong - can you run the app with "java -classpath Plist.jar Plist"?
    2. Once I get this .jar deal to work, will I be able
    to run it on other computers? It seems to be tied in
    with some of the Java utilities and files on my
    computer. Is it independent like a .exe file or not?No, it's not independent like a .exe file. It's a lot more independent than any .exe file. Ever tried running them on a Mac? Linux? Solaris? Anything else than windoze? On a windoze system that's older than recommended, like on win95 instead of 2k?
    The independence of java class files packed in jars is on the level of xml, pdf and postscript files - you can use them everywhere. To be more exact, on every system that has a "viewer" for those files; in java's case the "viewer" is the runtime environment. Once it's installed the files can be run like other programs on the system.

  • How to pass paramets to executable jar file

    hello,
    i have made a executable jar file. i want to pass a text file to the MAIN class of that executable jar at runtime, what can i do ?
    kindly please help.
    regards,
    mohamed asif

    I was not thinking of changing the manifest, but of how you invoke the main class.
    Consider the following three files:
    File: test.txtThis is
    a text fileFile: manifestmain-class: JarTestFile: JarTest.javaimport java.io.*;
    public class JarTest {
        public static void main(String args[]) throws IOException {
            BufferedReader in;
            if(args.length == 0) {
                in = new BufferedReader(new InputStreamReader(System.in));
            } else {
                in = new BufferedReader(new FileReader(args[0]));
            System.out.printf("The first line is: %s%n", in.readLine());
    }Compile and run like the following:pbrockway@linuxdeskd6off:~/Desktop$ javac -cp . JarTest.java
    pbrockway@linuxdeskd6off:~/Desktop$ jar cmf manifest test.jar JarTest.class
    pbrockway@linuxdeskd6off:~/Desktop$ java -jar test.jar test.txt
    The first line is: This is
    pbrockway@linuxdeskd6off:~/Desktop$ java -jar test.jar <test.txt
    The first line is: This is
    pbrockway@linuxdeskd6off:~/Desktop$ cat test.txt | java -jar test.jar
    The first line is: This is
    pbrockway@linuxdeskd6off:~/Desktop$In each case the contents of the text file are available to
    the main() method.

  • How can I create an executable with Flex Builder 3?

    I'm working with Flex Builder 3 right now and I've run my
    head into a brick wall. Here's the situation:
    I'm creating a standalone application (runs in its own
    window, not in a web page) and I want to run it on a computer that
    does not have Flex Builder 3 installed. Help files and web searches
    haven't directed me to the right answer, so I was hoping that
    someone on this forum could help. Anyone know how to create a .exe
    file or something else that can be run outside of Flex Builder?
    Thanks a lot for any help!

    quote:
    Originally posted by:
    rob_parkhill
    Convert it to an AIR Application?
    Thanks Rob,
    This may be what I'm looking for, but I don't know enough
    about the difference. I guess I should have pointed out that I'm a
    complete Flex Novice!
    Anyway, with Flex Builder, I created an MXML Application. I
    went through all my various options again in Flex Builder and found
    that under the project menu, I could export a release build in what
    appears to be the format you mentioned. I managed to create a .air
    file, but it is not a recognized file type on my computer. I tried
    double clicking it and the built-in windows services couldn't even
    find a possible way to run it. Am I missing some important step?
    Thanks again.

  • How do I create an "executable" for users to run calcs?

    I need to create an executable that users can launch.  I would like it to 1) log in as a "test" user that I have set up in Native Directory, 2) select app/database then 3) launch a series of calcs.  I had something set up previously in an earlier version of Essbase but I can't get it to run on Essbase 11.
    Here's what I had previously:
    Login "servername" "TestUser" "Password" ;
    Select "App" DataBase;
    RunCalc 2 "Calc 1" ;
    RunCalc 2 "Calc 2" ;
    RunCalc 2 "Calc 3" ;
    Maybe the user's machines don't have all the files needed to run this?  It's just flashes and doesn't give me any messages.  I'm stumped.

    If you are using 11.1.2.1 you would need to set the execution based off the startESSCMD.bat/sh.  Here is an example.  Check that the startESSCMD script works first so you can get the command line up.
    Does startESSCMD work on the machine?
    @ECHO OFF
    REM --------------------------------------------------------------
    REM --                                 --
    REM --                        --
    REM --                                 --
    REM --                                 --   
    REM --------------------------------------------------------------
    @REM This file is created to use essmsh in batch
    @REM Set ESSBASEPATH to the setEssbaseEnv in your system
    call "C:\Oracle\Middleware\user_projects\epmsystem1\EssbaseServer\essbaseserver1\bin\setEssbaseEnv.bat"
    set PATH=%ESSBASEPATH%;%PATH%
    %ESSBASEPATH%\bin\esscmd.exe E:\Oracle\Backup\backup\scripts\script.msh

  • How to create executable jar in eclipse using linking in compiler

    Hi,
    I have a project in Eclipse. I wrote already an ant build file for creating an executable jar which includes all project files.
    Now I want to create a second executable jar which is a subset of the project (a limited number of classes are necessary).
    I have a main class and I was looking for a way to generate a jar file which includes the main class and all the depending classes.
    Is there a way to do it? With ant or with another tool?
    Is it possible to compile a project given a main class, and include all depending classes?
    Regards,
    Biebel
    Edited by: biebel1975 on Jan 7, 2009 10:21 AM

    biebel1975 wrote:
    Some more information:
    When I compile all the classes, the jar file is +/- 3.5Mb inclusive the server side logic.
    The subproject I want to build, should be less then 1Mb (Only some screens and beans, no business logic ((only +/- 10% of the projects code) )).
    My question is: How can I create a executable jar with only the necessary class files which depends on the main class. (Linked with the imports).
    Is there a tool to do that? Can it be done with an ANT script? If so, how does the script looks?
    What are you talking about?
    You already said that you are using Ant.
    Ant uses script files.
    Since you have one with X items in it and you want something new with X-Y items in it the obviously it would make sense to construct an ant script that does less than the other ant script.
    The following provides a huge amount of information about Ant.
    [http://ant.apache.org/resources.html]
    Other than that no one can tell you want your Ant script will look like except that it will do less than the one that you already have.

  • How to create an executable file by including my C# project and database(SQL) in visual studio ?

    Hi,
         I had developed a project in visual studio c# and my database in SQL server. How can i create a executable file including both. 
    can any one give me a solution for this.
    I am trying to make executable in installshield.
    Thank you

    Hi,
    Try to use custom actions to call some managed method, execute the SQL script to create and initialize the database in the method.
    Check this article, it should be helpful for you to create the script and installation:
    https://msdn.microsoft.com/en-us/magazine/cc163919.aspx#S2
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to use external library(in .jar format) in netbeans project?

    How to use external library(in .jar format) in netbeans project?
    Thanks!

    How to use external library(in .jar format) in netbeans project?
    Thanks!

  • Executable jar in jbuilder

    Hi
    i have a question for you.
    I create a jar of my application in jbuilder 2007 and when i execute with
    java -jar test.jar it's work fine.
    After i try to create an executable jar but when i execute it i have a problem.
    In a class i have error (java.lang.unsupportedclassversionerror..... major.minor version 49)
    i think that jbuilder create my executable file using jre 1.4 and does'nt use my jvm version 5.
    can you help me?

    Hi
    i have a question for you.
    I create a jar of my application in jbuilder 2007 and
    when i execute with
    java -jar test.jar it's work fine.
    After i try to create an executable jar but when i
    execute it i have a problem.
    In a class i have error
    (java.lang.unsupportedclassversionerror.....
    major.minor version 49)
    i think that jbuilder create my executable file using
    jre 1.4 and does'nt use my jvm version 5.
    can you help me?No, that means that you are trying to execute the application using a JRE that is too old. E.g. trying to execute with 1.4 but your classes requires 1.5.
    See what java -version gives
    Kaj

  • How to create a client jar file???

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

    How do I create a client jar file for the client program? Please see my attached
    ejb-jar.xml. I compiled the my EJB and deployed it successfully. However, I couldn't
    find the client jar anywhere. I use the weblogic admin console DD editor, I can
    see that the edit field has been populated with my client jar file name defined
    in the ejb-jar.xml. However, I searched entire system, I could not locate this
    jar anywhere.
    How do I do that? If someone knows how to do it, please let me know. Thank you
    very much.
    [ejb-jar.xml]

  • How do you create executables?

    In C++ you just compile your program and you've got an executable with a generic icon. How do you do the same thing in Java? That is to say, how do you create an executable program that can be emailed to someone with them needing a Java compiler to run it?

    Of course, my friend! There's a way to do it. If you download the Java IDE from this website, SunOne Community Edition version 4, you can accomplish that ( at least that's the way I've done them). This Java IDE creates a folder that is executable in Windows, it's called a JAR file (Java ARchive executable file), or run it on any operating system that is Java Enabled.
    With SunOne, you can do it this way:
    1) Click on File
    2)Select New
    3) Then select JAR Archive
    4) In the wizard, follow the steps which tell you the java files that are needed to run the application (because sometimes a programs comprises more than one class)
    5) Create a Manifest
    If this doesn't work for you, find information about JAR Archive files on the Internet because this is the way to make executable programs in Java. Good Luck!!

Maybe you are looking for

  • How put i a stored procedure in a portlet

    hi, I have a stored procedure in an another DB. It is a web tool made in PL/SQL. How do i put that in portal?? I tried to use a Omniportlet but that doesn't work. Bud with Omniporlets its possible to set up a connection with an another DB. i tried: c

  • How can I search within iCloud on the web.

    Dear readers, I can't see a possibillity to search within iCloud agenda's. How does it work? Thanks! Marc

  • Set Beginning of Song

    Is it possible to set the beginning of a song? In other words, how do I set the in point for my play range? I can't find this for the life of me. Cameron

  • Unable to Sign in beacuse of a problem communicating with iCloud

    Can not add my phone or Ipad to icloud, I get the error on both.. "Unable to Sign in beacuse of a problem communicating with iCloud" can download apps through app store, run out of ideas! help

  • System not starting up

    Hi there on planet earth, I've got problem with my G4 server Mac. Every morning sisnce last week I get a strange note on my screen: System failure: CPU 0 code=00000001 (corrupt stack) latest crush for cpu 0: Exception state (SU=0X29DA6000) Proceeding