Creating an executable

Hi, I want to create an executable program or launcher for the application i have built in java. I want to turn the java class files into something that a inexperienced user could execute simply. Are there tools to do this?
Many thanks.
Martin

Haijsk,
That's a pretty nice trick. Straightforward, and simple to use. The one problem is that it opens a console window under Windows. :-( As a result, you inspired me to write this piece of code:
#include <windows.h>
#define MY_APP_NAME "MyApp"
#define MY_APP_EXEC "javaw -jar myapp.jar"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
        STARTUPINFO startup_info;
        PROCESS_INFORMATION process_info;
        BOOL valid;
        int result;
        startup_info.cb = sizeof(startup_info);
        startup_info.lpReserved = NULL;
        startup_info.lpDesktop = NULL;
        startup_info.lpTitle = NULL;
        startup_info.dwX = 0;
        startup_info.dwY = 0;
        startup_info.dwXSize = 0;
        startup_info.dwYSize = 0;
        startup_info.dwXCountChars = 0;
        startup_info.dwYCountChars = 0;
        startup_info.dwFillAttribute = 0;
        startup_info.dwFlags = STARTF_FORCEONFEEDBACK;
        startup_info.wShowWindow = NULL;
        startup_info.cbReserved2 = 0;
        startup_info.lpReserved2 = NULL;
        startup_info.hStdInput = NULL;
        startup_info.hStdOutput = NULL;
        startup_info.hStdError = NULL;
        valid = CreateProcess(
                NULL,
                MY_APP_EXEC,
                NULL,
                NULL,
                FALSE,
                CREATE_DEFAULT_ERROR_MODE,
                NULL,
                NULL,
                &startup_info,
                &process_info
        if(!valid)
                result = MessageBox(NULL, "Failed to launch the application. Please make sure that a JVM of 1.3 or higher is installed.", MY_APP_NAME, MB_OK);
        return 0;
}Just change MY_APP_NAME and MY_APP_EXEC to meet your needs and away you go. :-)

Similar Messages

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

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Bug Labview RT 8.20 with NotFoundDialog.vi and GeneralErrorHandler.vi when creating an executable

    Hi,
    I've got a problem with Labview RT 8.20 french edition.
    During my development, I had 2 warnings concerning NotFoundDialog.vi and GeneralErrorHandler.vi. But when I've tried to create an executable, these warning prevent its creation by generating an error.
    So I've modified theses vis in order to be able to compile my executable.
    1.    For GeneralErrorHandler.vi the problem is in a conditional disable structure in which there is a case named TARGET_TYPE==RT.
    It seems that this parameter is not equal to RT or doesn't exist. So I've created my own parameter and change the case.
    2.    For NotFoundDialog.vi the problem is upon a FindErrorDescription.html which is not available in RT target. So I uses the same conditional disable structure to disable this part of code when running under RT system.
    I hope this will help if anyone meet the same problem.
    James

    Hi
    I have a similar problem, however it is under the debug mode. I have a project which uses a Host under windows, RT target and then a FPGA target. Everytime the RT is deployed, it will ask whether I would like to save the mentioned files even though there is no modifications to them directly. The same case applies if the  host is modified under windows and it will prompt for the same.
    I understand that these VI's have no use in RT but, they are being recompiled through some sub VI. It is more of an annoyance than a show stopper. Thanks for the fix.
    Regards,
    Ashm01
    Message Edited by ashm01 on 03-19-2007 02:26 AM

  • 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 to create and execute a function whose return value is  a table

    hi folks ,
    i would like know how to create and execute a function whose return value is a table ,
    am new to pl/sql ,
    my statement for the function is
    SELECT ct.credential_code, c.expiration_date
    FROM certifications c, credential_types ct
    WHERE ct.crdnt_id = c.crdnt_id
    AND c.person_id = person_id;
    i would like to have the result of the above query as return value for the function.
    Thanks in advance ,
    Ashok.c

    hi Ps ,
    Can you please do small sample ,
    that would help me in clear understanding
    thanks in advance
    ashok.c

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

  • Create an executable file

    I have created and build a project. How can I create an executable file to run the whole package?

    In general, you can't. Java programs have to be run under the jvm so you have to run the java command every time.
    You can package your project as a runnable jar file. How you run it depends on your opperating system.

  • To create an executable of java

    that it programs I can use to create the executable of java

    ? What is it you are looking for ? Do u wish to know how to run a java program or do u wish to know how to convert a java program to an exe ?

  • Error when i create an executable in lv 2010

    HI everybody!!
    well i am creating an executable from one programa i have done, but when i am building it appears an error that i don't know what must i do to resolve it...
    can someone help me please¿
    thanks!!!!
    i need your help!!!is quite important pleaseeeeeeee!!!!!!
    error say this:
    This build specification uses VIs from Point by Point which is currently in evaluation mode. During evaluation, LabVIEW is unable to disconnect type definitions and remove unused polymorphic VI instances.
    Choose a different option on the Additional Exclusions page and build the application again.
    DETAILS
    To purchase this product, please contact National Instruments. If you have already purchased this product, select Help >> Activate LabVIEW Components to activate this product.
    C:\Archivos de programa\National Instruments\LabVIEW 2010\vi.lib\ptbypt\Filters.llb\IIR Cascade Filter PtByPt.vi
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    Error 1073 occurred at AB_Engine_Disconnect_Typedefs.vi -> AB_Source_VI.lvclass:Copy_SourceItem.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_EXE.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_EXE.lvclass:Build.vi -> AB_Build.lvclass:Build_from_Wizard.vi -> AB_UI_Frmwk_Build.lvclass:Build.vi -> AB_UI_FRAMEWORK.vi -> AB_Create_Build_Application.vi -> EBUIP_Global_OnCommand.vi -> EBUIP_Global_OnCommand.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  This property is writable only when the VI is in edit mode, or this method is available only when the VI is in edit mode.

    alan4 wrote:
    but now i have the executable , when i run it in another computer, ask me for a librarys, and why happens this??
    make me questions for the location of some lbb....why??
    How do you expect us to be able to answer this question? We have no idea what your code does, nor have you told us what the code does, or what components you are using. We are not mind readers. Are you talking to instruments? If so, the target machine would need NI-VISA if you're using VISA. Are you using DAQ? If so, then the target machine needs to have DAQmx installed. Create an installer from the project so that all necessary components are installed. Please read the LabVIEW Help on creating installers.

  • How to create an executable

    Hello, I am trying to figure out how to make an executable file from LabVIEW. This is my first time ever creating an executable so I need instructions in basic terms. I tried to do it using the project manager. The file that was created needs LabVIEW Run-Time in order to work.
    Is it even possible to have a LabVIEW program and create an executable that would let any computer without NI products run the appllication?
    Also, I searched for some instructions of how to do this but could not find any useful ones. If anyone can direct me to a post or set of instructions that explain how to create an executable that would be perfect. Thank you!
    Solved!
    Go to Solution.

    Is there any way i can make the RunTime install silently with no user interaction? If I can, how? I have looked at other posts and how NI tell me to do it (http://digital.ni.com/public.nsf/allkb/188FE05BA8933F4486256BC300708527) , but it is way over my head. Is this the right way? or is there a simpler way?
     I do not understand how to compile the installer and executable file together. I can create the executable from the LabVIEW file that I need to run, but I want the RunTime to install automatically before that executable is executed. (If this statement doesnt make sense, tell me. )
    Any feedback would be appreciated.

  • How to create an executable for Windows or Unix

    Hi,
    I would like to know how to do to create an executable, an application which is able to work under windows for exemple without installing a JVM ?
    (When you download a program which was writing in java on internet it is an executable. You don't need a JVM on your system to run it. I would like to do the same thing...)
    thanks

    Hi C,
    I think they use JToExe.exe to compile the java project but I think they need a JVM to run the application. I just wanted to know if it is possible to run an application without JVM after any compilation. When we find an executable, most of the time is it a Visual project ? (in c or other langage ?) I will work later for a company which develop a new application in Java. To put it on the market they need to do an executable.
    Thanks for your time

  • Create the executable jar's file

    Hi guys,
    I am working on java desktop's application where a user will be able to run the application by double click the executable jar file. I followed the description of "Creating and Deploying a Simple Archive to Your File System of the help. After creating the jar file and when I double click on jar file to run the application I got this error message "Could not find the main class. Program will exit". I was not also able to run the application on the dos command.
    Please help. I don't have any problem when I run from Jdeveloper 9.0.4. I have window XP professional.
    Your input will be very welcomed.

    OK open up your deployed Jar file in something like Winzip and have a look at the Manifest.MF in meta-inf\
    I've just created an executable JAR with a main class of mypackage1.Class1 and it all ran ok. Here's the manifest:
    Manifest-Version: 1.0
    Main-Class: mypackage1.Class1
    Created-By: Oracle9i JDeveloper 9.0.2So make sure your's is similar and your Main-class looks the same - e.g. does not say something like:
    Main-Class: mypackage1.Class1.class

  • Create an executable for a RT project

    Hi all, I am not sure on how to create an executable of a real-time VI. I have read about using source distributions but I have not yet used it. Can you send me some suggestions about this?
    Regards,
    Claudio

    Yes you are able to do what you explained above by programmatically launching the executable or vi on your Real - Time Controller.
    At start, you just have to create a source distribution (right click on Build Specifications--->New---> Source Distribution)--- instead of creating an application (right click ---> New ---> Real Time Application). In this way Labview creates a folder in which there are contained the main vi and all it's dependencies (subVI's, libraries).
    Then, you have to transfer through File Transfer Protocol (FTP) this folder to your RT Target. 
    After you made these steps, by using an Open Application Reference VI and  Open VI Reference VI on the Block Diagram, you are able to set the RT Controller Name or IP of RT target, as well as the location of the top level vi in your RT target. 
    Finally, you can use an Invoke Node or a Call By Reference Node to run the remote VI.
    You can find very little detail and images of the description above in the link below:
    http://digital.ni.com/public.nsf/allkb/A7DBA869C000B5AE862570B2007C4170?OpenDocument
    You can also check the example in Labview  Example Finder " Vi Server.lvproj" that basically does all the above and I am sure it will help you.
    Does this work for you? Let me know!!
    Best regards,
    Antonios

Maybe you are looking for

  • How to output a checkbox in Smartform?

    Does anybody know how to output a boolean as a checkbox in Smartform. I looked at the online help but found nothing about this. Thanks.

  • I pod not working

    my ipod doesnt turn on all it says is apple.com.support,ipod

  • Regarding persistent classes  & objects

    Hi all, I am new to abap objects, please  give me some simple links of persistent classes & object. Let me know the difference between persistent classes & other simple classes.. I ensure you for points! cheers.

  • How to filter all images with 16 BIT colordepth?

    is there a way in LR (or bridge) to filter all images that are saved as 16 bit images. i noticed i have a lot of scanned photos/slides that don´t need to be in 16 bit TIFF format. 8 bit is enough for them and would save me a ton of HDD space (even wh

  • Rotated files in Bridge, do not appear in the original

    I have found a recent problem in the Bridge in that if you select a set of photos in Bridge then rotate them they don't all rotate. Usually only the first one will rotate and the rest will stay the same way up. Also - and more importantly - when an i