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
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
相关文章推荐
- how to write one native program based on android source build system
- how to build java project using gradle
- Java how to program(Third Edition)——我的java手记(三)
- Java How to Program (6th Edition)
- Java how to program(4th)中的专业词汇ch06
- How to trace a java-program
- [ZhuJie]JAVA实验一 JavaHowToProgram
- Java how to program(Third Edition)——我的java手记(一)
- Java how to program(Third Edition)——我的java手记(四)
- Java how to program(4th)中的专业词汇ch13
- Java how to program(4th)中的专业词汇ch05
- [20160701]DevideByZeroWithoutNoException——from 《Java How To Program (Early Objects), 10th》
- How_to_build_an_ARM/DSP_Hello_World_program_on_the_DaVinci_EVM 续
- Java how to program(4th)中的专业词汇ch10
- How to run a Java Program as a daemon (service) on Linux (openSUSE) using a shell script
- How to Run Java Program Automatically on Tomcat Startup
- Howto Write and build ROS program on Ubuntu
- How is jstack being used to find the bottlenect of a java program
- How to Create a Java Concurrent Program
- How to Create a Java Concurrent Program