Making java project .exe file

how can you make your java project an executable file
I mean how can people execute a java project like they are executing programs that written in c++(.exe files)
Thanks

<--- SEARCH FORUMS

Similar Messages

  • Converting .java to .exe files  to run those without runtime environment

    i want to convert my java code to a windows application file so that when ever i have to take it to some place for description, i would not require to install java run time environment. and can show up the working of the code with the help of it..................

    Converting a Java application into an exe file
    This question is sometimes asked many times on a single day in the comp.lang.java.* newsgroups, and I always end up asking the same question: why do you want to? Most answers fall into one of four categories, and each prompts a different course of action. Most of the time, an exe file isn't actually required.
    Reason 1: Speed
    "Java is interpreted, so I want to make it native and make it faster." Well, very few modern desktop VMs actually spend much time interpreting Java bytecodes these days. Everyone and their dog has a JIT (Just In Time) compiler which will compile your code into native form before running it. Smart VMs will do this only when appropriate (ie if the code is going to be run more than once, or contains loops etc), and may recompile the code on the fly if the conditions change (eg if a subclass is loaded which invalidates some inlining optimisations, or if the code is run very frequently and therefore merits more aggressive optimisations). The bottom line is that for most applications, Java running on a VM is pretty fast these days. It's usually pretty close to the speed of a natively compiled and similar C/C++ application - certainly I've seen changing compiler (or compiler options) for C/C++ make more difference to speed than going between Java running on a VM and natively compiled Java.
    There are some situations where the speed difference is significant. If you're really desperate for that extra bit of performance, try evaluating one of the native compilers listed here with your particular application. Make sure you write some real benchmarks though - vague notions of "feeling faster" may well be down to preconceptions.
    Remember, too, that as new VMs come out, they tend to improve performance. That means that to get the best out of your application if it's running on a VM, the user only needs to download a later VM - no action is needed on your part. If they're using your natively compiled code, you'll probably need to recompile on a later version of the native compiler, if one is available.
    Reason 2: Being able to open an application by double-clicking on it
    If you can ask the user to install a JRE first, executable jar files are the way to go here. They're very simple to set up and use, and it won't cost you any money. See "Jar" in the Java Glossary for further information on how to create an executable jar file.
    Reason 3: Not having to distribute a jar file and the JRE
    Well, in some form or other, your users will need a runtime environment. Some native code compilers even require you to have a JRE installed as well! Chances are you're not going to be able to create a much smaller download, if that's the worry. However, there are other options here which make it easy to install your application. There's Java Web Start which also includes automatic upgrading of your software, but which will impose some restrictions (a bit like an applet, but slightly less restrictive) unless you sign your application. Alternatively, there are quite a few installers available, some of which are free (or free for personal use). See Installer in the Java Glossary for a list of some of them.
    Reason 4: Intellectual property protection
    Java byte-code can be decompiled pretty easily, and even obfuscators can only do so much. Here, native compilers really do make a difference. Obviously they won't make your code totally impossible to understand, but it'll be very difficult to get back to Java sources which could be modified and recompiled. The only further question to ask at this stage is whether the downsides of native compilation (eg it being a less-well-used (and therefore likely to be less solid) platform, being expensive etc) are worth the upside of the added protection. In some cases the answer will be yes, in some cases the answer will be no.
    What next?
    If, after reading through the above, you still want to try a native compiler, you can usually evaluate them before buying them. (Some are free, of course.) There's a list on Marco Schmidt's web-site, along with another view of the pros and cons.
    I go the above article in : http://www.yoda.arachsys.com/java/javaexe.html

  • End of year Java Project Question - File I/O

    Hello.
    My project involves allowing the user (which should be someone learning the very basics of Java and OOP) to copy and paste a one class program into a JTextArea. Then, they click a button which analyzes their code and visually shows how objects in their program interact with one another. My problem is that I am not sure of how to GET their code after it is pasted. I read up on FileReader/Writer but it seems like they save .txt files; I do not need to save the user's program on disk but only in memory and analyze their. Does anyone know of how I could do this? I obviously do not want to save it as a String because if the code is 100 lines long, then it just gets too messy. I would like to be able to read line by line what the user is trying to accomplish in their program in a txt file. If I could save a txt file and at close of the program, delete it, that could work too.
    Any help? Thanks in advance.

    Does anyone know of how I could do this? I obviously do not want to
    save it as a String because if the code is 100 lines long, then it just
    gets too messy. I would like to be able to read line by line what the
    user is trying to accomplish in their program in a txt file. If I could save
    a txt file and at close of the program, delete it, that could work too.huh? you can write a whole application on one line
    for (int i = 0 ; i < 10; i++){ System.out.println("Line 1"); System.out.println("line 2");  etc... }
    This is ambitious for an end of class project (a class project even)
    your application have to check the syntax, java keyword, keep what object is instantiate, what method is invoked..if that method belongs to the class...etc..

  • Java to exe

    Hi Good Morning,
    I would like to ask what software that can convert java to exe files for free.
    thanks in advance.

    yes, BUT.
    Maybe something has changed fundamentally since the last time it was asked a few minutes ago that's so secret that only the forum gods know about it yet!
    (yes, I actually saw that argument used as justification in the umpteenth thread about which is the "best" IDE some time ago).

  • Java-rmi.exe

    Hi,
    I have client (applet) server (RMI) system that needs to work through a firewall.
    Everything i have read says that there is a java-rmi.cgi and java-rmi.exe files in the bin dir of the JDK. I have jdk 1.3.1.1 installed and could not find it. I downloaded JDK 1.2.1 and that didnt have it either. I found that jdk 1.1 did have the java-rmi.cgi file but now i dont know how to use it properly.
    I am running a windows server with IIS 5 and am not sure how to configure it to run cgi. Maybe i should find the exe version? Where is it?
    Cheers
    Stew

    It is java-rmi.cgi or java-rmi.exe depending on the platform. Instructions are given in the JDK. However this is for RMI/JRMP. This is the RMI/IIOP forum, and java-rmi.cgi doesn't work for RMI/IIOP.
    EJP

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

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

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

  • 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 to make .exe file in java swing

    dear friends;
    i am working on a project. I want to create a setup file so that we can install our software any where on the system and for that I have to make .exe file. pls gide me for making .exe file
    thanks and regards
    shashi_vns007

    prigas wrote:
    Make a .jar which is javas equivalent to .exe.Then for the "..setup file.." offer the end user a JWS *(<- link)* based launch that will offer desktop integration (desktop shortcut and menu item) as well as access to automatic updates and much more. JWS will, of course, also work for Mac and Linux OS's.

  • How to display a .exe file in java applets by avoiding the file downloadbox

    Hi sir,
    I know that in order to display a any file(or)program in java applets you need to use showDocument().Where you cannot use exec() in java applets.
    My problem is that when i use showDocument() to display .exe file.It is showing a file download dialog box.If we click & open only it is opening that .exe file.Here i want to open the .exe file without showing that file download dialog box in java applets.
    Since,i am undergoing a project which involves it,it is quite urgent.pls.do provide the exact code in java applet without showing that file download dialog box.If it can't be done pls. do provide any other possibilities in order to be displayed on the browser.Thank U.
    Regards,
    m.ananthu

    Hi!
    I think you it's better to write a server socket program
    in server and open a socket connection to server socket then
    send exe file content via connection.
    (I guess you know applets only have permission to open socket connection to their code base)
    Bye!

  • 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);
    }

  • Java program file to an exe file

    hi all
    i am a final year student doing project in java environment. in my project i want to convert a java program to an exe file.. i have seen some of the replies from the forum but i am not clear with that..
    i need the steps in detail and the way how to do...?
    thanks in advance

    If you Google, you will find a commercial Java compiler available for 60-day free trial. It provides detailed instructions on how to get started with compiling your code. The 60 days should be enough time for finishing your school work.

  • How to create a exe file from a Java application

    hi,
    i have developed an application in java,now i want to distribute it to my client, for this i need to build a .exe file out of this application.
    i already have a jar file ,now can i convert a jar file to a exe file.
    im trying this out with JSmooth project but im getting it right, so can anyone help me .
    thanks,
    vishal j

    if u use dos to run your app like
    "java myapp"
    u can create a shortcut link
    in target wright java remove the path
    just leave the file name without the extension,
    like this Target: "java myapp"
    when u click on appy u'll c that java gets its full path, thats fine
    that works 4 me, ofcourse ur client needs to have JRE or JDK.

  • XCode Java project - can you compile both a Mac .app and a Windows .exe?

    I'm working on a project for my computer science class, and it has to be done in Java. I'd like to be able to build a .app for the Mac and a .exe for Windows, and ideally I'd like to do it straight from within XCode. Is it somehow (at all) possible to configure a target to compile a .exe, or is there an easy way to export an XCode project so it can be easily opened on some Windows application and compiled into a .exe? (note: I am TOTALLY clueless about .exe files and how they're compiled!)

    In theory, you can simple stuff everything into a JAR file, and run that
    directly on the Windows box. The user simply double-clicks the JAR
    file. But it is better, for various reasons, to hide the JAR file inside an
    EXE. There are several packages that will do that for you. I think that
    "Launch4J" is a good choice. It is free, and well supported.
    Here is a good survey article, with links to many of the choices.
    http://www.excelsior-usa.com/articles/java-to-exe.html

Maybe you are looking for

  • ITunes opens to "ALBUMS" instead of "SONGS".

    I want iTunes to open to "SONGS" when I open it and sometimes it does but often it opens to "ALBUMS" instead. Is there a setting for this? Thanks.

  • Object reference not set to an instance of an object in live connection

    Each metod for LiveAuthClient drop exception: "Object reference not set to an instance of an object.". I think this is due to the fact that session in LiveAuthClient is null, but i not sure why. I'm not registered in Windows Store Dashboard, but earl

  • Formu;a column

    hai all I am developing a report. I am using UTL_FILE in that report in formula column. When i try simply i am getting the result. When i include the utl_file concepts in the formula column which will create a text file in the server path , it is com

  • Payment Terms for Differential ( Final Cycle ) Invoice

    Hello everyone I am looking for input based on experiences and best practices Here is requirement SD Diffrerential Invoicing been implemented in our SAP system. All works fine. Provisional Cycle created based on Formula Provisional Rules, once Final

  • Importing Flash .fla files

    I am taking over a client who has a .fla site with several fancy "Ribbon","Bubbles", and "Stripes" transitions I want to import. Is it easier to just edit it in Flash or to Bring it into Flash builder? I would like to at least bring in the original p