Apologies if this has been asked, I can't seem to find the answer anywhere.
Here is my code:
private void OpenLogActionPerformed(java.awt.event.ActionEvent evt) {
Desktop dk = Desktop.getDesktop();
try {
dk.open(new File("C:\\Users\\Nick\\Desktop\\DropLogs\\Rex.txt"));
} catch (IOException ex) {
Logger.getLogger(DropLogger.class.getName()).log(Level.SEVERE, null, ex);
}
}
For the file path I'm looking for it to work for any drive letter and any user name, so that others can use the program. From what I've read it seems to be something like:
dk.open(new File("**\\Users\\*\\Desktop\\DropLogs\\Rex.txt"));
But that doesn't seem to be working. Any help is apprecaited