How to open another application from a java programme

How can I open some other application like "Textpad"
from a java programme.
Actually I want to open a particular java file in Textpad editor from my java programme.
How Can I do that?
Thanks

Thanks for the code,
I tried that but got this error
java.io.IOException: CreateProcess: C://ProgramFiles/TextPad4/TextPad.exe D://Pi
yush/BeanCreator/Parts.java error=3
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:64)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:272)
at java.lang.Runtime.exec(Runtime.java:195)
at java.lang.Runtime.exec(Runtime.java:152)
at pack.CreateBean.CreateFile(CreateBean.java:327)
Any idea!! What that means

Similar Messages

  • How to open JSP session from a java application or an applet?

    Hi,
    My problem is a bit challenging (at least for me) and its not about JSP but it is about a web application..
    I couldnt find a better place to post this question I am sorry if this is not the right place to post it..
    I need to enable users log into my website by checking username and password and reading and checking the data from a usb device located in client computer.
    I can read from the device thorough JNI using the third party DLL file for the device... I have no problem with that..
    Since I need to make native calls I am planning to develop a java application so I let the users open the application using web start.. Once my application is running on client side after reading the device and getting login password information (assuming login information correct), How can I open a web session for the that spesific user and a web browser and let the user browse the web site on his/her own session?
    I would appreciate any guidance..
    Thanks..

    add the values in the header using...
    response.addHeader("userNmae","XXXX");use it in all ur pages like say..
    if(!request.getHeader("userName")!=null && request.getParameter("userName").equlas(""))
    String username=request.getParameter("userName");
    }

  • How to execute another application from java ?

    I want to execute another application ( not java ) from my java application. Is it possible ? How can we do it ? Please guide me...
    thanx

    Hi littlestuart,
    Yes it's possible.
    Your question is frequently asked, please search the forum or google for an answer.
    /Kaj

  • Calling another application from a java program

    Hi, Java ppl.
    I wanted to know how can I call another program say a help application or an exe from a java program. anyone with any advice or a piece of code would help.
    Thanks
    Pradeep

    I had the same situation and I tried the code that you sugested and it works. I was wondering, what am I expecting in the while loop that appears after the int inp; statement? Is some data going to be displayed on the screen? How essential is to have that while loop after the calling the exec() method?
    Sorry for the amount of questions, I never tried this before.
    Best regards,
    Luis E.

  • Opening another application from within Labview

    Hi,
    can anyone tell me how to open in Labview another application program. Is ActiveX the way to go here, but how do I know which ActiveX object to choose?
    Rob

    If you application is an exe you can use the sys exec function in labview. This will allow you to utilize the command prompt in LV. If you application is a DLL you can use the call library function. This will allow you to pass data in and out of the DLL using the correct function prototype. The sys exec is under the communication palette. Hope this helps. ActiveX is more for control external applications such as word or exec.
    BJD1613
    Lead Test Tools Development Engineer
    Philips Respironics
    Certified LV Architect / Instructor

  • How to Open another WEBI from one WEBI by clicking a data point on the first tab?

    Hello Guys,
    I have a requirement in which user wants to open another tab by clicking a data point on one tab.
    So, lets say we have a table in one Webi and its has following fields:-
    Customer : Sales DOC: Month : Year : Qty : Amt
    User wants, that if they click on Customer, it should open another webi which should show them a chart reflecting the data about that customer only.
    How can I do that?
    Regards
    Prashant

    Hi,
    Check Below links about Hyperlink details
    http://scn.sap.com/docs/DOC-21161
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0daee1d-0e38-2d10-0c91-8bb4ab5aa266?quicklink=index&overridelayout=true
    Regards,
    Anish

  • How to open browser window from standalone Java Application???

    Is it possible to start Internet Explorer from non-applet application?

    Something like that could maybe help:
    Runtime.getRuntime.exec("iexplore http://www.google.com");
    but it's not platform independent + I couldn't let it work in that way. It only worked with Runtime.getRuntime.exec("c:\\windows\\....\\iexplore.exe http://www.google.com");
    But it's surely not platform independent.
    So the answer is in fact 'I don't know'.
    And if you ask why am I writing all that then, the answer is 'I don't know' too.
    And if you ask why...

  • How do I keep applications from automatically opening when I power up my Macbook Air?

    How do I keep applications from automatically opening when I power up my Macbook Air?

    When you Shutdown or restart, uncheck this option.
    Regards,
    Captfred

  • HT1495 How can transfer a application from one iphone to another iphone?

    How can transfer a application from one iphone to another iphone?

    Follow the instructions here or here; using the first set of instructions then requires syncing the second device with the iTunes library containing it.
    (89299)

  • How to launch an application from java?

    Hi,
    Would anybody please help me this. I need to launch a new desktop application from my java app but I don't know how. For example, when user clicks on a "Edit" button from my java app, my app needs to launch NOTEPAD.EXE to allow user starts editing.
    Thanks a lot.
    Hung.

    try something like this for your button's action method:
            String[] cmd = {"notepad"};
    Runtime rt = Runtime.getRuntime();
            try {
                Process pro = rt.exec(cmd);
                pro.waitFor();  // wait until it's done executing
                System.out.println("Process exit code is: " + pro.exitValue());
            }catch(IOException ioe) {
                System.err.println("IOException -> " + ioe);
            } catch(InterruptedException ie){
                System.err.println("InterruptedException: " + ie);
            }

  • Opening a document from a Java app

    I need to open a document from my Java app. It is a .rtf file and I would like it to open with the system associated application for rtf files. How should I do that?
    I have tried to figure out the Runtime.exec(), but it doesn't do what I need. I have been able to open Notepad or WordPad (oh, yes, I am on a Win XT system) by specifying them in the exec function, but I can't find info on how to let the system choose the program.
    Thanks for your help.
    Wayne

    Take a look at the JDIC project
    https://jdic.dev.java.net/
    In particular the org.jdesktop.jdic.filetypes.AssociationService class
    https://jdic.dev.java.net/nonav/documentation/javadoc/0.9/index.html

  • What is the easiest way to open an application from Labview?

    I need to open an application from labview and depending on a user's selection, load one out of a group of files for the application that is opened. I need to know what is the best or easiest way to open an application and load a file that is used by the application based on a selection.

    Here is the response that I got from Cognex when I asked them about how to do this. Do you understand what they are talking about?
    In order to do something like this you will probably want to look into the Display Control/SDK for In-Sight. The Display Control gets installed along with In-Sight Explorer and includes a control that can be used in an environment like Labview to communicate with In-Sight sensors while the SDK is an enhanced version of the Display Control that gives you more control and functionality. I am not very familiar with the Labview environment so I will give some code snippets in VB.Net and hopefully you can adjust them as necessary. Specifically I see 3 possible avenues to do this:
     1) Using the Display Control you have access to many of the dialog boxes that are used in In-Sight Explorer including the Load Job dialog box. You can spawn this dialog box through a line of code similar to cvsInSightDisplay1.Edit.OpenJob.Execute(). I am not certain if the Labview environment will be able to spawn and display this dialog though. 2) With the addition of the SDK (additional purchase) you can directly access sensor properties including the job. There is a method called LoadJobFile to load jobs from on the sensor and LoadJobFileLocally to load jobs from the host machine. A typical line of code might be cvsInSightDisplay1.InSight.File.LoadJobFile("myjob1.job").3) If Labview cannot handle the dialogs and the SDK is not an option for you then you may still be able to do this using Native Mode commands. Native Mode commands are sent through a socket on the telnet port (typically port 23). Keep in mind that you will need to handle the username/password prompt and response when you first open the socket before issuing any Native Mode commands. The command to load a job file from the sensor would be the Load File command which would be a string similar to "LF myjob1.job". The Native Mode commands are documented in the In-Sight Explorer help file. 

  • How to open web pages from japplet??

    Hi
    Does anybody know how to open web pages from java japplet??
    Any help is apreciated!
    zick

    the getAppletContext() method of the Applet class will get you an AppletContext, with which you can call the ShowDocument(URL url) or ShowDocument(URL url, String target) method...
    check it out at http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
    have a good one :)
    Jay

  • How to install .exe applications and the java on m...

    hi ! sorry if this has already been discussed but i wanted to know ~~~ how to install .exe applications and the java on my n9 ~~~ ... because i wanted to use plenty of other apps which are not supported  but these 2 would help fix the issue

    Is it stil not possible to install java applications on N9?
    Files containing JAD and JAR-ending in the file name.
    I am not familiar with Nokia N9 so I ask even if I suppose that JAR and JAD files are not able to install on a Nokia N9.
    Nokia 808 again (delight Belle), Nokia E7 and X7 ( again, all on Delight Belle...after some time on Nokia Lumia 925 (retired), 1020 (not that great)and Lumia 820 (Replaced my router at home, great for internet sharing).., N9 The best device ever (use it as much as Lumia 1020), Nokia 700 (Sport Phone/My Love :-) ) Nokia 701, Nokia E6 (Should have a follow-up from Nokia among with larger screen, NFC, Autofocus), Lumia 800 (Retired After 6 weeks), -Sports Tracker-Nokia Internet Radio-Handy Safe-Skype-Bambuser-Screenshot app pro-fMobi-ComingNext-Manual TaskSwitcher-jagiTimer-Easy StopWatch-Boldbeast-Equalizer-Financial Calculator-WiMP Music-YTasks-Davi-Thumbnail Folders-BizCalendar-Tiny7-Situations-nn reeder-Sport Timer-CameraLover-CameraPro-GrabRadio-LiveScore-Poddi-Gravity-SkyFilesPro

  • How do I stop applications from coming up when I power up my computer. If this were a Windows system I would be able to take the app out of the start up folder. On the Mac I don't know how.

    How do I stop applications from coming up when I power up my computer. If this were a Windows system I would be able to take the app out of the start up folder. On the Mac I don't know how.

    The app (Excel) is in the dock. When I left click on it there is no check next to open at login.
    Lets go back to the beginning when I installed ms office both word and excel were in the dock. then one day excel dissapeared. I put it back in the dock and that is when it started opening during login. There is only one X showing in the dock.
    Maybe I have little gremlins.

Maybe you are looking for

  • Create object and link to database in acrobat

    i am using visual studio and creating a C# application in .net. i am looking to allow users to open a pdf document and then use a custome symbols library to trace out objects on the pdf. the object i would like to attach to a database to extract the

  • My movie swf file in another swf

    I cant get the movie I have loaded in ( a quiz ) to display the statistics about how many I have got wrong/right. is it possible to get it to show the data because it is the main part of the movie after the user has completed it. PM me and I will e-m

  • Variable For Query Key Date

    Hi All, I am using time dependent master data, i want to count number of employees on particular key date for diffferent Orgunits. So i created variable in the query properties for dynamic date selection .I also have other variable - Calendar month.

  • Problem in deleting Invoice

    Hello gurus, While trying to delete an invoice i am getting the error Incoming invoice is not allowed (ORD **************) how can i solve it.?

  • How to load workflow data

    how to load workflow(POAPPRV.wft,QAPPRV.wft) data 11i apps