Publishing a .jar game online

情到浓时终转凉″ 提交于 2019-12-13 09:09:49

问题


I have created a simple java game and received a .jar file. I want to publish this game online on game websites (flash game websites such as kongregate, miniclip, etc.) but am unaware as how i would go about doing this. I have read that you create an applet to post the game online; but can I do that for a website that i am unable to edit?

TLDR: How to post .jar file on website, & if you do so via applet, can someone who cannot edit the site create an applet for the website? If it is the latter can someone guide me towards a guide for creating an applet?


回答1:


How to post .jar file on website, & if you do so via applet, can someone who cannot edit the site create an applet for the website?

Short answer, no. Long answer, nope.

In fact, it surprises me that you would think that you can launch an applet from a site when you cannot edit it! If that were possible, I could insert spam ads in a site that is supposedly under your control!


As to deploying the application:

The best way to deploy a Java desktop application is using Java Web Start. A JWS app. can be launched from a link on a web site.

It is a lot easier to deploy a JWS app. than it is to deploy applets (which, BTW, soon won't be supported in Chrome or IE at all, and are by default blocked in Safari and FF).

You will still need 'edit permission' on the site to launch a JWS app. As well as the ability to add new files to the site (e.g. the Jars(s) & the JNLP file used to launch the app.).

Lastly, either applets or JWS will need to be digitally signed by a valid certificate before there is a good chance of the JRE allowing them to launch.

I have created a simple java..

Not looking so simple now, is it? ;)

Deployment is typically a lot harder than people expect, and in the case of 'simple apps.' harder than they were to code and debug..



来源:https://stackoverflow.com/questions/31581531/publishing-a-jar-game-online

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!