user9670600
user9670600

Reputation:

Java application for a server

I have created a JavaFX app, but it seems that servers do not support UI applications. What is the easiest way to develop Java apps for servers? (In other words, what solution does IntelliJ IDEA have? I don't want to rewrite a lot of code)

Upvotes: 0

Views: 138

Answers (2)

Igor Kanshyn
Igor Kanshyn

Reputation: 912

JavaFX is a technology for creating desktop (client) application on Java. These application are run on a local computer, that computer the user is currently interacting with. There is Java WebStart technology. It lets us place the application .jar (java executable) on the server and call it via a link from a web page or direct URL. In this case the application will still be running on user's local computer. At the same time, application deployment can be easily managed, since the application executable is sitting on a single location on the server.

JavaFX works with WebStart, you will need to create a JNLP file. It is a descriptor of the application. Here is some info: Java WebStart I hope this helps.

Upvotes: 1

ImZ
ImZ

Reputation: 46

Java Web App? if I understand you, get my small advice.

You will have to rewrite all controllers, and change UI fxml forms to web pages (html + thymeleaf, jps, jsf and so on).

If you have bad project architecture, for example: you connect with database and retrieve data into controller classes, methods, it's so bad, and you will rewrite a lot of code.

But if it don't You should just create web controllers, inject needed services, facades and call needed methods there.

Good luck)

Upvotes: 0

Related Questions