How can i run a jar file as EXE on mouse click..

*{color:#0000ff}how can i run a jar file as EXE on mouse click..is it possible in any way?????????{color}*

amrit_j2ee wrote:
*{color:#0000ff}how can i run a jar file as EXE on mouse click..is it possible in any way?????????{color}*Do you mean converting it from a jar file to an EXE file or do you mean that you would like to run the application by just double clicking it?
If it's the latter then you need to make the jar file including a manifest.
The manifest can be just a txt file with its content to be something like this:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: Somebody
Main-Class: NameOfTheMainClass
Class-Path:
X-COMMENT: Main-Class will be added automatically by buildTo make the jar file including the manifest, use something like this in your command prompt (of course you must have compiled your java file(s) first):
jar cfm test.jar MANIFEST.txt NameOfTheMainClass.classAfter that you'd be able to run your application just by double clicking it.
If you're a NetBeans user, you can build your standalone application by right-clicking your project and then going to properties => run => and choosing a Main class. After that right click on that project and "Clean and Build", locate the jar file in the "dist" folder and double click it =]
Hope it helps,
LD

Similar Messages

  • How can i run a jar file?

    hi there
    how can i run a far file on my pc. i have installed JRE 1.3.1, and set the classpath to C:\Program Files\JavaSoft\JRE\1.3.1_02\bin for the user variables, what else do i need to do to run it?

    Hi everyone.. i had a funny problem. Microsoft removed from registry and system the vm and i got the problem of java.dll and the registry problem when compiling.
    How did i resolve that?
    too easy:
    1. go to the registry and search the key "JavaSoft"
    2. add a Key with the name "Java Runtime Environment"
    3. select the new key and add a alfa-numeric Value with the name "CurrentVersion"
    4. set the value c:\jdk1.4 //the place of your jdk-version
    5. insert a new Key with the name "1.4"
    6. go to the new key and add an alfanumeric value with the name "JavaHome" and put the value c:\jdk1.4\jre\lib
    do this where you find the key Javasoft (in my registry was twice)
    i did it and got no problems

  • How can I create a jar file

    Hello!
    How can a create a jar file?
    I want to run an application just clicking in a icon.
    How can I do this?
    Thanks a lot.
    K�tia.

    Get to the command prompt
    change directories to the directory where the main class resides.
    Open your text editor and type the following in it:
    Manifest-Version: 1.0
    Main-Class: NameOfMainClass //Just name without ".class"!!!
    Created-By: Your Name Here
    Save this file as whatever you want to name it with ".mf" as the extension.
    Then go back into the command prompt and type the following:
    jar cfm "NameOfJarFile".jar "NameOfManifestFile".mf *.class
    (without the quote marks of course)
    Hit "Enter"
    This will jar it up and make it executable.
    If you have any images associated with the program you can add them in the same way as above. Just add *.gif or *.jpg after the *.class portion.
    Good luck!
    LEEMAX I. T.

  • How can i rename a jar file using only java code

    i have tried everything i can think of to accomplish this but nothing works.

    ghostbust555 wrote:
    In case you geniuses haven't realized I said I tried everything I can think of not that I tried everything. So help or shut up I realize that I didn't try everything but if you can't figure it out either DO NOT POST.
    And the question is how can i rename a jar file using java code? As it says in the title. Read.I would tell you to use the File.renameTo method, but surely that would have been obvious, and you would have tried it already? But maybe you didn't. You were kind of lacking in details in what you tried.
    And yes, I am a genius. Just don't confuse "genius" with "mind-reader".

  • How can i download these jar files to load SQL server derive

    Hi
    pls tell me how can i download these jar files and from what site i can do that to enable to load SQL server driver
    msbase.jar
    msutil.jar
    mssqlserver.jar

    if u use sqlserver 2000 u can download for free from microsoft.com
    and other sites are freetds.com i guess

  • How can I convert a class file to Exe file

    hai
    How can I convert a class file to Exe file

    Please search the forums before asking questions - this has been answered hundreds (really!) of times.

  • How can we call a jar files(seperate projects jars) to each link of the tre

    how can we call a jar OR WAR files(seperate projects jars OR War) to each link of the tree.

    i want have home page that have this menu
    ========================
    -- Sale
    --- Customer
    --- Reader
    -- Energy
    --- Calc
    -- Service
    --- Chnage Name
    --- Change Code
    =======================
    For example
    --- Change Name
    ---- Page Reister
    ---- Page Confirm
    ---- Page Anoc
    ---- Page Save
    ======================
    i want user to access to every page From Each Case(Change Name) .
    i create for change name one project in my fushion web app and for other case
    How to I Can Call Page register From change name in Menu of The home page ????
    Edited by: user13151366 on Feb 4, 2013 4:44 AM

  • How can i run .app executable  file

    Hi,
    While i was searching for my topic on google code, i found one project and i download that.
    But its "MyProject.app" with yellow cplored xcode sumbol and i can not run this file.
    Does any one know that how can i run this type of file. i want to run this project.
    And another question. I want to create executable file from my project like exe on windows. Is there any way to create this type of file????
    Thanks.

    vavdiyaharesh wrote:
    Hey,
    When i double click on .app file it quit and show me message like "The application project140 quit unexpectedly"........."
    So is there any problem in .app file?
    On your machine sure sounds like it.
    How can i create exe file and how can i pass -0 to compiler ..iu don;t see any option in xcode for that.....
    giove me solution...
    I think you'd be better off taking some training, or at least working through some of Apple's tutorials.
    http://developer.apple.com/documentation/developertools/conceptual/XcodeQuickTou r/qtintro/chapter_1_section1.html
    Thanks.
    You're welcome.

  • How can i run my .class file with out installing java ?

    Hai friends..am new to java , plz help me any one.
    I wrote a small program in java lang. i want to run this program in my friend's system , which is doesnt have java language .. How can i run this program in my friends system with out installing java language?
    one of my friends told that ,it needs to copy the jvm in to ur directory where the java code is present . How can i copy the jvm from where to where ..?plz help me any one

    Your friend will have to install the Java runtime if they want to run Java
    programs.
    Don't go copying files yourself - and especially don't go copying them to the
    location of the Java code. After all, if your friend wants to run 42 different
    Java programs they shouldn't have to have 42 copies of the runtime.
    Just download and run the installer from this site:
    http://java.sun.com/javase/downloads/index.jsp
    Be careful to download the "Java Runtime Environment" not the JDK.

  • How can I create a jar file that will run automatically on double click

    all the jars I created run only from the command-line.
    how can I make it run by double-click on it?

    First you will need to associate .jar files with the javaw.exe program in order to just be able to double click on the jar and run it from within a windows explorer application. Next you will need to set the main class attribute of the manifest file. My understanding is that the value of this attribute is used by the launcher to know which class to load. In other words, which is your main application class. To specify this attribute open your manifest file in a text editor. You will find this file located within the jar at META-INF/MANIFEST.MF. Then, add the line,
    "Main-Class:<relative path to the main class>" However, remember not to add the .class extension to the end of the class name.
    In Windows 2000 you can associate jar files with javaw by finding a jar file in Windows Explorer and right clicking it. This will give you a context menu which should have an Open With... option (if you are not using Windows 2000 and don't see the 'open with' menu item, try holding down the shift button while right click on the file). Select the Open With... option, then, when the dialog appears highlight javaw and select the "Always use this program to open these files" checkbox. When you hit the OK button you should have all your jar files associated with the javaw process.
    Once you've done this, you should be able to double click on your jar file and run your application.
    Regards,
    Daniel Walsh

  • How do I run a Jar file?

    Hey,
    I created a program that I want my friend to use so he can send me some information about his server. however, I can't figure out how to make it work with a jar file. For instance, I have a .class file called server and also a txt file called Manifest.txt so I write this command in my terminal.
    jar cf serv server.class Manifest.txt
    this then creates the jar file. Within the "Manifest" file I have written,
    Main-Class: server
    Now when I try to run this program I type in
    java -jar serv
    then it out puts this.
    Failed to load Main-Class manifest attribute from
    serv
    When I run the program with my JDK it works perfectly fine and the little server runs without a problem. I am extremely new to working with jar files to make programs work so I feel like im over looking something stupid. Does anyone know what else I need todo to make this program run? Thanks ,
    Cobbweb

    Isn't the "manifest" supposed to live in the jar's
    "meta-inf" folder, and be named "manifest.mf" (not
    manifest.txt)?Yeah, but wouldn't you think the "jar" command would take care of those details? The help for its "m" options just says "include manifest information from specified manifest file".
    There are stupid things to watch out for, though, like having a proper line-ending (e.g. CR/LF) on the last line of the manifest file. And usually you make the name of your jar file have a ".jar" extension, although I doubt it would be a problem if you didn't do that.
    Looking inside the jar file would tell you a lot. Such as if the server.class file wasn't in it, or was in it but in the wrong directory, and so on.

  • How can I generate a JAR file like SwingSet2.jar (jdk1.3)

    I need to generate a JAR file like SwingSet2.jar (jdk1.3). I mean when I give a double click in a JAR file, it opens my application.

    You want to make en executable JAR file. You can read how to do this in the JAR files forum.

  • How can I create a jar file at a Unix systems?

    Hi there,
    how what's the command to create a jar file in Unix? I'm creating a zip file and then renaming it to jar, but it's size is smaller than the one when I use the WinZip tool at a Windows system.
    Thanks,
    Andre

    Oops,
    it very easy to do. Just use the jar -cvf command
    Andre

  • How can i find the jar file version in Solaris

    Hi,all.
    I just forget the java command by which i can know a jar file's version.I searched the jar command manual,unfortunately there is nothing helpful.
    Can anyone tell me what should i do?
    Thanks in advance.

    I'm not sure that there is any version information related to a JAR file. And if you look at the JAR classes in the API docs, there is nothing related to the version. There can be a version number in the MANIFEST though, but not related to the JAR itself.

  • How Can I get the Jar file path ?

    I have an aplication in a Jar file. This application might be situated in any directory.
    I would like to know programatically the path where it was installed.
    Is there any way to know this simple thing in Java? I cannot believe that there is not a function like System.getProperty("user.dir") for this as System.getProperty("user.dir") will always return the directory from where the Java VM was lauched!
    Thank you!

    You can get the location with:
    URL codeBase = getClass().getProtectionDomain().getCodeBase().getLocation();But as has been pointed out, it's probably better to specify the directory to store these files some other way, e.g. use a batch file or shell script to launch your program and make it the cuirrent directory, or put the directory in as a property or command argument.

Maybe you are looking for

  • Receiver Determination with Synchrnous Send step in BPM

    Hi,    Is there any way to use BPM Receiver Determination step type with Synchronous send step ? Is it possible to send a request to multiple receivers synchronously and capture the response? Appreciate for your response. Thanks, Rao.Mallikarjuna

  • Portal runtime error in EP7 SP 11

    Hi, I am getting the following error. <b>Portal Runtime Error An exception occurred while processing a request for : iView : pcd:portal_content/com.t.Preeti/hoverdesktop/frameworkPages/com.sap.portal.hoverpage/hovermenu Component Name : hovermenufram

  • Blue screen (Yes Apples posted fixes don't work for me)

    I am tired tired... I can't get rid of the blue screen delay at startup in 10.5.2 or 10.5.3. I've tried the fixes. No go... I even tried wiping a drive and doing a Clean Leopard install. After adding the .5.3 update the long delay returns. My delay i

  • Is it possible to send a request for report pagination?

    Hi, I have a page with 3 regions. Only one of these regions is displayed depending on a special request. This works fine as long as we don't push the select list for report pagination. Do we have any possiblities to send a request when we select anot

  • Can improve picture quality in Dvd Pro?

    I just made my first DVD in DVD Pro! Just a simple DVD with first track start. I am disappointed about the quality. I took it from 2k clips, assembled them in FCP, exported to Compressor, choose (MPEG 2) best quality max 90 min (Footage is only 2 min