I know how to write messages and save it as a .txt file (using Input/Output streams). What I want to do now is to be able to click a button and have notepad open the .txt file. How can I do this?
glenak 2 Junior Poster in Training
Recommended Answers
Jump to PostAnother option is the Desktop.open() method. You have more control with the Process the NormR1 mentioned, but it is OS-specific. The choice depends on your particular needs.
Jump to PostThis is code i use actually to open the browser in windows, and it seems to open notepad with a txt file on my computer.
try { Runtime rt = Runtime.getRuntime(); String[] cmd = new String[4]; cmd[0] = "cmd.exe"; cmd[1] = "/C"; cmd[2] = "start"; cmd[3] = …
All 6 Replies
NormR1 563 Posting Sage Team Colleague
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
glenak 2 Junior Poster in Training
NormR1 563 Posting Sage Team Colleague
adams161 21 Posting Whiz in Training
glenak 2 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.