How can I start any application with buttons

Hello, I want to start any kind of applications with Buttons. I want to make me a GUI with buttons and with one button I want to start Outlook, but I dont know how this will work!
THX for your help

Runtime class exec methods
If your Outlook executable is in different path ... import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Test2 extends JFrame implements ActionListener
   public Test2()
      super("Test");
      setDefaultCloseOperation(EXIT_ON_CLOSE);
      setSize(300, 200);
      JButton b = new JButton("Outlook Express");
      b.addActionListener(this);
      getContentPane().setLayout(new FlowLayout());
      getContentPane().add(b);
   public void actionPerformed(ActionEvent e)
      try{
         Runtime runTime = Runtime.getRuntime();
         Process proc = runTime.exec
                     ("C:\\Program Files\\Outlook Express\\msimn.exe");
         proc.waitFor();
      }catch(IOException ioe){System.out.println("Wham");}
      catch(InterruptedException ie){System.out.println("Bop");}
   public static void main(String[] args)
      new Test2().setVisible(true);
}

Similar Messages

  • "Quit LV" creates exception - How can i exit created application with button-click?

    Hello,
    i added a small vi-popup at beginning of my program where user can select between 3 buttons. The fourth button is Exit that should exit the application.
    For this i added the "Quit Labview" = True.
    It works fine in developer-mode but when i run it in the application exe-file this creates the following exception:
    Why is this not working in a application?
    Is there a better thing to quit the program?
    Thx

    The problem is that this is sub-vi Nr 2 of 10 that are all connected in a row with the error in/out.
    That means i would have to put the other 8 sub-vis inside a case-structure and give the "close"-vi an output to feed the case.
    It is simpler to just kill the whole LV.
    #Date: Di, 9. Sep 2014 19:08:43
    #OSName: Windows 7 Ultimate Service Pack 1
    #OSVers: 6.1
    #OSBuild: 7601
    #AppName: XXXXX
    #Version: 13.0.1 32-bit
    #AppKind: AppLib
    #AppModDate: 09/09/2014 16:53 GMT
    #LabVIEW Base Address: 0x30000000
    starting LabVIEW Execution System 2 Thread 0 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
    starting LabVIEW Execution System 2 Thread 1 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
    starting LabVIEW Execution System 2 Thread 2 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
    starting LabVIEW Execution System 2 Thread 3 , capacity: 24 at [3493127323,39019060, (19:08:43,390190602 2014:09:09)]
    <DEBUG_OUTPUT>
    09.09.2014 19:08:44.496
    Crash 0x00000000: Crash caught by NIER
    File Unknown(0) : Crash 0x00000000: Crash caught by NIER
    minidump id: 02df131c-8b0b-4227-860a-d1f27df161c8
    ExceptionCode: 0xC0000005
    </DEBUG_OUTPUT>
    0x30761D96 - lvrt <unknown> + 0
    0x3076211C - lvrt <unknown> + 0
    0x7C37FDB4 - MSVCR71 <unknown> + 0
    0x75A40303 - kernel32 <unknown> + 0
    0x77E174FF - ntdll <unknown> + 0
    0x77DD9F45 - ntdll <unknown> + 0
    0x00000000 - <unknown> <unknown> + 0

  • My hard drive died.  How can I start my computer with my Time Machine external drive?

    My hard drive died.  How can I start my computer with my Time Machine external drive?

    Pondini wrote:
    If you're on 10.7.2, yes, you can boot from the TM drive.
    Beep, beep, beep....
    Hold ON! Getting a call on the red phone.
    "Yes...yes.... ok!"
    It's confirmed, H.e.l.l. has finally frozen over!  TM drives are now bootable!
    Still it's not a real bootable clone, can't run the computer off the external drive for long in only Recovery mode, still requires the boot drive to be replaced if it not functional, and with TM backing up every hour, isn't going to offer much software protection as the TM drive is just as likely to be as messed up as the internal boot drive.
    For a iMac it still requires the computer to be taken in to Apple for a drive replacement, as ONLY Apple can do it due to proprietary connections and firmware on the iMac hard drives.
    But it is bootable!
    The backup time factor can be controlled using TimeMachine Editor, from every hour to just when the user thinks it's necessary.
    Apple lurches slightly forward!  Hurray!
    Question is, can one restore from earlier stable TM's or just the last one? In this bootable fashion?

  • How can I start my application?

    hello, sorry for my English, it's not very good....
    I have to program a web (with Database) for a private school where
    administrator, teachers and pupils enter login and password
    and in function of this information, they will be shown
    some menu options or others.
    For example, Administrator will be able to work with all the menus,
    Teachers will be able to work with "Lessons" and "Exercises" menus,
    and Pupils will only be able to work with "Exercises" menus.
    How can I start? Servlets? JSPs? Should I use Hibernate or Entity Beans??
    Ohhhhhhh, my God! I'm so lost !
    Thanks

    hello, sorry for my English, it's not very good....
    I have to program a web (with Database) for a private
    school where
    administrator, teachers and pupils enter login and
    password
    and in function of this information, they will be
    shown
    some menu options or others.
    For example, Administrator will be able to work with
    all the menus,
    Teachers will be able to work with "Lessons" and
    "Exercises" menus,
    and Pupils will only be able to work with "Exercises"
    menus.
    How can I start? Servlets? JSPs? Should I use
    Hibernate or Entity Beans??
    Ohhhhhhh, my God! I'm so lost !
    ThanksStay away from entity beans in particular and EJBs in general. You can do this without that complication.
    Write your user interface pages as JSPs.
    Unless you know Hibernate already, I'd recommend writing straight JDBC code to access the database. Put this in POJOs (Plain Old Java Objects) that you can test off-line.
    Write one servlet that all the JSPs talk to. Have it figure out which page made the request, perform the appropriate action, and forward back the response JSP.
    I'd strongly recommend that you learn JSTL and keep all scriptlet code and business logic out of your JSPs. Get a copy of Hans Bergsten's JSP book by O'Reilly.
    Good luck. Tough problem to start with.

  • How can we close the application with the new ios7 ?

    how can I shut down app on my Iphone 5 with the new ios7 ??

    Double tap the home button to reveal the recently used tray, then swipe upwards on the App preview (not the App Icon). Tap the home button again to return to normal screen.

  • How can I download any file with this browser?

    I can't download any mp3 or mp4 file with the browser. When I click on the download box,then the browser started to load a page.. And after some time,it became stopped..

    Firefox for Android added the ability to save HTML5 video/audio playback in Firefox 21. Long tapping on a media file while it is playing will give you a save option. It can be found as Firefox Beta in the Play Store. In about 4 weeks it the change will be available on the release version of Firefox for Android.

  • How can I install any application from the web as I can`t do so now?

    can I download and install any web application with Adobe download assistant?
    such as download accelerator plus or any other download manager.

    What has this to do with Adobe? You're looking in the wrong place. Browser plug-ins/ extensions are handled by the respective routines in the browsers themselves...
    Mylenium

  • HOW CAN I START ALL OVER WITH iCHAT???

    this is my 1st macbook. it is a refurbished laptop. it has snow leopard. i tried to set up an ichat account but it didnt complete the process. can i just start all over again??? with a new name, password, everything??? (for ichat)? i cant remember the name or password i used. help!

    Hi,
    iChat 6 in Lion adds the ability to use Yahoo accounts in addition to AIM (valid) names and Jabber IDs and you have not told which you are adding.
    The error message does sounds bit like the AIM one.
    iChat (And the Messages app in Mountain Lion) can use Apple IDs that end in @mac.com and @me.com
    However you must keep the passwords to 16 characters or below as this is the AIM server limit.
    8:49 PM      Sunday; November 4, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How can I use internal frames with buttons to call others internal frames?

    Hello.
    I'm building a MDI-application using JFrames and several JInternalFrames, but I have problems.
    A JFrame has JMenuBar with JMenu and JMenuItem. One of these, call the first JInternal that has its interface. In this interface has a button that call other type (a class extension of JInternalFrame) JInternalFrame.
    When I clicked button happen a exception (java.lang.NullPointer).
    What happening?
    Help me, please.

    What i usually do is to give my desktop to my internal frames. So within the internalframe, you can use your desktop and add other internal frames to it.
    The code should look something like the following.
    desktop = your JDesktopPane
    MyInternalFrame = an InternalFrame
    AnotherMyInternalFrame = another InternalFrame
    public class MyInternalFrame extends JInternalFrame implements ActionListener
      private JButton jb = new JButton("Launch");
      private JLayeredPane desktop = null;
      public MyInternalFrame(JLayeredPane desktop)
        this.desktop = desktop;
        getContentPane().add(jb);
        jb.addActionListener(this);
      public void actionPerformed(ActionEvent ae)
        if (ae.getSource() == jb)
          desktop.add(new AnotherMyInternalFrame(desktop),JLayeredPane.DEFAULT_LAYER);
    }

  • How can I make a menu with button's that fade-in?

    I've built a motion menu in AE, and had added text layers/buttons that fade-in through layer>Encore>Create Button. Once I import this into Encore through dynamic link I cannot link the buttons to the motion menu.  I've added a sample.
    Basically all I want is the play feature, Scene selection ,and credits to be selectable after they finish fading in @ the :20 mark. I don't want the menu to loop either.
    I've tried to make a static menu(from last frame in AE) play after this, but, there is a one second gap or so before that static menu plays which just looks tacky. I have tried this in preview, and rendered it to a dvd with the same result.
    All the tutorials i've come across really don't answer this question either.  
    Any help would be appreciated.
    Thanks

    I believe that Jon Geddes has a TUTORIAL, that might also be useful to you.
    Sounds like you and Stanley have it worked out, but you might pick up an additional idea, or two.
    Good luck,
    Hunt

  • How can i start my apache with ORACLE9.2?

    I have installed Oracle9.2 php4.3.4 and apache(Ver2.0.48);now i want my apache2 to use oracle,but have an error:Unknown():Unable to load dynamic library 'd:\PHP\extension\php_oci8.dll'-ÕÒ²»µ½Ö¸¶¨µÄÄ£¿é¡£I have insted Oracle PHP and Apache in d:driver.

    Looks like your php.ini is out of date. In PHP5 the extension DLLs
    are in php\ext instead of php\extensions. Edit the extensions_dir
    directive in php.ini.
    -- CJ

  • How to start a application with a login window?

    hi there
    does anyone have any idea on how to start an application with a login window? a login window is the first frame or window to be displayed when an application starts running. and only correct login id and password have been entered the real application will start. any sample out there? thank you.

    You can start a new thread by making a thread object and passing it an implementation of a runnable object. Runnable has just one method, public void run(), this is was gets executed in a second thread. perhaps the code you would use would look something like this.
    <code>
    // set up thread for login window
    new Thread(new Runnable() {
    public void run() {
    // construct your login window here
    // when you are done processing the
    // password....
    if(goodPassword) {
    authorized = true; // a global variable
    notifyAll(); // don't forget this
    else {
    System.exit(42);
    }).start();
    // control does not stop this code gets executed while
    // the above thread is running.
    // Set up main program here. This is done in the
    // backround.
    while(!authorized) {
    synchronized(this)
    { wait(50); }
    // now when the user logs in this frame pops
    // up real quick.
    myFrame.setVisible(true);
    </code>
    Hope you can figure it out.. good luck :)

  • How can I start anew with Photos and clear the (minimal) stuff it has uploaded

    I've about had it up to here with this new Photos scheme. I reorganised my Aperture libraries on both my iMac and MBA in preparation for this, delayed turning Photos on for a couple of days until I thought everything was ready based upon the limited advice that was out there, and then got stuck in an endless loop of "uploading" and "preparing" every time I opened Photos. There are 19,975 images in my Aperture library on the iMac. I was stuck at Uploading at anywhere between that number and 19,000 with no progress after hours of waiting. I tried all the tricks mentioned here including re booting, restarting the app, repairing/rebuilding the database, killing the "cloudd" process, etc.today Today when I restarted Photos, it now said I had 23,775 images to upload- 4000
    more than I have-and of course it got stuck there, like it has for the last week.
    I copied the previous Aperture library (pre Photos migration)back to my iMac and opened it in Aperture. Thankfully, all the photos I had taken on my iPhone this week during this Photos clusterphuck transition were in the Aperture Stream so I didn't lose any of those. I'm willing to give this whole thing one more shot. So  i need some advice. How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    <Re-Titled By Host>

    How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    It is hard to say from your post, why the migration did not succeed in your case.
    by "stuck on upload" do you mean, you opened the Aperture library in Photos, and Photos converted it to a Photo Library, and then the upload to iCloud Photo Library did hang?  Or did already the upgrade to the Photo Library fail?
    If you want the Aperture library to upload to iCloud Photo Library, it needs to be on a disk formatted MacOS Extended (Journaled) and the original image files must not be referenced. Referenced originals will not upload.
    Also, the upload may hang, if you do not have enough free iCloud storage, orr if one of the videos or photos in your library is in an unsupported format or corrupted.
    To start over, try to repair and rebuild the Aperture library before opening it in Photos. Try all Aperture Library First Aid options - starting with repairing the permissions.  (Repairing and Rebuilding Your Aperture Library: Aperture 3 User Manual)
    If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
    You will have to delete the photos that are already in icloud too; otherwise you are risking duplicates.
    Can you launch Photos at all?  If yes, delete all photos in Photos and empty the Recently Deleted album. Wait for the deletion to sync to iCloud. Then delete the Photos.photolibrary.

  • How can I use the NI PXI-6508 with Lab View 7? what are the first steps to get started??How can I use the channels with lab view 7????

    I have a 8 slot PXI system with 2 NI PXI 6508 and 1 DMM 4070 in it. I want to get started with programming the digital I/O cards (6508)! How can I use this cards with LabView 7?what is the best way to get started, or where can I get examples showing how to use the several channels?
    Thanks!
    Philipp

    Philipp,
    The best way to get started is to decide if you want to use traditional NI-DAQ or NI-DAQmx. Recently we released NI-DAQ 7.1 which provides NI-DAQmx support for the PXI-6508. In my opinion, NI-DAQmx is more efficient and much easier to use.
    To get started with examples, simply launch LabVIEW and go to Help>>Find Examples. Then expand Hardware Input and Output>>DAQmx and select the appropriate digital group for your application. This should help get you started.
    Please repost if you need addition assistance. Good luck with your application!

  • How can I allow the application to line through a field that has been locked after being digitally signed?  We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    You can control which fields are locked down after signing by setting up a collection. Then those that are not locked can be changed after signing. If this is not possible, then the line outs must occur prior to signing.

Maybe you are looking for

  • Adding new field to CIC

    OK, I've added a new field to attribute of the view BupaSearch.htm.  I enter a value and it looks like my SET routine saves it, but my GET routine that is executed in BupaCreate.htm(also contains the field in the attribute) doesn't pull my value. In

  • How to open a "published folder"?

    I've just upgraded to 08, I've created a site for work so am not using my .mac account. I published to a folder on my desktop,no problem, uploaded to the web no problem. It all works, EXCEPT. when I restarted iweb it asked me for a domain name as as

  • How can I limite some sales order Not upload to ECC

    Hi expert, I dont want some tpes sales order upload from CRM to ECC, but I want it to BW.      In my member, there is one note to get it, which mentioned to do some change in the tcode SMOEAC. Any body can give me the notes ID or tell me how to ..? B

  • How to change "No Password required" for Guest to "Yes"account under Somarsoft Dumpsec

    Check Content: Verify all accounts require passwords. Run the DUMPSEC utility. Select "Dump Users as Table" from the "Report" menu. Select the following fields, and click "Add" for each entry: UserName SID PswdRequired AcctDisabled Groups If any acco

  • My iphone dont show image artist

    hi please help me my iphone model 5s is dont show arist image in music player serial number : F1*****F9R IMEI/MEID : ***** Update : IOS 7.1.2 <EDITED by HOST>