Tom Dierickx
Tom Dierickx

Reputation: 33

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

but without

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

Now you see the problem:

Has anyone a suggestion to this problem?

Thanks in advance!

Tom

Upvotes: 1

Views: 452

Answers (2)

Michael Borgwardt
Michael Borgwardt

Reputation: 346377

Neither Webstart nor Applets will be able to communicate with the database when they can't connect to it. In fact, it would be very bad if they could because then the applications would have to contain the DB password, which everyone with access to the application could extract it and wreak havoc with your DB. Which is probably why the hoster does not open that port to the internet.

To use the database, you'll have to run some sort of intermediate webservice layer on the webhost.

Upvotes: 2

M.L.
M.L.

Reputation: 4706

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.

Upvotes: 4

Related Questions