将 Java Applet 上传到网页 [英] Uploading a Java Applet into a webpage
问题描述
我使用 netbeans 6.0 创建了一个 java 字母游戏小程序,它还有一个 Microsoft Access 数据库用于高分.我想把它上传到一个网页(比如它是如何在 miniclip facebook 上完成的)我想知道它是如何完成的
I have created a java letter game applet using netbeans 6.0 which also has a Microsoft Access Database for the High Scores. I want to upload it into a webpage (like how its done on miniclip facebook etc) I'd like to know how it could be done
推荐答案
我不知道上传到网页"是什么意思.使用 标签 或
标签.但是,Access DB 可能会成为一个问题,因为它不太适合具有潜在许多并发用户的互联网应用.
I'm not sure what you mean with "upload it into a webpage". Applets are embedded into webpages using the <applet>
tag or the <object>
tag. However, the Access DB could become a problem, since it is poorly suited to an internet app with potentially many concurrent users.
另外,直接从小程序访问数据库是一个非常糟糕的主意,因为小程序代码(每个人都可以全局访问)将需要包含数据库用户和密码,这意味着每个人都费心反编译小程序可以对数据库做任何他们想做的事情(并且允许该用户).至少,他们将能够进入童话般的高分(例如,如果一款完美的游戏让您获得 1000 分,则为 5000 万).
Additionally, accessing a DB directly from an applet is a very bad idea, since the applet code (which is globally accessible to everyone) will need to contain the DB user and password, which means that everyone who bothers to decompile the applet can do whatever they want (and that user is allowed) to do with the DB. At the very least, they'll be able to enter fairy tale highscores (e.g. 50 million when a perfect game gets you 1000).
这篇关于将 Java Applet 上传到网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!