Creation of a .exe file for a Java program

hi, myself is venu.
Can anyone help in creating a .exe file for a generated .class file.
Thanking you in advance.
bye

Hello,
There is a tool that you can download called JavaExe. It will make an executable of your java class. The class must have a main method. Just google for it and follow the instructions. I have tried it, it does work well.
delaware_samurai

Similar Messages

  • How to create a .exe file for a java application

    Hi, I want to create a .exe file for a java application I am developing so that I can schedule it to run at a particular time using Windows Scheduler on WinNT. Is there any way to accomplish this? Or is there any other way in which a Java application can be scheduled to run at a particular time on Windows everyday?

    Create a .bat file and run that. Just have, in the .bat file:
    java YourClassName Alternatively, you can use javaw YourClassName (without *.bat, just put it into Windows Scheduler like suggested above).
    using javaw won't pop up any window...

  • How to run an exe file in a java program

    Hi,
    Can somebody tell me how to run an exe file in a java program.
    Thank you!

    Yes, java.lang.Runtime.exec().
    Read this carefully before you do:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Don't write a line of code before you're reviewed and understood the article completely. - MOD

  • Create .exe file for core java project

    how can i create .exe file or wrapper for my core java project

    cotton.m wrote:
    To be honest with you this is going to be very difficult at best.
    And I'm not sure it's entirely realistic or legal. You'll need to install Tomcat and MySQL and all your stuff...Haven't ever tried doing so, but I think it might be quite possible sollution...
    There's a preconfigured version of Tomcat, that you simply unzip on the drive (so there's no nned of running installator).
    If OP would use some MySQL server's clone, that needs no installation (some time ago i was looking for thing like thatand found couple of those).
    All configuration (installing services etc.) as well as copying JSPs and other stuff to Tomcat dirs can be made with script files (.bat or whatever) or under another java application that will run all the commands...
    As cotton.m wrote... if it works, it's going to be hell lot of work...

  • How do I call another exe file from a Java program?

    Hi,
    I am doing a simple IDE (text editor/interpreter) for a simple programming language we are developing. It will be submitted as our project for this semester. I created an exe file (in C) which will be used as the interpreter. How do I call the interpreter from my IDE? The interpreter should run when the user clicks a button (i.e. the "Run" button). I've tried the Java Runtime class but it doesn't work. Anyone who knows how to do it?
    Thanks!

    I first tried to do a simple program that calls system commands such as dir, cd <dir>, etc.
    I do not have the exact code right now but as far as I can remember, here's what I wrote:
    class Sample{
        public static void main(String args[]) throws IOException{
           BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
           String command;
           while ((command = in.readLine()).equalsIgnoreCase("exit") == false){
              try{
                Runtime.getRuntime().exec(command);
              }catch(Exception e){
                 System.err.println("Error: " + e);
          System.exit(0);
    }

  • How to create .exe file of the java program you create?

    This must be the qustions asked several time on the forums.So here it is again.
    This sounds absurd to some developers here cause you'll say just create jar file and distributre to usr but sometimes there is not possiblity of having runtime environment in windows computers.So if we can bundle the enviroment and the setup together then packing into exe and then distribute like most of commercial java application sounds better.But the problem is how to do that?
    Ok creating exe will increase the size but that doesn't matter,if there is any freeware tool to accomplish just that?

    Check this out:
    http://search.java.sun.com/search/java/index.jsp?qp=%2B
    orum%3A31&nh=10&qt=create+exe+file+program&col=javaforu
    s

  • How do I run an exe file from a java program?

    I need to run an exe program from within a java program.
    what do I need to do this?
    thanks

    See java.lang.Runtime.exec()

  • How to create a batch file for a java program?

    I have a java project in JCreator and the project is organised into packages. I have also configured JCreator to provide 2 arguments to the main method when the project is executed.
    I would want to create a batch file (.bat) for this project where the batch file can automatically use the arguments set in JCreator when the program runs.
    How do I go about creating the batch file?

    where the batch file can automatically use the arguments set in JCreatorThat all depends JCreator... can you get those arguments somehow?

  • Issue with creation of a specific field for a java program.

    Hey everyone,
    This is homework which is end of chapter "challenges" to practice what we've learnt.
    The chapter covers inheritance (super class and all things related)
    I'm having quite an annoying issue with the very beginning of the instructions, where it tells me to make the following fields:
    - Employee name
    - Employee number in the format XXX-L , where each X is a digit within the range 0-9 and the L is a letter within the range A-M.
    - Hire date
    This is what I wrote for code so far
    private String name;
    //private WTF
    private String date;I really have no idea what to do for the second field, how to even constrain integers and letters in the same field with a rule for number range and letter range, and that for each character independently, for what I understand.
    Any advice with this? It's blocking me from continuing -_-, because I can't make accessors and mutators and constructors, etc, if i'm still unsure of how the fields unfold.
    Thanks in advance.

    You can create a HireDate class.
    public class HireDate{
       private final int day;
       private final String month;
       private final int year;
       public HireDate(int day, String month, int year){
          this.day = day;
          this.month = month;
          this.year = year;
    }In the HireDate Constructor you could put if statements to ensure that only correct information is present. The fields are final because the hire date will not change. Override the toString() method so that when you print it out it will be in the correct format. Create some getter methods to get the private fields.
    Then in your other class just do this
    HireDate hired = new HireDate(10, July, 1991);Now you have an object that stores all 3 fields for you. You can use the object as you like and when it prints it will be in the format you want.
    Or you could just make hireDate a String variable. That is what I always did and I never lost marks for it. The reason I suggest this way is because you mentioned rules and constraints.

  • How to create the exe file for java project.

    How to create the exe file for java project.
    am done the project in java swing , i like to create the project in exe format, so any one help for me,
    send the procedure for that.
    thanking u.

    How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
    http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
    and got several useful links.
    Better search terms might yield even better results.
    Sheesh.

  • How to create the exe files for java application

    How to create the exe file for java application?
    got any software to do that?
    Thanks

    In terms of converting java applications into exe files, there are 3 schools of thought:
    1) Instead of converting it to an exe, convert it to a jar file. Jar files are more portable than exe files because they can be double-clicked on any operating system. The caveat is that a Java interpreter must be installed on the target computer for the double-clicking to work.
    http://developer.java.sun.com/developer/Books/javaprogramming/JAR/
    2) Create an exe launcher that, when double-clicked, attempts to find a Java interpreter on the local computer and launches the Java application. The exe file is still double-clickable but whether your java application runs depends on whether a Java interpretor is installed on the target computer.
    http://www.sureshotsoftware.com/exej/
    http://www.objects.com.au/products/jstart/index.jsp
    http://www.duckware.com/products/javatools.html
    http://www.ucware.com/jexec/
    http://www.rolemaker.dk/nonRoleMaker/javalauncher/
    http://www.jelude.cjb.net/
    http://thor.prohosting.com/~dfolly/java/index.html
    3) Create an exe launcher that bundles a Java interpretor. Same as above but when the exe file is double-clicked, it searches for a Java interpreter and if one is not found, it installs one on the target computer. The caveat is that the exe file would have an overhead of 10 MB in size for the interpreter.
    http://www.excelsior-usa.com/jet.html (evaluation version available)
    4) Convert the Java application into a native exe file. The caveat is that if you use Swing for your GUI, it won't be converted. Also this option is still somewhat experimental.
    Can't think of any free options right now.

  • Want to create and exe file for .java files

    Hello all :)
    I am making a multi-threaded console application.
    It also takes command line parameters from user.
    I want to create .exe files out of .java files.
    Note:- One class contains main method (in default package) and all other classes are in some specific package
    I want to create an exe for the whole application.
    The solutions which i get on net is exe4j but i was unable to use it.
    Please suggest me to create an windows executable file out of java files.
    Thanx in advance

    by definition, if you double click on the .exe , you won't pass it parameters
    you have to launch a shell, reach the directory where the .exe (or .jar) is stored, and launch the exe directly with parameters, e.g:
    myApplication.exe -u user -p password
    you can't double click on the exe and say "ok, i give you -u -p!" ; everything has to be done simultaneously if your app is using the "String [] args" arguments of main
    if you want to specify parameters after launching the app, you have to grab user input in your main

  • How to create an exe file for single class

    Hi all,
    l have one some program with only one class and want to create one exe file for
    easily execute for the user.
    I've use exe4j and another tool to do but all failure, the error message always shown me that main class not found.
    Any idea??
    Thanks a lot!

    I suspect your class has somewhat invalid thing.
    Have you verified:
    - The class you wish to be executed contains public static void main(String args[])- The package declaration on your executable-wannabe class is valid
    - In case you need to import another class, make sure the import statement(s) is valid
    No matter what kinda program you use to create .exe from java class, the above things must be valid. AFAIK.
    Regards,
    Farid Herman

  • Making '.exe' file/application using JAVA

    Hi,
    Is it possible to make an application(an exe file) using just Java, just as we in VB.If yes can you please give some idea how can we do that.
    Thanks.....

    To make a java application run from a click on an icon
    you must create a Jar file as I've explained below:
    Create a separate folder and place all the source code programs needed to run the application in it. You just need the ones with the .class extension. You don't need the ones with the .java extension.
    Open up 'Notepad' and type in this line:
         Main-Class: your class that has the main method
    You don't need the .class extension.
    ex. If your main method is in a program called HelloWorld.class
    type in :
    Main-Class: HelloWorld
    Make sure you hit the RETURN key at the end of the line. I forgot to do that which is why I spent four hours trying to get this to work!
    Save this as: manifest.mf
    and put in the same folder as above. Make sure it doesn't save as manifest.mf.txt
         Open MS-DOS.
    CD change to the directory and folder you are in.
    Type this in exactly as I have written:
    jar cvfm0 myprogram.jar manifest.mf *.class
         This should put a Jar file in your folder. Just click on it and it should work.
    Make sure the program doesn't need to take input from a command line, like DOS.
    Otherwise it will do nothing. As long as your program creates a frame, window, button or something, it should work.
         To run the Jar file from DOS(for testing purposes) type:
    java -jar myprogram.jar
         If you get an error stating that it can't find the main method class(like mine did), right click on the 'myprogram.jar' file that was created,
    click on properties, then ZipMagic.
    Open the 'manifest.mf' file and make sure
    that 'Main-Class: yourprogramname' is in there.
         If you followed these directions you should be able to create an executable java file.
    Below I've explained what the commands to create the Jar file mean.     
    jar: means you are creating a java archive file which acts like a ZIP file
    c: means create a new jar file
    v: means verbose which tells DOS to show the action it is doing
    f: means that the files to choose are going to be typed in by a user(you at the Dos prompt)
    m: means to use the manifest file that you specify
    0: means that the file won't be compressed
    To make a JAR file you only need the cfm letters.

  • How do I install Netgear XE102 on my iMac?  It will not install off of the cd provided it appears to be only for Windows based computers.  Checked Netgear website and could not find a setup.exe file for Mac.

    Unable to install Netgear XE102 on my iMac.  Checked Netgear website and could not find a setup.exe file for Mac.

    That means either no software needs to be installed on a Mac or the product is incompatible with Macs. Contact NetGear tech support for help.

Maybe you are looking for