Hello,

I am making a simple program that has you select Bible chapters and verses. I have all the chapters and verses in separate text files. I moved them into my source package. I am having trouble finding the code to put in the program so that java will open the files when needed.

-Thanks

Are you looking at code to open the txt file and display the same or reading the file and processing

I am looking to have the program open the file in notepad

the below code will open the file extension with the default application in windows (txt > Notepad)

File dest = new File(filename);
Desktop.Action act;
act = Desktop.Action.OPEN;
Desktop desktop = Desktop.getDesktop();
desktop.open(dest);

This program works fine.But when i pass the filename from one jsp page(in that file already created) to next page where the code is for openning the text file on desktop, it shouldn't working.
<% String vtu=request.getParameter("f"); %>
Where f is the object of the type File

Reading a file from local and reading a file on a webpage are 2 different approaches. Also, you should create a new thread instead of revive an old thread...

addin a text is very simple. just follow this code
<<<<<<<File dest = new File(filename);
Desktop.Action act;
act = Desktop.Action.OPEN;
Desktop desktop = Desktop.getDesktop();
desktop.open(dest);>>>>>>>