Thread: Open Jar from button

Results 1 to 2 of 2
  1. #1 Open Jar from button 
    Registered Member Ishana's Avatar
    Join Date
    Oct 2008
    Age
    31
    Posts
    285
    Thanks given
    3
    Thanks received
    0
    Rep Power
    50
    hey guys i have a gui that have few stuff and connects to runescape main page but when i try to open a jar file it keeps giving me error
    Code:
    						if (cmd.equalsIgnoreCase("Music")) {
                String Path = "Music_Player.Jar";
                	try {
                     		String[] b = {Path};
                     		Runtime.getRuntime().exec(b);
                		 }
                 		catch (Exception exc) {
              		exc.printStackTrace();
                 		}
    	}
    errors in run when i try to run it!

    Code:
    java.io.IOException: Cannot run program "Music Player.jar": CreateProcess error=
    193, %1 is not a valid Win32 application
            at java.lang.ProcessBuilder.start(Unknown Source)
            at java.lang.Runtime.exec(Unknown Source)
            at java.lang.Runtime.exec(Unknown Source)
            at Gui.actionPerformed(Gui.java:154)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.AbstractButton.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
    Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32
     application
            at java.lang.ProcessImpl.create(Native Method)
            at java.lang.ProcessImpl.<init>(Unknown Source)
            at java.lang.ProcessImpl.start(Unknown Source)
            ... 30 more
    Reply With Quote  
     

  2. #2  
    is serisiuly cul.

    DJ Dan's Avatar
    Join Date
    Apr 2007
    Posts
    1,324
    Thanks given
    6
    Thanks received
    5
    Rep Power
    223
    Cannot run program "Music Player.jar": CreateProcess error=
    193, %1 is not a valid Win32 application

    Read the error.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •