Hi.. I am using one application as a jar file runnning with help of JNLP, as database credentials are stored in jar file itself.. its not as secure.. let me know the best solution for this problem..
1) Convert application Swing components into Web application
2) Run application using applet 3) use some servlet to connect to database
The usual solution would be to have the desktop app connect to a servlet via HTTP/HTTPS, and then the servlet would connect to the DB (and would return the results in the HTTP response).
I would go with the application->servlet->DB route. Like Lester mentioned, there is no difference between JNLP apps and Applets, effectively its just a thick client.
However, if you use the servlet, you can store the DB credentials as a properties file under your WEB-INF on the server. In case you need to change the DB credentials or switch the DB, all you need to do is update the server side properties without having all the clients update their application.