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.

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 make destop application using java

    how to make destop application using java
    i mean to say when we double click on the exe file the program should lounch the application
    for windows

    when i double click ii got the msg
    Failed to lad main class manifest attribute from
    x/x/xyz.jar
    what exatly it meansIt means that your Manifest.MF for the JAR file should contain an attribute called Main-Class pointing to a class containing the main() method.
    Something like this should be present in META-INF/Manifest.MF :
    Main-Class: MyApplicationMain

  • Deploying no java applications using Java Web Start

    Hi,
    I am new to java web start. Is it possible to distribute non java applications using java web start. I have an APP which can run on a desktop in standalone mode. The app has jusy HTML and Java script files. Is it possible to package this app and deploying using java web start? I am assuming If it is possible, I can make updates to the packaged app in the web servers and the updates will be downloaded next time the app is used provided configurations are correct?
    thx

    The app has jusy HTML and Java script files. Is it possible
    to package this app and deploying using java web start? Not really. Resources for JWS need to be zipped,
    while this HTML/JS app. will (I guess) not work from
    inside the depths of a Jar (or Zip) archive.
    Note that you can organise for those files to be
    downloaded and expanded onto a known place
    on the user's disk, by using an 'installer' element,
    but..
    ...I am assuming If it is possible, I can make updates to the
    packaged app in the web servers and the updates ..installers are only called once, and do not 'update'.

  • Executing Jar Application using Java Programs

    Hello there,
    How can I run a java application using java programs.
    Desc:
    public class someapp {
       public static void main(String[] ext) {
           // How can I execute a jar application from here through java code
    }

    You could use java.lang.Runtime.exec(). Another way could be loading the main class of the jar file and invoking its main method dynamically.

  • Help needed  while exporting crystal reports to HTML file format using java

    Help needed  while exporting crystal reports to HTML file format using java api(not using crystalviewer).i want to download the
    html file of the report
    thanks

    the ReportExportFormat class does not have HTML format, it has got to be XML. Export to HTML is available from CR Designer only.
    Edited by: Aasavari Bhave on Jan 24, 2012 11:37 AM

  • I want to create a Ajax based Chating application using java .

    hi . I want to create an chating Application , and ajax based chatting application using java as my server side language ..i have some idea about it .. but one thing that i m not understanding is that how i will communicate with other users because each user has its own session so what i will do to send one messge to all the users ???? . i m new to JavaEE and i have chosen this as my semester project .. i need some help regarding this .

    First get it working without AJAX.

  • 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

  • Change file mode using java?

    Hi
    Can I change file mode using java method other than
    Runtime.exec()
    thx
    Jacinle

    Hi
    Thank you Roopasri. But what I want is not using Runtime.exec
    I am using Unix and I want to change some image file access mode
    so not a RandomAccess File.
    So is there anything like chmod command on Unix?
    something like maybe java.io.File.chmod("755");
    I read that's a feature requested early on 1.2
    Will it be included in 1.4?
    Jacinle

  • GIS applications using Java/SDO/MapViewer

    Hi everybody !
    First of all, sorry if my english is not soo good.
    I had installed MapViewer in my computer. It4s working perfectly.
    After view the JSP demo page and the Java demo program, I4m trying to create my own program, using the MapViewer.
    Well, before start my job, I wonder if there is anyone who has already create a application using Java, MapViewer and SDO.
    Is it really possible ?
    How is the productivity ?
    What are the major problems ?
    What are the alternatives ?
    Thanks,
         Rodrigo

    What XML Parser are you using to get an atributte4s value ?
    The JSP Demo makes a string comparison, but I want to use the XML Parser. How can I do this ?
    Response DTD Example:
    ~~~~~~~~~~~~~~~~~~~~
    <?xml version="1.0" encoding="UTF-8" ?>
    <map_response>
         <map_image>
              <map_content url="http://map.oracle.com/output/map029763.bmp" />
              <box srsName="default">
                   <coordinates>-122.260443,37.531621 -120.345,39.543</coordinates>
              </box>
              <WMTException version="1.0.0" error_code="SUCCESS"/>
         </map_image>
    </map_response>
    Questions:
    ~~~~~~~~~~~~~~
    - How can I get the value of the url atributte (http://map.oracle.com/output/map029763.bmp) ?
    - How can I get the value of the error_code atributte (SUCCESS) ?
    I4m holding the response DTD sending by MapViewer on a String variable.
    Thanks,
    Rodrigo

  • How to run exe file from inside java

    I wan to run an exe file from inside java code. How can I do it?
    Thanks

    Hi Oakam
    This is very simple. Just go through the given code below
    in place of FILEANDPATHNAME just give the exe's path and name
    Note :- adding ".exe " is not necessary
    public class exep
    public static void main(String args[])
    Runtime r = Runtime.getRuntime();
    Process p = null;
    try{
    p = r.exec("FILEANDPATHNAME");
    catch(Exception e)
    Give ur feedback
    Thanx
    Ottran

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

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

  • MS-Word.EXE file invocation through java?

    Is it possible to run winword.exe from the system through
    java. Is there any way to invoke any application file without using the absolute path.

    Hi
    But before using Runtime make sure that u search for Winword.exe. And i had the same requirement for an application which needed Excel file to open up and what we did was search for an Excel Executable and then store the value is properties file and later on use that path for Openeing Excel Files.
    Bye

  • Unable to run my application using java web start

    i have created one application and use java web start to download the application. all the files are succesfully downloaded but when i try to run the application an expected error occur. this only happen in my machine but not in other machine i'm currently using
    -jsdk1.4.2
    -windows 2000 professional 5.00.2195 service pack 3
    -pentium III 870 Mhz
    -x86-based PC
    -RAM 256 Mhz
    Anyone knows why, plz help me with this puzzle

    Please post the information from the Web Start "Exception" and "Wrapped Exception" tabs when the error occurs (I assume the error was in fact unexpected ;-)
    A blind stab in the dark would be that you don't have write permission to the cache directory on the second machine. Also worth checking that the proxy settings on the second machine are the same as the first (if they are on the same network).

Maybe you are looking for

  • Can I roll back from Windows 8.1 to Windows 8?

    I have a surface Pro that I use for testing. I installed the 8.1 update. Unfortunately I wasn't paying full attention when it came to the point of asking if I wanted to save my personal files or nothing. I didn't notice that there wasn't a choice to

  • 2nd display in iMac-style?

    Hi all, i would like to add a 2nd 20" display to my 20" Alu-iMac. Has anybody seen a display, which is very similar to the iMac-display? The same height of the stand, aluminium-design and so on, too? Do the ACD have the same height, so that you could

  • Why can't I get a PID to tune without having an offset from setpoint?

    I am using the basic PID algorithm supplied in the PID toolkit and after calculating the terms as described in the manual, my system controls quite well. However, there is about a 2-3 degree offset below setpoint on my heater. I am just starting to u

  • Pass parameters into a method from other methods.

    I m testing  2 related applications with coded ui test and wanna pass a parameter from one method into another. how can i do that? Thank you in advance.

  • HT204264 Duplicates of edited photos appear in my iCloud Photo Library

    For some reason, when I go to the iCloud website, there are duplicates of edited photos. Also some dates are wrong when imported from the Mac.