Java code to exe-file

Hi!
I hope someone can help me with this.
I have done a program in Java-code and now I want to convert that code into an executable file that can be run on most computers. I have tried to convert the code to a JAR-file and then, using the program JSmooth, transform it into a exe-file. But, sad to say...it failed. Is JSmooth the way to do it or is there another better way?
Hope to get an answer.. :)
/ Berenur

add a Main-Class: yourclass line to a manifest file, and specify your manifest when you create the jar.
I.e.
Manifest-Version: 1.4
Main-Class: myClassSave that to manifest.mf or something like that.
Then,
jar -cvfm MyJar.jar manifest.mf [all files to include in jar]
done.

Similar Messages

  • Old version Source code to .exe file conversion

    I have a programming GUI source code (written in an older version of LabVIEW). Can it be supported by LABview Evaluation version 10.0.1 and be converted to an .exe file. How can I convert and use source code file for  programming? What do I need to convert and how?
    I'm new to LABview. Please help!!

    2010 can open VIs written in LabVIEW 6.0 or newer. Just double click on the top level VI. You will also need to install any hardware drivers (i.e. GPIB, DAQ, etc) that the old program used.
    With the evaluation version, you can create an exe but it will have a watermark on the front panel.

  • How to turn a Java Application an .exe file?

    Hello, I'am just above new commer in Java world. I was wondering if anyone could help me. I just developed an application in java, how can I turn it into exe file? is there a way I can run this application without the "Command" promt (window) running?
    Pls. help my email address is "[email protected]"
    Any assistance will be largely appreciated.

    you can try the J++ compiler provided with the JBuilder from Microsoft but this is just compiling the java to C++. to create a standalone exe is as far as I know impossible. U can try to use a jar-archive (create with the sdk) and if a Java Virtual Machine is installed (normally with every popular web-browser) it will run with a doubleclick

  • I wan to converte java prog. to exe file

    hi to all
    i have program in java and i use netbeans 6 ( GUI)
    how can i convert this to exe file ??
    plz help me because i use JAR file but i cant doit
    thanx

    I don't NetBeanz, but it's always best to learn from the command line: http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

  • Convert Java Project to exe file

    Helloz everyone,
    I have completed a java project. Now I have to convert it in exe file for windows.
    Can u please guide me. I can use any third party tool.
    But I want that it can be installed on any computer whenever double clicked and it make a icon. Whenever user click on that icon then it run the application.
    Thanks in advance.
    ViVeK

    Your jar command appears to be incomplete; it should lookk about like this:
    jar cvmf0 manifest_file MyJar.jar MyPackage/MyClass.class MyPackage/MyClass.gif MyPackage/MyClass.txt MyPackage/MyClass.html
    The 'm' in the command represents the manifest file. The 'f' represents the jarfile name. These can be reversed in order, but must be reversed respectively - that is, if the 'f' comes before the 'm', then the MyJar.jar needs to come before the manifest_file.
    The contents of the manifest needs - in the simplest cases - to look like this:
    Line 1. Main-Class: MyPackage.MyClass
    Line 2.
    Note please the Line x. do not appear; however the line 2 must exist and must be empty. IOW, a carrage return must exist at the end of line 1.
    Note too that the MyPackage part is optional. It's there if you have a specifically named package.
    Note lastly that you may not have .gif, .txt, etc files to add to your jarfile.

  • Change java application to exe file

    I want to change the java application(*.class)to the exe file in WIN OS in order to update its speed, can anyone tell me some useful infomation? thanx in advance.
    Holly

    I have been using VAJ for several months now and I have not found the option to compile a native executable. Its help system is the worst I can recall ever seeing. So can you tell me exactly how to do that with VAJ?

  • Compiling JAVA into Windows .exe files

    Hi,
    Here's an easy question - how do you compile JAVA source into Windows .exe files (as opposed to class files with bytecode in them). I imagine there is a third-party product out there somewhere?

    A Bayesian network is a mathematical representation of logical inference.
    A very simple example has two nodes: "has tail" and "is horse", connected by a single link. If we know "is horse" is true, then it nearly always follows that "has tail" is also true. This is called modus ponens in logic. If we know "has tail" is true, then "is horse" might be true, but it might not. To infer that "is horse" is true in such a case is to commit what is called the fallacy of affirming the consequent, in logic. However, using Bayes' theorem, which would require that we know some general information about the prevelance of horses among tailed animals, and the general prevalence of horses among things in general, we can measure the exact increase in the probability that "is horse" is true that results from our knowing "has tail" to be true.
    For more information, see http://www.bayesian.org
    The classic book on the subject is Judea Pearl, Probabilistic Reasoning in Intelligent Systems.

  • Converting java to an exe file

    Hi
    Is there any way i can convert my java app into an exe file?
    That can be run just by double clicking it?
    Thanks

    Do you see that search box on the left?
    <--- That left!
    We had so many threads about that topic.
    * Search before Posting: Especially if you are in a hurry, you may find that the question has already been asked and answered during the long history of the Forums.
    * Know the basics: Read this FAQ and the basic trails of the Java Tutorial (like Getting Started or Learning the Java Language). If you don't understand the question you are posing, you may not understand the answers.
    * Be thorough and precise: Proofread your question before posting. Describe the steps that you have taken. The more effort you put into researching and describing your problem, the more likely you will get a sincere effort in return.
    * Post a subject line that describes the problem: Experts in your subject may skim right past subject lines like "Urgent" and "Need help ASAP". Use keywords about the technologies instead.
    * Post once and in the right area: Multiple postings are discouraged, because they make the category lists longer and create more email traffic for developers who have placed watches on multiple categories. Because of this, duplicate posts are considered a waste of time and an annoyance to many community members, that is, the people who might help you.
    * Post a problem, not an assignment: Break your assignment down into specific problems that you can ask for help with. Dorm hall lounges may be a better resource if you have a last minute, "urgent" demand for solutions to homework problems.
    * Answer questions as well as asking: You can learn by doing as well as gain respect in the community by being a full participant.
    From the forum FAQ

  • Java as an exe file???

    Hi,
    can a java file be converted to an exe file so that the user doesnt have to run it via: java filename?
    rick

    Yes, Jar files, or Web Start
    This question is asked a lot, a quick search will give you many answers.
    Like:
    http://java.sun.com/docs/books/tutorial/jar/index.html
    http://java.sun.com/products/javawebstart/

  • Java code to list files in Windows O/S by FIFO sequence

    Hi,
    I am new to java and working on a project which needs to list files from Windows O/S by FIFO sequence.
    Here is the scenario,
    One of the application logs/stores files in Windows System. After that files has to be moved to another files system on AS/400 by FIFO sequence.
    I need to write java program to list files in Windows (by FIFO) and then move to different application running on AS/400.
    I am using java.io.File class and method list() and could able to list all files. But, not able to list files by FIFO sequence.
    I would appreciate to receive any thoughts implementing FIFO for listing files using java.
    Thanks,
    Siva

    Duplicate post, replied to here:
    http://forum.java.sun.com/thread.jspa?threadID=5169767&messageID=9652068#9652068

  • Java Code to Download files

    Dear Sir,
    I would kindly like to know whether any java classes are existent ,avliable for download ,which would provide the facility to
    download a file from the server to the client machine.If not,kindly advise me on how to perform this task and kindly send me sample code if possible.
    With regards
    Santosh.

    www.jscape.com has a great library for FTP as well as HTTP protocols. The library contains support for a host of other protocols as well. A trial version is available, but the licensed version is $95. I tried to find freeware for this type of functionality but none of them were very good. Shelling out the $95 ended up being a wise decision.
    JP

  • Java code to upload file and place file on server directory

    Hi,
    Am a relatively new Java programmer. I need to add a functionality to a struts web application to allow users UPLOAD a file (using browse button). I need to read the file name,, do some other checks and eventually, upload the file to a server directory.
    When do I start? Any good website for source code examples?
    Thanks

    See this http://jakarta.apache.org/commons/fileupload/

  • Running the Java Code from Batch File

    Hi All,
    I have run a code sucessfully in Eclipse and it uses Logging API from Java
    When i try running the same program from batch file it throws error
    java.io.IOException: Couldn't get lock for log\Properties_Log_16Sep2009_150229
    at java.util.logging.FileHandler.openFiles(Unknown Source)
    at java.util.logging.FileHandler.<init>(Unknown Source)
    at com.adidas.SPM.LogMessage.<init>(LogMessage.java:26)
    at com.adidas.SPM.MainApplication.initialize(MainApplication.java:51)
    at com.adidas.SPM.MainApplication.main(MainApplication.java:102)
    I am working on a windows systems the folder log has all the permission i have provided with all
    Not sure why the code runs like this
    The batch file is like below
    set CURR_DIR=%CD%
    cd %CURR_DIR%\bin
    %CURR_DIR%\jre6\bin\java -classpath .;%CURR_DIR%\lib\FirstProject.jar com.test.MainApplication
    echo %ERRORLEVEL% The Error Level
    echo SUCCESS
    GOTO END
    :END
    pause
    Rgds
    Aditya

    Vikash.SunJava wrote:
    According to me the problem is that there are many instances trying to access the same property file. Nothing wrong with that since they only are reading it.
    The best way to do is that create a schedular in Windows that runs at some predefined interval (say 1 minute).Huh?
    >
    What will happen is if your program runs for more than a minute even then the new process will not start until old process is autaomatically killed. Please do not check this option if you want the program to exit normally.
    If the Task is still running stop at this time
    O_o

  • Java code for Compressing files in UNIX

    Hi ,
    i am trying to compress files in unix but not seeing any change in size of packed file .any code please help.

    Hi ,
    i am trying to compress files in unix but not seeing
    any change in size of packed file .any code please
    help.Does this question have anything to with Java whatsoever? If so how? And what types of files are you attempting to compress? If you are trying to compress a compress format the size difference will be... small if not actually worse then the originial.

  • Java Code - to upload files on https

    Hello:
    I am really looking for a bean to upload and download flat files to a https server.
    Thanks.

    Sanju,
    If you wann to do transformation, Validation..That is message mappping & if you get a text file then You need to use FCC in Sender File adapter,  If the Target system requires a different format example as text file and different structure then you need to use FCC in SOAP adapter and post to the webserver,  If no message mapping needed then you can go ahead without FCC and drop the file with the help of HTTP / SOAP Adapter
    Cheers
    Agasthuri

Maybe you are looking for