Why does my .jar file do nothing when double clicked?

Hi all. Just got into java, though I do have a background in Visual Basic, PHP, C / C++ and JavaScript. Anyway, i've written a "Hello World" program and it runs successfully in the IDE, however when I run the .jar executeable file, nothing happens. Why? Thanks in advance.

I'm using NetBeans IDE, and I have everything set up correctly to the best of my knowledge. As said, no problems arise when running the application in the IDE, just running the .jar file directly is giving me problems. Here is the code if it provides any assistance in solving my problem:
package including;
* @author jayz
import java.io.*;
// #include <java.io.h>
public class Main
    //in Java, everything is encapsulated in2 classes, not functions
    public Main()
    //creates a Main() object
    public static void main(String[] args)
        System.out.println("Hi");
    //is our main function (method)
}

Similar Messages

  • Why does FF save files to desktop, when I have "downloads" checked in options? This is a new issue with the latest version 3.6.3 Windows XP Thanks.

    Why does FF save files to desktop, when I have "downloads" checked in options? This is a new issue with the latest version 3.6.3 . Using Windows XP Driving me nuttier! Thanks.
    (Is is that MicroNetFrame Asst thing?)
    == This happened ==
    Every time Firefox opened
    == When I installed latest version

    Thanks for your reply. I appreciate your help.
    It was just a hunch that MircoNetFrame was causing the problem. I disabled it as you suggested, and I still have the problem.
    I just changed under Tools>Options> General - had checked "ask me every time" under downloads, so instead of asking me, FF saved the download to I know not where. It no longer saves it to the desktop, leaving a duplicate in "my documents".
    In windows, I have found unless one knows the entire name of the document, one can never find anything. It isn't listed under recent ''''''__. I can't recall the nomenclature, but the
    capability is ridiculous. So, I don't know where that file I just downloaded is!
    I downloaded a PDF file, but this happens with all DL's. It was so easy to have them all stacked in one place and I could recall
    what I had and when I downloaded it easily.
    Do you have any other suggestions other that going back to the old version of FF, which I would rather not do?
    Thanks again for your time, it is very considerate to help a complete stranger, I must say. Sounds like something I might do! Cheers!

  • Why does a saved hotmail message disappear when I click on "continue to create the message? It only happens with Firefox, not with Explorer.

    Why does a saved hotmail message disappear after I click on "continue creation the message? It only happens with Firefox, not with Explorer.
    == This happened ==
    Every time Firefox opened
    == A few weeks ago

    Hello Helena.
    You may be having a problem with some extension or plugin that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?

  • Jar file not executing on double-click

    Hello,
    I have a .jar file that I would really like to execute using a double-click in win xp.
    I can execute the jar file witha java -jar command on the command prompt and the program runs but when double-clicking i get the error: cannot find the main class: program will exit
    I had win rar installed on my computer which changed itself to the default app to open jar files.
    So this is what I've tried
    I tried modifying the registry command to run java -jar, javaw -jar but they don't work.
    I have created several manifest.mf files with this in them
    Manifest-Version: 1.0
    Created-By: 1.4.2_07 (Sun Microsystems Inc.)
    Main-Class: MyClass
    I know that a carraige return needs to be at the end though I don't know really how to check for it (I assume its there because I have a few extra lines after the last text peice). I've read through some other threads but nothing seems to work. It's getting really annoying always having to go through the runline. Thanks for the help.

    I don't understand why Netbeans has such a hard time creating working jar's for applications. This is the second time I've written an application that just will not work when trying to execute using the jar. The last time this happened I used Eclipse and imported everything (including the layout) and Eclipse got it working the first time.
    This time, I thought I'd go back to Netbeans since they released a newer version 4.0 (I haven't gone to 4.1 yet). Apparently nothing has changed as my application, once again will not run from the jar. What's the deal with Netbeans?
    I think I'll, once again bring my project into Eclipse and have that make the jar.
    Kurt

  • Why does FCP error "File Not Found" when I try to open my sequences????

    I recently updated all of my software and the following day I started getting errors "file not found" when I would try to open a sequence. Now all of my sequences are being lost and I am losing time and money because I can't meet deadlines! This *****!!! With one sequence I had to reedit the entire thing from scratch and when I did for some reason the old one would then open. But the next time I opened FCP both sequences would error out. Following the "file not found" the computer responds with another error "error: out of memory" What the devil is going on with this crap?

    I seem to have figured out what my problem was. After trying to build the same project (that failed on the Mac Pro) on my laptop and encountering the same errors, I realized that the problem had to be with one or more of my assets and not my new version of FCP, since my PowerBook is running FCP 5.0.4 and my Mac Pro is running FCP 5.1.2.
    In my case the "corrupt" file was a Photoshop PSD file. In the past (FCP 4.5) I was able to use PSD files with hidden layers. I would merge the visible layers into one layer, keep the hidden layers and save the file. Once in FCP, I imported the PSD file and kept right on truckin'. I've done this for years. For some reason now with FCP 5.1.2 (and 5.0.4), that's not flying anymore. Once I "Flattened" the PSD file in Photoshop (deleting all of the hidden layers) I was able to build the project without any errors.
    Interestingly, the technique I used to figure out which file was "corrupt" also allowed me to salvage parts of some of my "lost" sequences. I saw this posted in a forum at Creative Cow (creativecow.net). Basically, I opened up the project, clicked the OK button after the File Not Found error, went into the Browser, right clicked on the offending sequence, selected "Make Offline". When I double clicked the sequence it opened in the timeline with all of my assets offline. Then in the timeline, one by one, I right clicked on each clip and selected "Reconnect Media". Once I linked up the media, if I didn't get an error message, I would save as a new project (to salvage what WAS working), and go to the next clip. I did this until I found the offending PSD files.
    I hope this helps. Now it's time to play "catch-up"
    Mac Pro 3Ghz, 1GB RAM, ATI Radeon X1900 XT   Mac OS X (10.4.8)  

  • Why does address bar start to hightlight when i click but stops halfway through & wont take me to site?

    why does addressbar start to highlight when i click & then stops so I cant view...I try again & again...what do i do?

    Did you disable all the extensions before restarting?
    If it works in Firefox Safe-mode then disable all extensions (Tools > Add-ons > Extensions) and then try to find which is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    In Firefox Safe mode these changes are effective:
    *all extensions are disabled
    *the default theme is used (no persona)
    *userChrome.css and userContent.css are ignored
    *the default toolbar layout is used (localstore-safe.rdf)
    *the Javascript JIT compiler is disabled
    *hardware acceleration is disabled
    *plugins are not affected
    *preferences are not affected

  • Why does my bookmark link not open when I click on them

    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    when I click on my saved links it won't open, and sometimes when i try to shut down my web sight by clinking on the x it won't close.
    == Troubleshooting information
    ==
    when I click on my saved links it won't open, and sometimes when i try to dshut down my web dsight by clicking on the Xit won't close.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; SRS_IT_E8790071B0765D5233AB96)

    1 - NEVER make any changes of any sort tot he content or structure of the iPhoto library using the finder - there are no user servicable parts in it
    2 - what did you restore from Time Machine? and how did you restore?
    3 - how much free space do you have on your hard drive?
    LN

  • QuickTime does not automatically open video clips when double clicked

    Quicktime does not open video clips in iPhoto when the video clips are double clicked (nothing happens). Quicktime will open the video clip if I open quicktime
    and ask it to open the video clip. Regular photos will expand as they should when they are double clicked.

    It worked. I don't see why the Protected Mode is enabled in the first place, if it were to cause issues.
    Anyways, thanks Sabian,

  • Running .jar files in linux on double click

    Hi,
    i needed a solution to run the jar files on double click in linux system.Necessity is mainly because when i run the jar file by java -jar myapp.jar in terminal it works fine .Iam running my app continuosly in system tray(a server kind).But if i close the terminal my app exits.
    How to resolve this ?

    I am taking a SWAG.....it sounds like your problem is how to run a java app without a terminal window. So as I recall, there is some way in Linux to enter a command and have it execute in a new process. I don't recall the syntax but maybe putting a '&' character in the command line? Anyway, you should be able to use the method and use "javaw" instead of "java" to launch your app. You should be able to do this in a batch file too. Something like, javaw -jar yourjar.jar &

  • "File not found" when double clicking an .ai or .eps file

    Hello.
    I have Adobe DesignWebPremium_CS6_LS6 ME.
    When I double click an illustrator fornat file (.ai .eps .pdf) or right click and open with illustrator - I get the following error:  "File not found".
    I tried to uninstall and install again - but it's still has this bug.

    lee gal,
    Presuming nothing is wrong with the file(s) you try (can you open it/them in Acrobat/Reader?), you may try to reinstall using the full three step way:
    Uninstall, run the Cleaner Tool, and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • Why does the "Open File" window crash when I try clicking it?

    Everytime I click "Open File" under the  "File" tab, the window in which I try adding my sound files crash. Please help me understand why this happens and what i should do when it does.

    See:
    IOS 6 App store crash: Apple Support Communities

  • Why does a new tab not open when I click on it? I have just suffered from searchqu and successfully removed it (fingers crossed) but now I have this issue. Please help?

    Since I got infected with searchqu and (hopefully) removed this, when I try and click on the + to open a new tab, nothing happens. I have also tried clicking on file, scrolling to "New Tab" but again nothing happens. However, if I go to file then "New Window" then it will open a new window - but what a nightmare!!! Please can someone help?
    Regards
    Chelley
    x
    Solved it
    Than you very much for your help
    x

    Uninstall the '''''Ask Toolbar'''''. It can cause that problem.
    *http://support.mozilla.org/en-US/kb/Uninstalling+add-ons
    *http://support.mozilla.org/en-US/kb/Cannot%20uninstall%20an%20add-on
    *http://kb.mozillazine.org/Uninstalling_toolbars
    *Also see --> https://support.mozilla.org/en-US/questions/908952
    If that does not solve the problem:
    *See --> [http://support.mozilla.org/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    *See --> [http://support.mozilla.org/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    *See --> [http://support.mozilla.org/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Consider upgrading Firefox; you are using version 3.6.23, the current version is 3.6.25
    *See --> https://support.mozilla.com/en-US/kb/Updating+Firefox?bl=n&s=update%20automatically
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *'''''Shockwave Flash''''' (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *'''''Next Generation Java Plug-in for Mozilla browsers''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Why does the hand tool come up when I click the mouse?

    I am a very knowledgable individual of InDesign but this is a stumper. I cannot use any single tool that I have. When I press the buttons on the side, for instance the text tool, the image that should appear for the cursor does, but once I click the mouse, the hand tool comes up and drags my page around. This is even when the hand tool is not even selected. I am not pressing any buttons on the keyboard or anything, this is quite frusterating. I am trying to do this job and can't even edit previous files or make a new one. Should I reinstall, or what? Please help!! Thank you.

    What Al said (Hi, Al -- long time no see!).
    Here's a link for CS4: Adobe InDesign CS4 * Setting preferences
    Be sure to read everything, including comments.
    Similar link for CS3: Replacing InDesign Preferences

  • Sharing photos from iphoto 11, why does the photo information not upload when I click with share via email?  How can I make sure the photo information and location are shared when the photo (s) are shared.

    When I go to share photos in iPhoto 11, The photos transfer to the email I'm sending but the photo information and location don't.  The older version of iPhoto did it, why not this version?  What am I missing in the process of sharing via email?, Thank You.

    When you share to email do you get the following dialogue:

  • Why does the typing cursor pop up when I click somewhere on a page.

    Whenever I click on text on a web page the typing cursor pops up like I can type something into the page, but when I press a key nothing happens. So I am wondering how can I stop this from coming up because it really annoys me. Picture of what I mean can be found here: http://img543.imageshack.us/img543/4818/cursor1.png AND HERE: http://img209.imageshack.us/img209/9081/cursor2.png

    IT WORKS !
    Tools > Options > Advanced : General: Accessibility:
    [ ] "Always use the cursor keys to navigate within pages"
    Uncheck Always use the cursor keys to navigate within pages
    Thanks cor-el
    No need to reset anything...

Maybe you are looking for

  • Opening new web page using servlet and jasper report. ?

    Hello, I am developing one small web application and implementing jasper report in it. I am using jasper report with servlet. Which is generating one pdf file and displaying in same browser. But I want to open this report in new browser. Which is onl

  • Can't play .wmv files in Quicktime 7?

    I used to be able to play a library of .wmv files in Quicktime with no problems but all the sudden, I received an error message saying, "can't play this movie". They are only short 1-2 minute clips. I successfully downloaded the most recent version o

  • Can't rename event in iCal?

    Hi everyone! We're having quite a problem at our company common iCal. Aprox 20 different calendars are created and most is in use 5/7 days a week. During last week we suddenly discovered a new issue - we couldn't create new events. When double clicki

  • Problem with mp3

    Hi, im able to play mp3 songs in JMStudio, but can't transmit any MP3 songs. With JMStudio, in order to transmit, i'd have to configure the encoding with Big Endian (instead of Little Endian); so it threw the error of Failed to realize: cannot handle

  • No of records in PSA-ODS

    Hi Friends,            I'm trying to get the same number of records as my PSA into my ODS, I played arround with all the keys possible  but still dont see the count to be the same, I know data gets aggregated whn using ODS ,But this is my requirement