Hi all,
I've created a java class that is connected to a database (derby). It works perfectly when run from netbeans. After that I created a batch file that calls this class and put them in a folder in the C.When tested, it is clear in the cmd that all lines are excuted until the connection to the database part:
Connection con;
Class.forName("org.apache.derby.jdbc.ClientDriver" );
con = DriverManager.getConnection("jdbc:derby://localhost:1527/demntiaDB", "reem", "pass");
I get those errors:
classNotFoundException
URLClassLoader.run$
this is my main:
public static void main(String[] args) throws ClassNotFoundException {
SwingUtilities.invokeLater(new Runnable(){
public void run() {
try {
regulation r = new regulation();
} catch (ClassNotFoundException ex) {
Logger.getLogger(regulation.class.getName()).log(L evel.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(regulation.class.getName()).log(L evel.SEVERE, null, ex);
}
}
});}
what do i have to write exactly in the batch file? This is what i have right now:
cd\
cd "HourlyTempReg" <---- folder in which java class and batch file are placed
java regulation.regulation <----- java java package.java class
Thank you very much