Opening Notepad

Opening Notepad

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

Ads









Related Tutorials/Questions & Answers:
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
Advertisements
how to create notepad in java
how to create notepad in java  how to create notepad in java
ModuleNotFoundError: No module named 'notepad'
ModuleNotFoundError: No module named 'notepad'  Hi, My Python... 'notepad' How to remove the ModuleNotFoundError: No module named 'notepad... to install padas library. You can install notepad python with following command
how to open notepad using java
how to open notepad using java  Hi, how to open notepad using java? I want to open windows notepad from java program. Thanks   Hi, Use following code: import java.util.*; import java.io.*; class Notepad { public
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
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
ModuleNotFoundError: No module named 'opening_hours'
ModuleNotFoundError: No module named 'opening_hours'  Hi, My... 'opening_hours' How to remove the ModuleNotFoundError: No module named 'opening_hours' error? Thanks   Hi, In your python
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
How to create Notepad in Swing
How to create Notepad in Swing Program Description:- In this Example we have... or the string is null or empty. Example package NotePad; import java.awt.... javax.swing.*; public class Notepad extends JFrame { private static
"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
ModuleNotFoundError: No module named 'osm_opening_hours'
ModuleNotFoundError: No module named 'osm_opening_hours'  Hi, My... named 'osm_opening_hours' How to remove the ModuleNotFoundError: No module named 'osm_opening_hours' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'osm-humanized-opening-hours'
ModuleNotFoundError: No module named 'osm-humanized-opening-hours'  ...: No module named 'osm-humanized-opening-hours' How to remove the ModuleNotFoundError: No module named 'osm-humanized-opening-hours' error? Thanks
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 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
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
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
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
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
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
IllegalStateException for file opening
IllegalStateException for file opening
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
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
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
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
Eclipse IDE
Eclipse IDE           Integrated Development Environment (IDE)  Generally, a java programmer starts programming with a notepad
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

Ads