[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to launch a notepad at runtime

Posted on 1997-11-10
1
Medium Priority
?
600 Views
Last Modified: 2006-11-17
Hi
   I have a requirement of Launching a Notepad from a Java
application at Run Time, and write on some message on to that Notepad. How to do that?

I have used following command
try
{
   Runtime.getRuntime.exec("notepad");
}
catch(Exception e)
{}

exec() method returns me a Process. But i am not able to get any reference of that notepad so that i can write into that.

Will any body explain me with full code how to do that.

regards
0
Comment
Question by:sadik102097
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
gwalters earned 150 total points
ID: 1230315
You'll have to create a file containing what you want in notepad, then pass that file as an argument.

FileOutputStream out=new FileOutputStream("tempfile");
...
out.close();
Runtime.getRuntime.exec("notepad tempfile");



0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question