Java Game to native HTML5 & JavaScript?

I want to make a game for a website and I want it to be integrated into the website. I don’t want it to have to load up like an applet or LibGDX’s similar applet viewer thing. Is there a library or software that can convert a Java game to native HTML5 code or would I have to program it in JavaScript and the such?

What do you mean by “LibGDX’s applet viewer thing”?

LibGDX exports as html5 and javascript. Are you just talking about the little loading screen at the beginning?

Here’s an example of a libGDX game exported as javascript: https://t.co/vtKVeti5Vh (this is Legends of Fore by Kev Glass)

Like Kevin said, libgdx can compile to javascript too - no applets involved. My artemis fork provides links to a few open source games which compile to both desktop and html: https://github.com/junkdog/artemis-odb#open-source-games

Yeah I’d suggest LibGDX. It does directly export to HTML5. Super easy and useful from my past experiences.

I have never done this before but I believe Google’s GWT is another option… Just pointing out…

I believe that is what libGDX uses under the hood.

You’re right. It’s open source, just look at the source code: