How to pack a Stand Alone Application to a working Jar file?

Hello
I’ve got a problem with .jar Export that export from an example from VP, School System. I’ve downloaded the example file and imported to a new project, set up with hsqldb, postgresql, mysql. When it run via Run As…(Java Application) it’s work fine. When I export it as .jar file with/without source, it’s not able to connect to any database.

I’ve tried…
– check that my jdbc drivers is in classpath or lib/ inside the .jar package.
– DBMS is running fine, can be access from DbVisualiser.
– orm.jar file is working ok while it compile and Run As…(Java App.)
– i’ve check the user, password from .xml (hibernate) files, correct.

Can someone use this example and tell me how to set Build Path properties and Export as Jar file correctly? I’d like it for a double click application and use as Client - Server.

Thank you very much!
Jedt

[quote=Jedt3D]Hello
I’ve got a problem with .jar Export that export from an example from VP, School System. I’ve downloaded the example file and imported to a new project, set up with hsqldb, postgresql, mysql. When it run via Run As…(Java Application) it’s work fine. When I export it as .jar file with/without source, it’s not able to connect to any database.

I’ve tried…
– check that my jdbc drivers is in classpath or lib/ inside the .jar package.
– DBMS is running fine, can be access from DbVisualiser.
– orm.jar file is working ok while it compile and Run As…(Java App.)
– i’ve check the user, password from .xml (hibernate) files, correct.

Can someone use this example and tell me how to set Build Path properties and Export as Jar file correctly? I’d like it for a double click application and use as Client - Server.

Thank you very much!
Jedt[/quote]

Hi Jedt,

What will be the effect for not able to connect to the database? Any error message that shows what the problem is? As you said ‘Run As’ worked fine, I guess the problem is related to missing certain required resources. Perhaps an exception trace can give us some hints?

Best regards,
Jick