Spiffy Program Running Software

I am currently just fooling around trying to catch up on my Java. I created this little program that when you type something in it then loads up the program. I was wondering if anyone could tell me what was wrong with it, and tell me how to change it to an "exe" file so that I could run it off of my desktop.
Here is the Code:
import javax.swing.JOptionPane;
class runprogram {
     public static void main(String args[])  {
     JOptionPane.showInputDialog
                   ^----not a statement
        ("Input Command");
    if{
    else     (response.equals("RUN NOTEPAD"))
        Runtime.getRuntime().exec("notepad.exe");
    else
    if  (response.equals("null"))
         ^----cannot resolve symbol/variable response
{   JOptionPane.showMessageDialog
          ("Invalid Command");
System.exit (0);
}

1.
JOptionPane.showInputDialog
           ^----not a statement
        ("Input Command");
JOptionPane.showInputDialog("Input Command");
           ^----is a statement2.
if{
else     (response.equals("RUN NOTEPAD"))
        Runtime.getRuntime().exec("notepad.exe");
else
if  (response.equals("null"))
     ^----cannot resolve symbol/variable responseI can't see how that is the only error the compiler gave you.
Try it more like this:
String response = JOption.showInputDialog("Input Command");
if("RUN NOTEPAD".equals(response))
    Runtime.getRuntime().exec("notepad.exe");
else
    JOptionPane.showMessageDialog("Invalid Command");Doing the "RUN".equals(response) ensures we won't get a NullPointException if response is null (as we would if we did response.equals("RUN") style).

Similar Messages

  • I am trying to update to iTunes 10.5 and am getting a Apple Software update error. "There is a problem with this Windows Installer Package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. ??

    I am trying to update to iTunes 10.5 and am getting a Apple Software update error. "There is a problem with this Windows Installer Package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. ?? I can't uninstall the Apple Software Update from my Control Panel. It states "Fatal error during installation" Please HELP!!!

    I am experiencing the exact same issue during the installtion process for iTunes 10.5.
    I uninstalled all Apple components but when I attempted to uninstall the Apple Software Update I received the same message: "Fatal error during installtion." I was able to repair the Apple Software Update but still could not install iTunes 10.5 afterwards.
    I have tried everything that I could find on these discussions pages as well as other suggestions on third party sites. I continue to receive the error message: "There is a problem with this Windows Installer Package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.
    I was able to uninstall and reinstall QuickTime 7.7.1. During the reinstalltion process I received the same message (There is a problem with this Windows Installer Package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.) But after clicking "OK" the installtion process was succesful. PLEASE HELP!

  • Error when downloading itunes 10.5 that says Product: Apple Software Update -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package ven

    Each time I attempt to download the new itunes 10.5 I keep getting the following error message:
    Product: Apple Software Update -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action SoftwareUpdate_UnregServer, location: C:\Program Files\Apple Software Update\SoftwareUpdate.exe, command: /UnregServer
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Any Ideas of how to solve this one?

    After reading all these posts, one by one did not resolve my problem until I got the very end.  Regardless of what step would resolve your problem, these are the steps I would recomment to everyone for a what seems to be a safe and fool-proof upgrade to iTunes 10.5.
    1. Stand alone upgrade to the latest Quicktime version
    2. Go to control panel and "change" then select repair to the following applications in the order specified by the post on Oct 27. (Notice I skipped Quicktime because it had been upgrade manually,and Bonjour did not have a "repair" option)
    iTunes; Apple Software Update: Mobile Device Support; Apple Applications Support
    Some of these applications may not appear if they do not apply to your configuration (no iPhone, or no iPad, or other apple devices).
    Once all updated, I did not need to restart nor launch any applications, I simply went straight into the 10.5 upgrade, and where it normally got stuck, this time the installation continued for a while longer until it completed successfully.
    Great work everyone who contributed!  Thank you very much!

  • HOW DO I DELETE PROGRAMS RUNNING IN THE BACKGROUND OF MY IPHONE WITH SOFTWARE IOS7

    How do I delete programs running in the background now that I have upgraded my software to IOS7?

    http://www.apple.com/ios/whats-new/

  • Somehow, all of my exe files are tagged as Acrobat files - I cannot run any of the software on my computer - when I start the computer none of the startup programs run because they all try to open in acrobat.

    Somehow, all of my exe files are tagged as Acrobat files - I cannot run any of the software on my computer - when I start the computer none of the startup programs run because they all try to open in acrobat.

    See if anything in here helps: https://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html

  • Error when running software on computers w/o GPIB interface card

    I'm writing some simple GPIB I/O software using the VISA libraries and I'm getting an error when I run the program on a computer that doesn't have a GPIB card. The error is "The application failed to initialize properly (0xc0000142). Click on OK..." The program runs and works fine on the machine that is hooked up to GPIB devices, but I would like to be able to use my laptop for development. I've installed version 2.3 of NI-488.2, so all the required dll libraries are there.
    Thanks in advance,
    Jeff

    Unless you're using all IVI drivers, there is no built in simulation mode. As long as you make calls to VISA that expect a GPIB board, you'll get errors. Even if you had a gpib board, if you write your code correctly, you would also get errors when the board doesn't find an instrument to write to or read from. The only solution is for you to write your own simulation code. Encapsultate your write/read functions with case statements that skip the driver calls and return simulated data.

  • When attempt to download 10.5, receive message: "...problem with this widows installer package. a program run as part of the set up did not finish as expected. ..." -- what to do?

    I have attempted to upgrade my iPad which is necessar to downloan an app I want (My Radar).  The iTunes on my computer will not process the upgrade of 10.5 without message:  "There is a problem with this Windows Installer Package. A program run as part of the set up did not finish as expected. Contract your support personnel or packae vendor."  ..... Little old lady needs help, my iTunes "appears to be 10.5 on my PC; however, will not upgrade my iPad.  I have BitDefender as the "protector" on my PC if that is the issue.

    Go to support.microsoft.com/fixit
    In section 2 click on: Install or upgrade software or hardware
    Then click on the title in section 3: Fix problems with programs that cannot be installed or uninstall
    This link may get you there:  http://support.microsoft.com/mats/Program_Install_and_Uninstall/
    Let it run and then try to download it again

  • When I try to install iTunes 10.5, it says, "There is a problem with this Windows Installer package.  A program run as part of the setup did not finish as expected.  Contact your support personnel or package vendor."  I have Windows XP and I need help.

    5, it says, "There is a problem with this Windows Installer package.  A program run as part of the setup did not finish as expected.  Contact your support personnel or package vendor."  I have Windows XP and I need help.

    After reading all these posts, one by one did not resolve my problem until I got the very end.  Regardless of what step would resolve your problem, these are the steps I would recomment to everyone for a what seems to be a safe and fool-proof upgrade to iTunes 10.5.
    1. Stand alone upgrade to the latest Quicktime version
    2. Go to control panel and "change" then select repair to the following applications in the order specified by the post on Oct 27. (Notice I skipped Quicktime because it had been upgrade manually,and Bonjour did not have a "repair" option)
    iTunes; Apple Software Update: Mobile Device Support; Apple Applications Support
    Some of these applications may not appear if they do not apply to your configuration (no iPhone, or no iPad, or other apple devices).
    Once all updated, I did not need to restart nor launch any applications, I simply went straight into the 10.5 upgrade, and where it normally got stuck, this time the installation continued for a while longer until it completed successfully.
    Great work everyone who contributed!  Thank you very much!

  • After running Software update, I can no longer run, open, sync or use iTunes in any way. PLEASE what happened??

    I was running the newest version of Snow Leopard, and after running Software update, I can no longer run, open, sync or use iTunes in any way. PLEASE what happened?
    I really regret that I said "OK" to Software Update message... after Software Update of these updates on 7-26-11:
    Migration Assistant Update for Mac
    Mac OSX 10.6.8 Supplemental Update
    Safari
    iTunes
    Remote Desktop Client Update
    Now I get a message:
    iTunes cannot be opened because of a problem
    Check with developer to make sure iTunes works with this version of Mac OSX. You may need to reinstall the application. Be sure to install any available updates for the application and Mac OSX.
    Process:         iTunes [5092]
    Path:            /Applications/iTunes.app/Contents/MacOS/iTunes
    Identifier:      com.apple.iTunes
    Version:         ??? (???)
    Build Info:      iTunes-10315501~1
    Code Type:       X86 (Native)
    Parent Process:  launchd [111]
    Date/Time:       2011-07-26 12:08:18.568 -0500
    OS Version:      Mac OS X 10.6.8 (10K540)
    Report Version:  6
    Interval Since Last Report:          504736 sec
    Crashes Since Last Report:           20
    Per-App Crashes Since Last Report:   13
    Anonymous UUID:                      B8B5EE28-970A-4E79-949B-EA2DD6E6DAA2
    Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Crashed Thread:  0
    Dyld Error Message:
      Library not loaded: @loader_path/libgnsdk_musicid.1.8.2.dylib
      Referenced from: /Applications/iTunes.app/Contents/MacOS/iTunes
      Reason: image not found
    Binary Images:
    0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448> /usr/lib/dyld
    Model: Macmini3,1, BootROM MM31.00AD.B00, 2 processors, Intel Core 2 Duo, 2.26 GHz, 2 GB, SMC 1.35f1
    Graphics: NVIDIA GeForce 9400, NVIDIA GeForce 9400, PCI, 256 MB
    Memory Module: global_name
    AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x90), Broadcom BCM43xx 1.0 (5.10.131.42.4)
    Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial ports
    Network Service: Ethernet, Ethernet, en0
    Serial ATA Device: Hitachi HTS543216L9SA02, 149.05 GB
    Serial ATA Device: OPTIARC DVD RW AD-5680H
    USB Device: External HDD, 0x1058  (Western Digital Technologies, Inc.), 0x0704, 0x24100000 / 2
    USB Device: Hub, 0x0424  (SMSC), 0x2507, 0x26400000 / 2
    USB Device: iMic USB audio system, 0x077d, 0x07af, 0x26440000 / 4
    USB Device: Hub, 0x0424  (SMSC), 0x2502, 0x26470000 / 3
    USB Device: Deskjet D4300 series, 0x03f0  (Hewlett Packard), 0x1f04, 0x26471000 / 5
    USB Device: GD-0608-U, 0x056a  (WACOM Co., Ltd.), 0x0021, 0x04700000 / 4
    USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x04500000 / 3
    USB Device: Hub in Apple Pro Keyboard, 0x05ac  (Apple Inc.), 0x1003, 0x04300000 / 2
    USB Device: Apple Optical USB Mouse, 0x05ac  (Apple Inc.), 0x0307, 0x04310000 / 6
    USB Device: Apple Pro Keyboard, 0x05ac  (Apple Inc.), 0x020b, 0x04330000 / 5
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0x06100000 / 2
    USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8216, 0x06110000 / 5
    FireWire Device: unknown_device, Unknown
    FireWire Device: d2 DVDRW FW, LaCie, Up to 400 Mb/sec

    Same thing happened to me and I get the same error message. These are the programs that don't work
    mail
    keynote
    pages
    all Office 2011 programs
    safari

  • I keep geting this message when trying to udate to Itunes 10.5.1 "There is a problem with the Windows Installer package. A program run as part odf the setup did not finish as expected . Contact your support prersonel or package vender"

    I keep getting this message when trying to upgrade to Itunes 10.5.1
    Driving me nuts trying to upgrade. What can I do to correct this?
    "There is a problem with the Windows Installer package.
    A program run as part odf the setup did not finish as expected .
    Contact your support prersonel or package vender"

    Yes, I had found a similar solution also.  I'm running XP Pro, SP3.  I went Control Panels/ Add-Remove programmes/apple software update/ change/ repair.  Then run the 10.5 exe.
    While the programme updated from version 8 of iTunes, my new iTunes is now a mess.  Not all of my music was in the same folder previously but it all showed up on iTunes.  Now many albums have been left out, some have only a few tracks and some have two copies of some tracks as well as having other tracks missing.  I haven't begun to work on that.

  • I keep getting a message that "There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected." when I try to download iTunes 10.5. So I can't update it. How can it be fixed?

    When I try to download iTunes 10.5, I keep getting the message "There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected." Therefore I can't update my iTunes to the new version. How can I solve this? I don't want to pay for technical support as this seems to be a problem with the iTunes package Apple is providing itself by that message.

    Hello, hartadrian.
    I would recommend attempting to repair the Apple Software Update via the steps below.  Once processed attempt to download, update or install iTunes 11. 
    How to repair Software Update for Windows
    http://support.apple.com/kb/TA24326
    If you are still experiencing the issue, completely remove all components of iTunes in the order specified of the article below.  Once this has been processed, attempt to download and install iTunes 11. 
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    If you experiencing errors when removing components of iTunes, follow the steps in the article below. 
    "The feature you are trying to use is on a network resource that is unavailable" alert when removing Apple software in Windows
    http://support.apple.com/kb/TS3704
    Cheers,
    Jason H. 

  • Program runs in win 7-64 Pro BUT will not run in win 7 home or vista.

    Program runs in win 7-64 Pro BUT will not run in win 7 home or vista.
    I'm testing 32bit software that will run in 7-64 Pro but will not in win 7 home premium or vista.
    The 7-64 Pro machine is NOT running the program in XP mode although is is being run as admin. The 7 home premium and vista beta testers have tried every work around/mode, admin mode, and anti-virus exception. I've run process explorer & WinMerge to evaluate
    the differences between os operations & dlls loaded but am unable to find the OS issue.
    Currently 2-win7-64 machines, 1 vista machine and 1 win 7 machine had no issues with the program as it started up and ran immediately.
    After 3 beta's 30 hours of testing & 50 of my own, I believe I've narrowed the issue down to the win 7 home premium and vista os's.
    Can anyone here suggest other ways to further narrow it down so as to provide functionality on all 3 os's?

    You must provide the exact name and version of the software for anyone to attempt to answer your question.  Primarily the functionality of any software is entirely dependent on what platforms the publisher intended the software to run on.
    If you are the programmer you need to go to the Microsoft Developer Network forums for assistance:
    http://msdn.microsoft.com/en-US/#fbid=Xt631zR1D90.
    This is an End Users' Peer-to-Peer forum that does not address programming from any perspective.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • Yosemite 10.10.2 server app. FTP help. I have a program running in my local server enviroment that wants to FTP to my mac folder. It asks for the server , name, password, port and path. what are they?

    So I have set up a localhost area in my Mac. I have the new server.app and I am running yosemite 10.10.2 .
    I have a program running in my local server enviroment that wants to FTP to my mac .
    It asks for the server , name, password, port and path. what are they?
    I am pretty certain that the Serveris "localhost",
    Name is my macs name (like my-mac-min)
    password is "my login password"
    and they suggest port 21.
    But what is the file path, lets just say my site is set up http://localhost/siteftp and is actually at my Users/Sites/siteftp folder.
    Why cant this program connect to the mac.
    Is it because they are both operating in the same localhost enviroment,
    could it be my folder permissions are not correct on siteftp folder?
    Help please !

    I tried turning the computer off and then back on. The alerts don't show the notice to update as resolved. Hopefully this is not a problem or an indicator or another problem. Should I ignore or reload 10.10.1 from the app store to trigger a resolved check in a green circle?
    Interesting that I had to buy server software after my free Yosemite download. I would have hoped that the two pieces of software would have gone together without any complication. It is not positive to end up buying a problem. Ah well, time to move on.

  • HT1349 Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.

    Hi all,I have just purchased new iphone but have difficulty in completing the itunes download with message : problem with Windows installer package. A program run as part of the setup did not finish as expected.
    Would appreciate help...its driving me up the wall!!

    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.

    Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.
    == This happened ==
    A few times a week
    == Not sure when it statrted

    Hi.
    When this happens, please press CTRL+SHIFT+ESC and see how much RAM and CPU Firefox is using. If they're sky high, then... Well, that kind of issues are, unfortunately, more common and the we'd like. Thankfully, 99% of the cases are very easy to solve. However, you do need to diagnose what your exact problem is. Do this:
    #run Firefox in safe-mode to disable all extensions and plugins. If this fixes your issues, be them with RAM or CPU usage, then you know it's a problem with plugins or extensions. Proceed to number 2. If safe-mode doesn't fix the issues, then read bellow, after this list;
    #update all extensions and plugins in your Firefox. If this doesn't solve the issues, proceed to the following number;
    #disable all extensions and plugins in your Firefox (not running safe-mode). Being certain that, as in safe-mode, the problems you're having have gone away, enable one plugin at a time. You should be certain that you WANT that plugin to be enabled, so keep your overall number of plugins as low as possible. When you encounter the problems, you know you've found a problematic plugin, so disable it for good. Keep enabling all plugins (except problematic ones) until you've gone through them all.
    #enable one extension at a time. Again, be certain that you WANT that extension to be enabled, so keep your overall number of extensions as low as possible. When you encounter the problems, you know you've found a problematic extension, so disable it for good. Keep enabling all your extensions (except problematic ones) until you've gone through them all;
    #you're done! You've fixed your problems with problematic add-ons.
    Ok, if disabling all extensions and plugins through safe-mode didn't work to bring Firefox's CPU and RAM usage to good levels, then you have different issue. The most likely scenario is that you have a third party software running on your computer that is messing with Firefox. Do as follows:
    #do a virus/malware check on your computer. If this doesn't fix it, proceed;
    #disable all software running in the background that you don't want to have running in the background (in windows, this is done by pressing WINDOWS+R in your keyboard, typing "msconfig" (without the commas) and pressing enter. Now, under the "Startup" tab, you can uncheck the software you don't want, and reboot your system for changes to take effect. If you're unsure of what software you want running, ask someone with more experience). If this doesn't fix you issues with Firefox, proceed;
    #check your firewall/antivirus/security suite for enabled functions/features that you don't want and/or may be conflicting with Firefox. You'll find that these features are most likely tied to Internet Security features, such as link scanners or URL checkers and the like. If you're not sure they are conflicting with Firefox, simply try to disable to see whether or not that's true. As long as you don't browse the web with your antivirus completely off and your firewall completely turned off, there should be no problems. If this doesn't solve the issues, proceed to the following number;
    #check your operating system security options, mainly advanced options that are not configured by default. While it's very unlikely that this may be the cause of the problem (after all, it's the last item on the list), it's remotely possible. If this doesn't do it, I'm out of ideas. Except make sure you've followed my instructions correctly.

Maybe you are looking for

  • EDIDC40

    Hi I have a doubt about mapping. Why do we disable EDIDC 40 field when Idoc is receiver ? Do we do that always ? And when we disable it do we have to check the option " Apply control record values from payload " In the IDoc receiver communication cha

  • Unable to pass parameter to EBS Form from external system (OBIEE)

    I set up the OBIEE to EBS Navigation as per a metalink note to the form PA_PAXTRAPE_SINGLE_PROJECT. I tried to pass a PROJECT_ID parameter. The form opens up but I do not see any indication of the parameter being passed through. In general, when you

  • Save Scenario Script not Working

    Hi Gurus, I have a quick doubt here. Need help on it ASAP. Its been a while since I started with the bookmark functionality. This is the Error I am getting. Multiple markers at this line - Couldn't resolve reference to Member 'saveBookmark'. - missin

  • Pivot Table - Rows displayed

    Hi, I have a pivot table report which display complete report instead of showing 25 rows first. Due to large number of rows we are getting Out of memory issue. Is it possible to display 25 rows first in Pivot table. Please help - as users are unable

  • Bring back the 12 month devise installment plan.

    You need to bring back the 12 month devise installment plan. I am grandfathered into the unlimited data plan and do not want to give it up, so the edge plan is out of the question. I cannot afford to pay full price for a phone and accessories. the in