Jump to content
Excelsior Forums

Kallen

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About Kallen

  • Rank
    Newbie
  • Birthday 01/01/01
  1. Single Instance

    I am trying to make sure only one copy of my java program is running at a time. After a quick search I came across the "lock file" trick... FileLock lck = new FileOutputStream(flagFile).getChannel().tryLock(); if(lck == null) { JOptionPane.showMessageDialog(this, "A previous instance is already running....", "Settings",JOptionPane.WARNING_MESSAGE); System.exit(1); } This works fine as a jar, but when I compile it using Jet 3.6 it stops. Any suggestions?
×