Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How to make a Java .JAR playable in browser ?

A topic by Warllord created May 17, 2019 Views: 1,589 Replies: 1
Viewing posts 1 to 2

Hi everyone 

I made a game in Java/JavaFX and I saw on the upload page that I could directly upload the .JAR of the application to be played in browser. But when I try, the game page stay blank. Is it something known, or did I make a mistake with the configuration ?

I made the .JAR with the IDE that I use to code, IntelliJ IDEA from JetBrains, and it perfectly work when I launch it on my computer. When they ask me the Main class, I give the same that they asked me when I created the .JAR (sample.Main), but it doesn't work. Maybe it have to be in a precise version of Java ?

I looked for someone who might had the same problem but no one I found solved it. For the moment I can let it downloadable, but I would like to make it playable from browser.

 Thanks for your help !

Moderator(+1)

To make a .jar file playable in the browser, it has to be built as an applet. I can't remember exactly how to do it, but that doesn't use the main function. I think you have to extend a class from the Java standard library, and override a few methods. Hope this helps.

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.