Home Answers Viewqa Java-Beginners Opening Notepad

 
 


Vaishnavi Vishwanath
Opening Notepad
2 Answer(s)      a year and 4 months ago
Posted in : Java Beginners

Sir/madam

I want to open notepad from java applications and save the contents on it. Can someone please help me to do this.

With Regards Vaishnavi Vishwanath

View Answers

January 25, 2012 at 12:33 PM


To open the notepad, just go through the following code segment:

public static void main(String[] args) {
        String fileName = "c:\\test.txt";
        String[] commands = {"cmd", "/c", fileName};
        Runtime.getRuntime().exec(commands);
    }

January 25, 2012 at 12:39 PM










Related Pages:
Opening Notepad
Opening Notepad  Sir/madam I want to open notepad from java... this. With Regards Vaishnavi Vishwanath   To open the notepad, just go through... Notepad
notepad
notepad  i want java code for notepad
Expression Language execution in notepad
Expression Language execution in notepad  how to execute expression language in notepad for java i am using apache tomcat server4.0.
NotePad - Swing AWT
NotePad  //CODE FOR NOTEPAD /* * To change this template, choose Tools | Templates * and open the template in the editor. */ //Author GAURAV BHANDARI import java.io.IOException; import java.util.logging.Level
Create your own Notepad in Java
Create your own Notepad in Java           You must have worked with Notepad to write programs. Now its turn to create notepad by own with the help of java language
If I open .class file with notepad what is displayed?
If I open .class file with notepad what is displayed?   What is displayed when we open java .class files with notepad
datetime picker is not opening
datetime picker is not opening  Hi I have a java servlet code in this date time picker is not opening. The same opens in JSP code. My code is: **function.js** <script language="javascript" type="text/javascript" src
"opening video data error" in j2me
"opening video data error" in j2me  Any one know about the error c When i am trying to play video on spice device its throw an exception, but the same code work on other devices very well please tell me the issue behind
Opening files with .jnlp extension on browser!?!?!
Opening files with .jnlp extension on browser!?!?!  I working on UEngine, where to switch into the design phase it creates a PorcessDesigner.jnlp file which gets downloaded on client's side on runtime. I searched into the code
Opening a URL from an Applet
Opening a URL from an Applet       Introduction This is the example of opening a url in same... used for opening url from an applet. This program is using two functions in which
opening new window - Java Beginners
opening new window  Hi All, I have two classes with me , lets say A and B.when I press a button in class A , the class B should open in a new window.i.e., I want to know, how a new window(B) can be opened by clicking a button
Error Opening File - Java Interview Questions
Error Opening File  Dear, Please if help me to resolve this problem. I have an application in java that works correctly under Eclipse... this generated file, a message was displayed: Error opening file. But If I
opening node in treeview struts layout - Struts
opening node in treeview struts layout  Example of opening node in treeview struts layoutopening node in treeview struts layout Hello every one, i am new to this group , i am having the same problem , Struts Layout tree view
opening internet browser in java program - Swing AWT
opening internet browser in java program  i want a code to open the internet browser in swing program using JFrame.  Hi Omkar, Use...) { JOptionPane.showMessageDialog(null, "Error in opening browser" + ":\n" + e.getLocalizedMessage
Opening a browser only with body from a java program
Opening a browser only with body from a java program  Hi all, I got following requirement, Opening a browser window only with body and title bar. And based on some condition, after some time, i have to close the browser window
opening new browser with new JSESSIONID using java
opening new browser with new JSESSIONID using java  I am facing following problem, I am trying to open a new browser using java. First i have opened one IE browser and manually. And i ran my LaunchURL.java file, it is opening new
Exception when opening a excel file in JFrame
Exception when opening a excel file in JFrame  Hello, I have a problem when trying to display a Excel file in a Jframe. The exception is like this: com.jniwrapper.LibraryNotFoundException. here is my code public jexcelTest1
Help with opening a text file upon closing a program.
Help with opening a text file upon closing a program.  I need some helping in figuring out something I want to do. I have this program that is a swimming pool volume calculator. It stored that data on a output.txt file but I want
Java - Opening a URL from an Applet
Java - Opening a URL from an Applet       This is the example of opening a url in same... used for opening url from an applet. This program is using two functions
cannot find java.exe error while opening netbean5.5 - IDE Questions
cannot find java.exe error while opening netbean5.5  HI, 1)i am working netbean5.5 tool.I got the error of cannot find c:\programfiles\java\jdk1.6.0_02. (while opening netbean5.5 shortcut in desktop) . my system jdk path
Opening IE from Java Swing Application in Kiosk mode
Opening IE from Java Swing Application in Kiosk mode  Hi All, I want... window is opening. But I want to open the IE window in Kiosk mode or without address... & Regards, Abhijith   Here is a simple example of opening IE
JAVA SCRIPT CODE FOR OPENING A WEBSITE IN A NEW WINDOW - Java Beginners
JAVA SCRIPT CODE FOR OPENING A WEBSITE IN A NEW WINDOW   PLS TELL ME? HOW CAN I DEFINE A WINDOW.OPEN FUNCTION WITHIN ANOTHER FUNCTION e.g IF THERE ARE THREE FIELDS OF A FORM, AND AFTER CKECKING THAT ALL THE FIELDS HAVING
problem in swing program for opening two windows with same login credentials
problem in swing program for opening two windows with same login credentials  I Face two problems while writing the code in swing program 1.i developed one application using swings that has username,password when i login
Java - Opening a url in new window from an applet
Java - Opening a url in new window from an applet       This is the example of opening a url from an applet. This program shows that how a url is opened in a new document or browser
How to Open JSP?
is simple text file you can simply open it in notepad. On Linux system you can use any text editor such as vi or pico editor to open it. Opening file in Edit plus
Opening a file in a HTML form
Opening a file in a HTML form In this example, you will first see that a form has been created in HTML format and the code of opening a file has been written... a file in PHP. Opening a File in PHP <?php  $string = $_POST["
Mantain a Session in one application after opening another third party application - JSP-Servlet
Mantain a Session in one application after opening another third party application  Hi My Requirements is like this.. I have one ear apllication running in one place.. We we click a link on this applcation it has to open
Code for opening a new mail from the default mail box and copy the database contents
Code for opening a new mail from the default mail box and copy the database contents  Guys, here is how it goes when i click on a button say "mail", the code fetches the receipients, subject and the body of the mail from database
Opening a new window in Echo3
Opening a new window in Echo3       In this example of Echo3 (server-side application) we will create a new Window. To create this example we have created two class files
How to launch my web application from my desktop without opening Netbeans IDE everytime i run the application?
How to launch my web application from my desktop without opening Netbeans IDE everytime i run the application?  Hi RoseIndia, Thanks for ur reply for my previous question but i knw how to create JSP pages, I have completed my
Integrated Development Environment (IDE)
with a notepad. To compile and run a program, a programmer uses javac and java commands at the command prompt window. Notepad doesn?t help a programmer to track
execution
execution  hello,actually am writing the code in notepad on my PC.but it is converted to Mozilla fox folder,if i want to execute it,it is not executing,instead of executing that folder, is opening as notepad it self.........so
Java - Opening a url in new window from an applet
Java - Opening a url in new window from an applet       Introduction In this example you will learn... will open new browser window and then show you the web page. Opening a new
Running Batch files in java - Java Beginners
a batch file "notepd.bat" which calls the notepad and this is responsible for opening a notepad. notepd.bat ========== echo "This would open notepad" CALL notepad Our java class is "CallBatchFile.java" who runs the bat file
About IDE
About IDE       Generally, a java programmer starts programming with a notepad. To compile... window. Notepad doesn?t help a programmer to track the improper java syntax while
Eclipse IDE
Eclipse IDE           Integrated Development Environment (IDE)  Generally, a java programmer starts programming with a notepad
Create First Program
"notepad".  Open the notepad and write your program. 
Tips and Tricks
Tips and Tricks           Opening, writing, saving notepad automatically with Robot class.... It opens notepad and types ?javajazzup? in it and saves this file as ?robo.txt
Open The Default Editor to Edit the File
Open The Default Editor to Edit the File       This section, you will see the method of opening the file in the default editor to edit and save the file. Here
javascript
javascript  how to run jscript progame in notepad
javascript
javascript  how to run jscript progame in notepad
Java Compiler,Java Compiler Example
Java Compiler       To commence with Java programming, we must know the significance of Java Compiler. When we write any program in a text editor like Notepad, we use Java
PHP Jobs
have opening for the following positions.  PHP Jobs
Java Serial Communication - IDE Questions
tried my program with notepad for rxtx. It worked properly & same with netbeans gives exceptions while opening port. Does any one have any idea? pls
Address Bar
indicates the web browser that the opening page is written in Hyper Text Markup... misspell then the opening page will show the error and won’t open the site

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.