Try to catch if an instance is running

"Paul-Benoit Larochelle" <[email protected]> Tue, 8 Nov 2005 23:34:01 -0500
Newsgroups gmane.comp.db.mckoi
Message-ID <005c01c5e4e6$cf06d670$7801a8c0@LaptopToshiba>
Hello,
 
sorry do not know if I e-mail at the good place... not clear in the html
where to post a question
 
I'm using an embedded database...
if an instance is already running I would like to be able to send a
message to the user "you already have an instance of the application
running"
however even if I do
 
      try {
        conn = DriverManager.getConnection(url, username, password);
      }
      catch (Exception e) {
          System.out.println(
                  "Unable to make a connection to the database.\n" +
                  "The reason: " + e.getMessage());
                return;
               
        }

the catch catches nothing and the application crashed with an error
about the journal file
How can I trap the exception ?
 
Thanks  Paul-Benoit