I take this platform to speak briefly configuration environment under Eclipse points to note, in most cases, we encountered the largest source of inconsistency is the version of jar package, such as a class I call the method that in fact the old version does not exist, this time will not pass compiler, this is still good, at least it clearly tells you which class problems, then we can find this class belongs jar package. The most fatal is running when this happens, you will certainly ask why the compilation of the time through wanted to click the remote call, the customer side is how Tiaoyong server side object to, how the object transmission time, all this can be Nengyong to the serialization, the serialization, each class has a version, even greater than the jar package, when reduced to a java object from the hard disk, you will ensure that the definition of the class on the client and server exist, but and ensure they have the same version, this problem does not compile time to check out.
In addition to jar package version of the problem, there is a more common type of problem, and that is referenced project and jar package of Order , Eclipse classpath Lai by reference to the definition of class relations, generally, we use the most is the source code, source code engineering, jar package, their order is important, and this is leading to a jar package version of the reasons for inconsistency, imagine the purpose of engineering projects rely on A and B jar package, while A project is also dependent on B jar package, of course, refers to it, then aim works in the end to find a direct reference to the B jar package it or reference A project dependent jar package? The sequence between the three there, I do not recommend you seat of your pants to act, the most effective way is to set the B jar package to set a breakpoint at the entrance to see it in the end depend Which jar package.
Many works are configuration files, take our On the whole, the customer side there is the boot sequence xml configuration file, the server terminal server service xml configuration file, have not thought about Zai Eclipse Fang Shi Huan Jing Xia yes An What these configuration files to find the, order to find the directory it is like? If the configuration defines the repeat will not be a problem? I encountered such a situation, EMS client defines a boottask, platform client defines a boottask, EMS platform dependent client and finally it found the two boottask, each task repetitive task of time, cause the client to start problems.
That the above three sources of the problems we often encounter, then I say that the problem does not solve the jar package version has been the best way, first of all, you have to rely on what works what package, which package is what's to be familiar with Then, the jar packages are organized into a version of the uniform in a folder, and then Eclipse, wokespace dependent jar package under the project point to this folder, to ensure the wokespace used below are all the same jar package jar package. Then, the establishment of engineering, the most important point yes, keep your head the whole process very clear, do not commit low-level error, or you'll constantly on the run, and that every action you do, you should always include sufficient justification. The first stage is the device through the compiler, guaranteed not to compile error occurs, the second phase is the program to run normally, at this stage are the proceedings usually face a lot of problems that most high-handed solution is Shenrudaima! Do not think this is a minor problem, in-depth code may be a waste of your time, you are wrong, if you do not in-depth code, only the seat of your pants operation, you will waste ten times the time!