I have some database applications (CRUD), and I want to create a desktop application with some buttons such that clicking on them lead to run those applications. How could I do this?
I have tried adding the CRUD projects as class path for the desktop application, but it didn’t work out, with an exception in CRUD’s lines indicating a class can not be found or something.
I’m using NetBeans and those database applications were created automatically by NetBeans from my MySQL server.
OK, I found a solution on this although this is not what I wanted, but it’s working.
First, I built all the database applications as JAR files.
Next, in the event handler of my buttons I added this line of code in order to execute the JAR file:
So every time I click the button the application runs.
Although this is working fine for me, but it seems not to be the right solution. I rather prefer solutions like adding classpaths or similar, but because of some conflict in the class name, that I don’t know where they come from, classpaths didn’t work.