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

Similar Messages

  • 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 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 create a simple app that will automatically add folder script

    Hi! I hope I can get a little help on this.  I tried searching online and haven't found anything.
    Is there away I can make a simple "application" that will automatically add a folder script to a users folder?
    Basically I need a folder script to run but I don't want to explaint o a user how they'd have to do it in automator.
    I'd like to be able to create an application they double click.  The app tells them to select a folder then automatically runs the script.
    Does anyone have any ideas of how'd I'd do this?

    Oh I get it. Yeah I read you post on one of the other pages and didn't quite understand, but not that you say that your're makeing this for another user, it makes sence.
    So what you want to do is have the computer automatically install a script on a customer's computer, right?
    (I'm using "custumer" loosly; i.e. just another user)
    If that's what you'd like to do, then you'll probably have to write an actual program in Xcode, since I imagine automiticlly installing folder action scrips will be highly discuraged by Apple because it would cause a huge security hole in the OS. (You wouldn't want some random person sending you a folder action installer disgused as a regular app LOL.)
    But I will actually suggest the following, which I think will work great for your users:
    Make a regular Automator app, and drag it to your Dock. Now, have the user click and drag a bunch of photos to the application icon, and it will run the app automatically on those files.
    You could try a work flow like this:
    ask the user Are you sure?
    convert pictures
    save pictures to ConvertedPics folder
    pop up a confirmation message saying that everything was resized
    Hope this helps

  • How can I create a phase shift that will cause cross-cancellation?

    I recently recorded something using a USB audio input, and after it was done realized that a cellular device had interfered with the signal and I have a terrible hiss, some clicks, cell noise, etc. in the recording. Setting a noise print and running "Reduce Noise" did more to help this file than I ever would have thought possible (thank you Apple!!), but I think I might be able to do even better.
    The left channel has the audio I need, plus all the noise. The right channel has ONLY THE NOISE! Can anyone think of a way that I can use this right channel to create a cross-cancellation of the noise in the left channel? Theoretically, this should create a perfect (or close enough to it for me) file, should it not?
    The phase shifter doesn't seem to have what I would need to do this, but I'm sure some audio genius out there can think of a way I can either do this manually or with a filter or effect.
    Thanks for any suggestions!

    Hi Glen,
    IF you were to take two +identical signals+, sum them in equal amounts and flip the phase on one of them 180º to the other you will get +complete cancellation+.
    According to the manual on page 221 the Process>Invert will do this.
    Invert
    +Choosing this command inverts the phase of each sample in the audio file or selection.+
    +Each sample’s amplitude is unchanged, but the phase is inverted. In the waveform+
    +display, the wave’s crests become troughs and vice versa.+
    IF your R channel is the exact same noise as the noise in your L Channel then this technique could work for you.
    You can test this out with any track -> put a copy of it on another track and Invert, they resulting playback will be total silence.

  • How can I creat a control button that will allow the vi to run?

    Instead of pressing the run button, I want to creat my own run button that will allow my vi to run.
    Any idea?
    Thank you

    First you need to set the VI to Run When Opened (VI Properties>Execution). Then you create a front panel Boolean. On the diagram what you need to do is have some sort of idle state where nothing is done until the Boolean is pressed. It could be a separate while loop that doesn't exit until the Boolean is pressed, an Event Structure, or as part of a state machine. Look at the shippings examples Queued Message Handler, New Event Handler, Using Buttons for Options to name just a few.

  • How can i delete a corrupted file that will not download?

    I recently purchased a song on itunes and i keep getting a message that tells me to try redownloading due to the song being a corrupt file.  When i attempt to redownload the song, i get another error message that tells me the download could not be completed. At this point i just want to delete the download, but since it was never actually downloaded it wont go away.  Everytime i open my itunes i get the error message and it continues to pop up every ten minutes.  Please help!

    Highlight the said file on the Music section of your Library, and press the Backspace key.  When asked whether you want to move to the trash, say yes.  Then you may download it again looking in Your Account in the purchased section.

  • How can I create a exe file with a tab control on it that work´s ?

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?

    I have made a new Posting with the same question but this time I added a screenshot of the VI.
    Attachments:
    project7.1.jpg ‏129 KB

  • How can I create an Excel file?

    Hi,
    How can I create an Excel file using Forms 6i.
    What I'm doing is to create a file using TEXT_IO package an name it .XLS. If a read it double-clicking over the file, it opens Ok but If I open directly from Excel it opens the Convert dialog.
    I need to create an excel file as it was made from within Excel.
    Thank in advance,
    Benjamin

    When you are talking about subfiles, are you talking like Package contents of an application?
    Terminal application in Applications -> Utilities can give a command line grasp of all your files using the du command.
    Type
    man du
    when entering the terminal, followed by the enter key.
    Note, by default the terminal opens at the Home folder.   To navigate outside the Home folder enter "/Volumes/name of mounted drive/folder/subfolder" as your path.  If there are spaces in the name, putting quotes around the whole path can help.    If you end your du command with a > name.txt a text file with the name name.txt will be plugged into your Home directory.  That you can open with Excel and parse by /es thus giving you everything in Excel.

  • How can I Create a exe file were a tab control on it work`s

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?"
    Attachments:
    project7.1.jpg ‏129 KB

    Make the tab control a control and not an indicator. If you want to write
    to it you need to create a local variable.
    "Carlos-R." wrote in message
    news:[email protected]..
    I have a VI with many controls and indicators,these are spread on a
    tab control.This tab control works with out any problems but if i
    create a exe file then the tab control is fixed. How can I create a
    exe file so that the tab control on it work´s ?"

  • How do I create a pdf file that is 300 dpi in Adobe Acrobat XI?

    How do I create a pdf file that is 300 dpi in Adobe Acrobat XI?

    PDF files do not have a "resolution" - they aren't images. The pages are a mix of vector art and text, and raster (pixel-based) graphics. The raster items on a page can (and often do) have different resolutions.

  • How can we create the DBC file?

    Hi all,
    I am attempting to run the test_fwktutorial.jsp within the toolbox.jws/Tutorial.jpr project in Jdeveloper . We have to provide the Oracle application DB connection in the project properties ( we have to provide this as a DBC file) . How can we create the dbc file from the Database connection ? i tried to export the DB connection in Jdev , but it is getting exported to xml file rather than dbc file . Please help to fix this.

    Yes, you can do that.
    Put both the DBC files under dbc_files\secure folder.
    You can change the dbc files from project settings and point to the desired file.
    I am not sure, but maybe you need to stop JDevloper and start again for the new DBC file to take effect.

  • How can i create my own file from the Adobe Export PDF to Word ?

    How can I create my own file from the file of the Adobe Export PDF to Wodrd?

    If there is handwritten content in your PDF then ExportPDF can't convert that to word.
    ~Deepak

  • 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 create a pdf file from Indesing, whit out loosing resolution...

    How can i create a pdf file from Indesing, whit out loosing resolution...
    in linked images (bitmap) idon´t know where or how can i keep the same resolution "image" that is from the original file ......

    In the export settings there is a panel called Compression. You can set downsampling and compression, or lack thereof, there.

Maybe you are looking for

  • URGENT DSC: I can write to shared variables but CANNOT read them?

    hello everyone, I'm using DSC to communicate with a DELTA DVP28SV PLC. I managed writing to a coil to to turn a fan on, and I also wrote to a register. However, when i tried to read the coil (same coil i just turned on) or when i tried to read a regi

  • Problem in Internalization( I18N) for changing the Source langeuage

    Hi All, I have some problem in changing the source language in header: In S2X editor, I copyed the .xlf file pasted in same then modifyed accordingly(xxx_de.xlf) when i opend the xlf its asking the Activity when I created its throwing repository acce

  • I updated I tunes and my iPhone as well, I lost my ring tones, how can a have them back?

    I updated my iPhone in a computer at home. But I have my phone synchronized with a computer at the office wich I can't download the last version of iTunes. The thing is that the computer back at the office does not recognize anymore the iPhone coz it

  • CIN - Non-Leading Ledger setup with reporting

    Greetings fellow experts, I have a question from our colleagues in India.  When CIN is utilized and a non-leading ledger is setup, can they still run CIN specific reports from the non-leading ledger or does some special configuration or reporting nee

  • Importing .mov files to InDesign CS2

    I am trying to import a H.268 or Mpeg .mov files into InDesign CS2 and every time I select the file, I get the following message pop up: "Error: Cannot place this file. No filter found for requested operation" When I check the 'Interactive Options' t