+ Reply to Thread
Results 1 to 3 of 3

Thread: Open a NotePad in Java.

  1. #1
    satheesh's Avatar
    satheesh is offline x10 Elder satheesh is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Tamil Nadu,India
    Posts
    883

    Smile Open a NotePad in Java.

    Code:

    Code:
    class Notepad{
        public static void main(String arg[]){
            Runtime r=Runtime.getRuntime();
            Process p=null;
            
            try
            {
                p=r.exec("notepad");
                p.waitFor();
            }
            catch(Exception e)
            {
                System.out.print("Fail to Open Notepad Opened");
            }
            System.out.print("Notepad Closed"+p.exitValue());
        }
        
    }
    Save as "Notepad.java" and Compile and Run it.

    Good Luck.
    I want to buy Some Scripts So Please Click This link:http://affiliate.tufat.com/index.php?id=4384
    Please rate my site:Click here




  2. #2
    brianfast is offline x10Hosting Member brianfast is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    19

    Re: Open a NotePad in Java.

    Very nice code snippet. However its not a tutorial and it lacks a lot of features people would like.

  3. #3
    Thewinator is offline x10 Lieutenant Thewinator is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    [NL]
    Posts
    256

    Re: Open a NotePad in Java.

    Indeed, for instance. Defining a file to open in notepad would be a good addition.



+ Reply to Thread

Similar Threads

  1. 300 short cuts of Windows XP
    By goodone in forum Computers & Technology
    Replies: 34
    Last Post: 11-29-2011, 12:12 AM
  2. Java
    By Rhianna in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 03-07-2009, 06:22 PM
  3. Staff Required for Open Support.
    By disturbedart in forum Scripts & 3rd Party Apps
    Replies: 16
    Last Post: 05-14-2008, 09:34 AM
  4. Java Tutorial for Beginners.
    By satheesh in forum Tutorials
    Replies: 0
    Last Post: 10-27-2007, 06:40 PM
  5. Microsoft learns to live with open source
    By n4tec in forum Off Topic
    Replies: 3
    Last Post: 07-12-2005, 10:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers