您的位置:首页 > 产品设计 > UI/UE

How to build a independent java program

2008-10-23 13:50 453 查看
There are several factors which will affect the program independence.
1: The main factor which will affect the program is which Java platform your program deploy to.
2: There exits several version of java platform you can choose. you must choose one version and maybe there will be a version problems
3: if you have used of JNI to invoke native method there maybe have some compatible problem
4: if you did not use the standard Java API, that means you chose the third part's API, Sun for example
5: your program are built on some special JVM. There are two important principles: don't depend on finalization to ensure the correction of program and don't depend on thread prioritization to ensure the correction
6: don't depend on the GUI. in different implementation of Java platform, another great change if the user interface.
7: avoid the bug in the platform
8: test your program in different platform

To develop a transplantable program, you can take such advice as below:
1, choose the device and machine your program will run
2, choose the right version which you think is good enough, you can develop and test your program on it.
3, choose a java platform
4, use the standard API. no native method and third party's API would be better.
5, don't depend on gc and thread prioritization to achieve your correctness
6, design a GUI to suit of your destination machines
7, test your program carefully
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: