How to build a independent java program

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值