1

I have a complete and pure Java project (GUI game) which I want to run it on my website.

What is the best to do without creating the whole java project from scratch or is there any technologies I can use to embedded my java project on my website.

I know it became more difficult to do this as most broswer do not support java anymore. I know there is a way to do using Java Web Application using Apache Tomcat, but I do not want to do route. I am trying to find more easier and better to solution to this

Thank you

1
  • From what i know, there is no easy solution when it comes to Java GUI on browser. You could use Java Applet, and only IE or old Chrome version that still allow Applet to run. Commented Feb 4, 2021 at 15:56

1 Answer 1

1

Unfortunately, It is quite possible that you need to rewrite some parts of your application. Mainly because it is a different language (I assume SWING, AWT, or another Java-based library, but you could tell more about your project and used libraries).

There is usually two parts of a game/application (super simplified):

  • backend,
  • frontend,

I am quite sure you can use most of your backend code. But the frontend probably needs to be rewritten. It is even better if you loosely coupled those two parts meaning there is no code in the backend for the frontend because you will have a harder time now breaking it down.

For example, you could check Vaadin and see what you could use from there to refactor your GUI application to be work on a plain browser.

Vaadin basically lets you write only or MOSTLY Java code and still create a website, webpage.

Good luck!

p.s: Next time I recommend you (if you wanna publish it to a different platform) a cross-platform language, you write once and you can run it publish it on multiple platforms.

Sign up to request clarification or add additional context in comments.

4 Comments

This project was part of my university degree, and it is a typical object-orient project. The logic and the UI components are separated. So, what you are suggesting is that I re-do my UI with Vaadin and attach the logic with it.
In your shoes, I would check how easy is to rewrite your UI in proper javascript and frontend languages like one of these (Phaser for example):blog.bitsrc.io/… If I wanna move to cross application development then would check for sure: unity.com/features/multiplatform and unrealengine.com/en-US/features/…
As well, I think the top 2 engines are those last two, as I know. This way later you will have not much problem shipping it to Ps4-Ps5 or later consoles and so on. If it is a small project and you do not want to mess and learn new languages and technologies and you mainly have Java knowledge and wanna ship it as fast as possible then have a look on Vaadin! But hard to say Jam without knowing more about the complexity, deadlines, deliveries, any pushing atter of your project really. I cannot give you unfortunately the golden ticket, just try to help based on my experience.
But yes, first decide what platforms you wanna ship, maybe later as well, and then think about how much time and what knowledge you have already, so yeah, complex decision :).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.