0

I have made a Java desktop application which simply stores information about the customers. Now I'm asked to make the necessary changes to make it a web application. I'm completely new to Java web development.

What I understand is that I will be given a server and I have to keep the program in that and only the admin will be able to run the program.

Can I just link to the application by some script so that my main program remains unchanged? My application is based on Swing and a simple file based database.

Community
  • 1
  • 1
palatok
  • 1,022
  • 5
  • 20
  • 30

3 Answers3

3

Have a look at Java Web Start as a means of deploying your Swing application. You should be able to avoid a re-write of your application depending on the end-user requirements.

Reimeus
  • 158,255
  • 15
  • 216
  • 276
3

You must determine what type of web application you want: servlet or applet? Also you can switch to an application type JavaFX. For starters try reading something about the basic structure of cups types of applications. For using applet see How to convert a Swing Application to an Applet?

Community
  • 1
  • 1
Mihai8
  • 3,113
  • 1
  • 21
  • 31
2

Can i just link to the application by some script so that my main program remains unchanged ?

The simple answer is No.

I recommend that you get some training on how to write web applications in Java. After you've done that, you will have a better idea of what needs to be done.


Note that both Applets and JWS would involve the user installing Java on his PC in order to run your code.

  • In the former case, the user must enable a Java plugin in his web browser, and that represents a significant security risk.

  • In the latter case, you don't has a "web application" in the normal sense. Rather you have a regular Java application that is launched from the web. (Storing data on the server is a problem that you still have to solve ...)

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216