My application runs perfectly under Netbeans but when I build it and launch the jar file it comes up with Java Virtual Machine Launcher "A Java Exception has occured" pop-up. I ran the java -myjar.jar and it just says a fatal error has occured. I presume that it can't create my database at main and that's why it's coming up with this error. I have implemented the Embedded Java DB system and and in order to set the database to be created, I have performed the following routine of code,
String userHomeDir = System.getProperty("user.home");
String systemDir = userHomeDir + "\\LMB\\";
// Set the db system directory.
conn = DriverManager.getConnection("jdbc:derby:LMB; create=true;");
Do you think this is right or I'm missing something??!