I have this button which is meant to open a text file for easy tweaking. It works fine when I put the text file in the same directory, but when I try to put it in a subsidiary directory and change the path to "config/gameItems.txt" it doesn't do anything, not even tell me it can't find the file. Any thoughts?
JButton itemsButton = new JButton("Items");
//Add action listener to button
itemsButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
//Execute when button is pressed
try {
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "config/gameItems.txt");
} catch (Exception a) {
System.out.println("File not found");
}
}
});