文档

Java™ 教程-Java Tutorials 中文版
ExampleGame 开发人员(Terry)的步骤
Trail: Security Features in Java SE
Lesson: Implementing Your Own Permission
Section: Putting It All Together

ExampleGame 开发人员(Terry)的步骤

The steps Terry would take, after creating a game (ExampleGame ) that calls the HighScore getHighScore and setHighScore methods to get and set, respectively, the user's high scores, are:

Compile the Game Class

javac ExampleGame.java -classpath hs.jar -d .

Place its class file in a JAR File

jar cvf terry.jar com/gamedev/games/ExampleGame.class

Create a Keystore and Keys for Signing

keytool -genkey -keystore terry.keystore -alias signTJars

Specify whatever you want for the passwords and distinguished name information.

签名 JAR 文件

jarsigner -keystore terry.keystore terry.jar signTJars

导出公钥证书

keytool -export -keystore terry.keystore
    -alias signTJars -file Terry.cer

Supply Files and Information Needed by Users

That is, supply them

Game users also need files and information from Chris. For their convenience, Terry may forward this information to them:


Previous page: Steps for the HighScore Developer (Chris)
Next page: Steps for a User Running ExampleGame (Kim)