Creating EXE in Java

It is possible to create .EXE files in Java?
Thanx

Java does not produce .exe files. The are various (Windows specific)
tools that do - compilers - but javac isn't one of them.
If you mean the question more generally: "How do I create files that the
user can run by double clicking them, or typing their name at a
command prompt?", then the usual method is to create a .jar file.
In Windows double clicking a .jar file usually results in javaw being run
with the .jar file as its only argument. The application contained in the
.jar file then runs.
Creating .jar files - complete with lots of examples - is covered in Sun's
Tutorial here: http://java.sun.com/docs/books/tutorial/deployment/jar/index.html
(Like any document or executable a java applcation can be launched
from a .bat or .cmd file, but if you don't actually need the fine control that
these offer, .jar files are the way to go.)

Similar Messages

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

  • Similar to .exe in Java

    Hi,
    I want to develop an application(it has more than one java file) using java. I want to give that to my client in '.exe' format.
    Is it possible create .exe files in java,or is there any other alternative for this Java?
    Can any one guide me how to proeceed pls...
    Regards
    Rao

    Microsoft SDK for Java 4.0 (free to download
    on www.microsoft.com).
    It includes the program "jexegen"
    command:
    jexegen /main:MainClass /out:Program.exe *.class /W
    1. MainClass : the class where the public void main(String[]args) method is in.
    2. Program.exe : the exe-file to be created.
    3. *.class : all the used class-files.
    4. /W : he won't show the black box of the MSDos-prompt with
    windows applications.
    IMPORTANT !!!
    Even after you made an exe-file you will still need
    a Java Vitrual Machine on your computer to execute it.
    Hope this helped
    -mist

  • .exe in java?

    grahhhhh!!!!
    Can you make a .exe file using java, or does the "platform independent" quality prohibit that. Basically, I want to create a simple java program that I can put on a disk, and load to another computer (without a compiler) and be able to run it. How do I do that?
    Thanks,
    Dave

    As long as the other machine has the java runtime environment (jre), then you can easily make single file, single double click applications (just like .exe). All you have to do is after you have all your .class files, put them in a .jar file. You have to make a small text file (called a manifest file) to tell it it is executable, but that is easy. There is a whole section on jar files in the Docs and Training section.
    Hope this helped.

  • Creating .exe file

    Hello
    Is there any method by which I can create an exe file for distribution of my application. The current method for distribution is to make a jar file and then to run it using java -jar option. But it is a bit difficult for a novice user. If someone can help me out and tell me a method for creating exe file for my project.

    I found Jet pretty much unusable for larger applications
    The compiler it uses is buggy, and doesn't manage memory well at all, leading to frequent unrecoverable crashes. and it's SLOW
    Far easier to download a java launcher application, there are several available, or fork out for InstallShield for Java for example.
    McF

  • Creating .exe installers from Creator

    Though it is not recommended to distribute Java applications as .exe files (Webstart and JARs being the preferred mode), will it be possible to create .exe executables of applications from Creator?
    .exe installers are more familiar to many users than JARs.
    Manish

    Hi Manish,
    Is the machine, you want to download the application to, a stand alone machine or a machine on the network?
    If it is a stand alone machine you would have to install the App Server and then deploy your application. One thing to be noticed is that Creator is for building web applications. So, to me, it would not make any sense to deploy it on a stand alone machine.
    If the machine you want to run the application on is a networked one, then you would only need to install the the appserver and deply the application on the server.
    Bundling the appserver along with the application also has its other drawbacks. For one you would have an appserver for every application you are running on a server(assuming the appserver gets installed every time you run the executable.) Another issue could be the size of the bundle.
    Hope this rambling of mine has cleared your doubts.
    Apart from that I am not aware of any possibility of creating an executable or packaging both the app server and the developed application in one single bundle.
    Cheers :-)

  • How to run geniatagger.exe from java

    Hi,
    i'm trying to run geniatagger-1.0.exe from java on windows vista, using Process pr = Runtime.getRuntime().exec("C:/geniatagger-1.0/geniatagger-1.0.exe");
    However, i keep on getting the same error. "Cannot run *.exe CreateProcess error=2" . I tried the same code with excel.exe which is installed in C:/ProgramFiles
    and it worked. I also tried to create a path variable C:/geniatagger-1.0/geniatagger.exe;%path% and then run the same java code. Yet, nothing has changed.
    I would really apreciate any help

    dalab wrote:
    Sorry, i didn't realise that the link was already sent! I found that earlier as well. I"I..." what?
    "I ...figured it out"?
    "I ... still need help"?
    You're not a vampire named Trever are you?

  • Launch4j for creating exe

    Hi,
    I am facing a problem while creating exe using Launch4j.
    It is giving an error as it Could not findthe jar file specified when build.bat is executed.
    The jar file is placed in the project folder along with build.xml and build.bat.
    Could you please guide me solve this issue. Please let me know incase of insufficient inforamtion as I am using Launch4j for the first time.

    Launch4j is not a product developed or endorsed by Oracle, and is probably not very widespread: a majority of Java developers (unfortunately) won't care about how the applications are installed and launched.
    So you won't find a lot of help here. Instead, the likeliest way to get help on Launch4j specifically, is to turn to the Launch4j's project support: http://sourceforge.net/projects/launch4j/support
    Good luck,
    J.
    Edited by: jduprez on Feb 24, 2011 1:23 PM

  • How to save report in PersonalCategory  after creating it using java panel?

    Hi,
    Anybody knows How to save report in PersonalCategory  after creating it using java panel?
    I dont want to save it in public folder. I want to save report (webi) in user's personal category.
    can anybody send me source code?
    It will help me a lot.
    Thanks in advance
    Amol Mali

    Hi teda,
    i'm assuming that you have seen my post that i did successfuly save report in user's personal category.
    Actually the report is created in webi java panel using RE SDK and  is saved in Report Sample Folder then i'm saving it in user's personal category by following code
    string query = "Select SI_PERSONAL_CATEGORIES From CI_INFOOBJECTS Where "
                         + "SI_INSTANCE=0 And SI_ID=" + reportID;
                    InfoObjects infoObjects = infoStore.Query(query);
                    InfoObject infoObject = infoObjects[1];
                    Webi wreport = (Webi)infoObject;
                    ObjectRelativeIDs personalIDs = wreport.PersonalCategories;
                /personalIDs.Add(Convert.ToInt32(categoryID));
                   infoStore.Commit(infoObjects);
    But the report is presents in the Folder also and in user's personal category also.
    I dont want the report to be in the folder (Report Sample) if i saved it in user's personal category.
    How can i do that?
    any idea.
    Please help me.
    Thanks in advance
    Amol Mali
    Edited by: amol mali on Jan 9, 2009 7:55 PM

  • Help with creating an animated java applet...

    Hello, everyone! I'm working on a homework assignment for my Intro to Java class, and I'm having a problem I've never run into before. My assignment is to create a animated Java applet which displays an image of an alien spaceship which travels in diagonal lines across the applet area. My main problem is that when I try to compile my code, I get three "cannot find symbol" errors about my variable "alien." I can't figure out why declaring it as a class variable hasn't solved my problem. The errors pop up for the repaint() method, as well as the pane.add and the paintIcon. Here's my code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.Timer;
    class DrawAlien extends JPanel
    public class Alien extends JApplet implements ActionListener
      ImageIcon alien;
      public void init()
        Container pane = getContentPane();
        alien = new ImageIcon(getClass().getResource("alien.gif"));
        pane.setBackground(Color.black);
        pane.add(alien);
        Timer timer = new Timer(30, this);
        timer.start();
      public void actionPerformed(ActionEvent e)
        alien.repaint();
    }I've only posted the section which I think is relevant to my problem, but I can post the rest if anyone thinks it's necessary.
    I'm aware that the code isn't ready yet in several other ways, but I don't think I can move on until I figure out what's up with the "alien" variable. I don't need anyone to write code for me or anything like that, I just lack perspective here. A couple hints in the right direction would be invaluable. Thanks!
    Edited by: springer on Nov 25, 2007 10:46 PM

    You can?t add ImageIcon into pane, you can do like below.
    alien = new ImageIcon(getClass().getResource("alien.gif"));
        pane.setBackground(Color.black);
        JLabel label = new JLabel(alien);
        pane.add(label);

  • Getting error while creating exe file from my VI.

    Hi,
    I am trying to build the exe file of my VI. I tried to follow the instructions in Help ( Example: Building a
    Stand-Alone Application) but instead of creating exe file, it is creating folder containing my all VI and VI from Application Builder.
    Kindly Help me.
    Thanks and Regards,

    It sounds like you might have accidentally selected to create a source distribution instead of an application. That's different from an application. A source distribution basically makes a copy of your VIs into another location so that others can use them for VIs they create. When you expand the Build Specifications tree the icons indicate what kind of build you're creating. An applicaiton has an icon that looks like a tiny window with a title bar. A source distribution has an icon that looks like a folder with the Add function in the upper right:
    Attachments:
    app vs source.PNG ‏3 KB

  • Creating a custom java module for excel to xml conversion.

    Hi Gurus,
    I am creating a custom java module in sap nwds 7.3 for Excel to XML Conversion. But I am getting following error
    Classpath dependency validator message.
    Classpath entry  will not be exported or published. Runtime ClassNotFoundExceptions may result. 
    I imported the Jars from a different PI system and i am using NWDS in local PC with creating a separate folder with all JARs and also imported them using build path option.
    This issue is occuring for all the jars imported.
    I am using following code.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import java.util.HashMap;
    import jxl.Cell;
    import jxl.Workbook;
    public class JavaMappingExcelToXML implements StreamTransformation{
    private Map map = null;
    private AbstractTrace trace = null;
    public void setParameter(Map arg0) {
    map = arg0; // Store reference to the mapping parameters
    if (map == null) {
    this.map = new HashMap();
    public static void main(String args[]) { //FOR EXTERNAL STANDALONE TESTING
    try {
    FileInputStream fin = new FileInputStream ("c:/ashu.xls"); //INPUT FILE (PAYLOAD)
    FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML2.xml"); //OUTPUT FILE (PAYLOAD)
    JavaMappingXLStoXML mapping = new JavaMappingXLStoXML ();
    mapping.execute(fin, fout);
    catch (Exception e1) {
    e1.printStackTrace();
    public void execute(InputStream inputstream, OutputStream outputstream) {
    String msgType = "Message Type name will come here";
    String nameSpace = "Namespace Name will come here";
    String xmldata = "";
    try {
    Workbook wb = Workbook.getWorkbook(inputstream);
    xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+ "<ns0:"+msgType+" "+"xmlns:ns0=\""+nameSpace+"\n">";
    Cell[] cells ;
    Cell[] cellNames ;
    cellNames = wb.getSheet(0).getRow(0);
    for(int j=1;j<wb.getSheet(0).getRows();j++){
    xmldata = xmldata+"\n<Record>\n";
    cells = wb.getSheet(0).getRow(j);
    for(int i=0;i<wb.getSheet(0).getColumns();i++){
    xmldata = xmldata+"\t<"+cellNames[i].getContents()+">"+cells[i].getContents()+"</"+cellNames[i].getContents()+">\n";
    xmldata = xmldata+"</Record>";
    xmldata = xmldata+"\n</ns0:"+msgType+">";
    System.out.print(xmldata);
    xmldata.getBytes();
    wb.close();
    byte by[] = xmldata.getBytes();
    outputstream.write(by);
    inputstream.close();
    outputstream.close();
    System.out.println("\n"+"File processed");
    catch (Exception e) {
    e.printStackTrace();
    Request you to guide how to resolve this issue.
    Thanks  in advance

    Hi Gurus,
    I am creating a custom java module in sap nwds 7.3 for Excel to XML Conversion. But I am getting following error
    Classpath dependency validator message.
    Classpath entry  will not be exported or published. Runtime ClassNotFoundExceptions may result. 
    I imported the Jars from a different PI system and i am using NWDS in local PC with creating a separate folder with all JARs and also imported them using build path option.
    This issue is occuring for all the jars imported.
    I am using following code.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import java.util.HashMap;
    import jxl.Cell;
    import jxl.Workbook;
    public class JavaMappingExcelToXML implements StreamTransformation{
    private Map map = null;
    private AbstractTrace trace = null;
    public void setParameter(Map arg0) {
    map = arg0; // Store reference to the mapping parameters
    if (map == null) {
    this.map = new HashMap();
    public static void main(String args[]) { //FOR EXTERNAL STANDALONE TESTING
    try {
    FileInputStream fin = new FileInputStream ("c:/ashu.xls"); //INPUT FILE (PAYLOAD)
    FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML2.xml"); //OUTPUT FILE (PAYLOAD)
    JavaMappingXLStoXML mapping = new JavaMappingXLStoXML ();
    mapping.execute(fin, fout);
    catch (Exception e1) {
    e1.printStackTrace();
    public void execute(InputStream inputstream, OutputStream outputstream) {
    String msgType = "Message Type name will come here";
    String nameSpace = "Namespace Name will come here";
    String xmldata = "";
    try {
    Workbook wb = Workbook.getWorkbook(inputstream);
    xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+ "<ns0:"+msgType+" "+"xmlns:ns0=\""+nameSpace+"\n">";
    Cell[] cells ;
    Cell[] cellNames ;
    cellNames = wb.getSheet(0).getRow(0);
    for(int j=1;j<wb.getSheet(0).getRows();j++){
    xmldata = xmldata+"\n<Record>\n";
    cells = wb.getSheet(0).getRow(j);
    for(int i=0;i<wb.getSheet(0).getColumns();i++){
    xmldata = xmldata+"\t<"+cellNames[i].getContents()+">"+cells[i].getContents()+"</"+cellNames[i].getContents()+">\n";
    xmldata = xmldata+"</Record>";
    xmldata = xmldata+"\n</ns0:"+msgType+">";
    System.out.print(xmldata);
    xmldata.getBytes();
    wb.close();
    byte by[] = xmldata.getBytes();
    outputstream.write(by);
    inputstream.close();
    outputstream.close();
    System.out.println("\n"+"File processed");
    catch (Exception e) {
    e.printStackTrace();
    Request you to guide how to resolve this issue.
    Thanks  in advance

  • Calling exe from Java

    Hi !!!!
    I have developed an exe program from prolog. But now I need to develop an interface for the exe with java.
    Can anybody help me with developing the interface.
    thanks
    Muditha

    Runtime.getRuntime().exec("your exe here")

  • Oracle.exe and java.exe are running my CPU 100% under XP Prof SP3

    11gR1
    oracle.exe and java.exe are running 100% CPU
    I have increased virtual memory to 4 gig
    I have defragmented the drive.
    I checked the drive for errors.
    I am searching the whole drive for viruses
    I do not have the problem with Redhat Fedora 12 running 11gR1
    I have 1 gig of RAM but cannot install release 2 because the installer expects
    1 gig + 1

    ooops!!! left that off...sorry
    XP Prof SP3 32 bit..*.no problem with Redhat Fedora 12 running MySQL and 11gR1*
    1 gig RAM Dell precision W/S 1.5 Gig rate 74 GiG SCSI HD 15000 RPM
    Don't pass out but I am also running MySQL server 5.1.41 and MS SQL Server Express 2008.
    Lucky it didn't catch fire
    I installed XP prof months ago but this CPU domination occurred only starting last night!
    However slow everything works in 11gR1
    sqlplus myname/password and then select rows from table
    sqldeveloper
    PHP web sites
    I've had plenty of trouble with Java running slow and hogging memory!
    Edited by: landonmkelsey on May 2, 2010 12:21 PM
    Edited by: landonmkelsey on May 2, 2010 12:24 PM
    Let me guess...stop services for MySQL and MS SQL Server and see what happens!
    Edited by: landonmkelsey on May 2, 2010 12:26 PM

Maybe you are looking for

  • Using java type strings in objective C

    HI all, I am into a greater mess of creating a java equivalent string using NSString class. I need to a convert some strings into bytes and then I have to write in streams. The problem is in java the length of character is 2 bytes. But in objective C

  • Populating dynamic internal table

    Hi All, I've created a dynamic internal table the issue is that the data is to be entered in it from 2 different tables so ... is their any way we can read the internal table field names ... or any other way to populate data in it ...

  • "Installation is forbidden by system policy -  Error: 1625" when installing Adobe Products.

    Hi All, We run Windows 7 Ent 64 bit OS in our company and recently we have started getting the following error "Installation is forbidden by system policy -  Error: 1625" when installing Adobe Products even though i am logged in as an Administrator.

  • Design a bespoke wordpress theme in adobe photoshop

    Hi I want to know is the best way to design a bespoke wordpress theme and make it into a functioning website. I am looking to design a taxi theme type of websites, does anybody know any exisiting templates I can work on?

  • Custom Web Apps

    Hi all, I have a requirement like this. I have a Category of Blogs and Blog posts So lets say category of blog needs following fields Title Publish Lets assume blog posts will have the following field sets Title Category ( a list of categories from c