Search code examples
javajappletjava-web-start

Java Web Start vs. Java Applet


I'm working on a Java application which I want to be available over the internet. However, some requirements put me in a difficult situation. That's why I would appreciate some input of experienced programmers. The situation is as follows:

I have a basic webhost, with

  • a mysql database
  • an open ftp-port (21)
  • an open http-port (80)

but without

  • an open mysql-port (3306)
  • an open ssh-port (22)

Now, I want to build an application (Java Web Start OR Java Applet) which can do the following:

  • Be available for multiple users over the internet
  • Communicate with mysql database
  • Exchange documents between local file system and webhost

Now you see the problem:

  • When running a Java Web Start application, it seems impossible to connect to the mysql-database because the mysql-port is closed.
  • When running a Java Applet, it seems I cannot get access to the files in the local file system.

Has anyone a suggestion to this problem?

Thanks in advance!

Tom


Solution

  • I wouldn't recommend such scenario.

    With applets and web start, you would expose the database user name and password to users. You could obfuscate them but, they could still be reverse engineered.

    Instead, you should create a proper restful web service to mediate the connections from database to the clients.