Newbie's question: Jmonkey as WAR file?

Hi there,

Should you create Jmonkey game as WAR file in order to host that game on the server? Do you use applet or Java FX for hosting game on the server? How do you do it properly?

Thank you.

I’m going to recommend spending some time learning Jakarta EE with Wildfly before investigating as you will answer your own question once you are familiar with JEE.

With that said, you will NOT want to package a JME app into a Jakarta EE server. A JME app can run standalone and a JEE server can server the client download, but you will not host a JME app from a JSP (or as an applet since they are no longer supported). If you want to embed a JME app into a webpage, then you will want to look at frontend technologies such as web assembly, which has nothing to do with Jakarta EE.

Jmonkey can be converted to Web assembly? Have you ever done it?

Thank you in advance.

I personally have not. I have heard of others who have got basic stuff working but nothing complex. You can try searching the forum, iirc there are several topics on it over the years.

I don’t believe that jME WebAssembly attempts have progressed much past basic demos, if that far. Getting the Java code to run in the browser is only the first problem, after that the graphics environment in a browser is substantially different, as is file system access and a number of other things. Theoretically it can be done, but you’ll need to know what you’re doing and cross a few hurdles to get there.

LibGDX uses Google’s GWT (Google Web Toolkit) components to hook games to web, you can do some experiments with libgdx until you learn the logic, you can implement your own for jme i guess…but its a lot of work on the backend of WebGL as i know, it utilizes webGL from the GWT framework (most probably a js linking framework).

GWT:
https://www.gwtproject.org/

Libgdx web app example (use the web section):

GDX-Web-Backend:

1 Like

Thank you so much.

1 Like