Reputation: 22064
I've made an application with Java which is a game. I'm wondering if it is possible to put this game on html page or similiar in order to play it with a webbrowser. The GUI has been built with JFrame, JPanel etc etc.
Upvotes: 1
Views: 175
Reputation: 168795
I disagree with the first two replies that suggest applets should be the first choice. I can only assume that neither poster has much experience at deploying applets to people coming from the World Wild Web. Applets are a PITA at the best of times.
Instead, focus on Java Web Start which can launch the existing JFrame
based game from a link. It might require as little as creating a single launch file (JNLP) for the app. and linking to that.
As to embedding the game into a browser window, consider this. What exactly does the browser window wrapper do for the game? What does it add to the game? If the answer is 'nothing', then definitely go for JWS.
Upvotes: 1
Reputation: 35008
You might be interested in
Which should mean your clients won't need a jvm.
Upvotes: 1
Reputation: 20245
Yes indeed. Applet is the first choice.
Another option is "Java Network Launch Protocol" (JNLP) but note the games won't be embedded in the web page, it will be launched as it is a shortcut on you desktop.
Upvotes: 3
Reputation: 91299
The easiest way would be to use Applets:
An applet is a program written in the Java programming language that can be included in an HTML page, much in the same way an image is included in a page.
Upvotes: 4