I developed it with VS2008 and VS2010. NET program, through the MyEclipse8.5 development of Java programs, the following from the IDE, language, plug-in different points to do a simple explanation. However, due to the limited experience and knowledge, this article can only from the comparison of the surface and their usual function points to illustrate the differences I see.
Different points of the IDE:
The first thing that's ever happened to me is myeclipse. It is also very convenient to write the view code in the development process, even with a lot of features that are not available with VS, here are some of the different points that you now encounter:
1, MyEclipse not like the #region in the VS, #endregion一样的代码段区域, in a method or class, you can #region function points ... #endregion这样把代码片段折叠起来, MyEclipse unless you use some other plug-ins to achieve this effect.
2, MyEclipse import new project, if the JRE version is different, you need to choose to use the local JRE version, project right->build path->configure build Path->libraries->java Build Path modifies the JRE version, but sometimes there is a compilation problem, because there is no option to compile the JDK version, and the project right-click->build path->configure Build Path->java compiler modify compiler compliance level. For VS, the high-version code turns on the low-version code, automatically upgrades, or manually selects the. NET which version of the compilation, it will be more convenient.
3, for a curly brace or parenthesis of the code snippet, double-click the symbol, then automatically check the parentheses inside the code snippet, this can easily see a code snippet, vs does not have such a function.
4, when debugging code, VS will show more powerful than myeclipse, they can modify the value of the existing variables at the breakpoint, but vs in the monitoring temp variable box input variables can also be smart to write code, and MyEclipse can't automatically remind, and VS can drag breakpoints to already running code, which is very powerful and useful when debugging problems, but myeclipse cannot drag breakpoints.
5, MyEclipse Double-click the Code edit box in the tab bar, you can switch the full-screen code edit block and multi-frame display, this is more convenient than VS, a link Vith editor button next to the Package Explorer box, you can quickly locate the location of the file in the bag , this is also more convenient, but a file in the VS right-click can directly choose to open the corresponding physical file directory, in the MyEclipse does not have this function.
6. Java project is opened by import, not by double-clicking like vs. SLn or. The csproj file will open the entire project. But once opened, the next time you open MyEclipse, it will automatically load the items that have already been opened. VS is one solution that can only be opened at a time, with different projects included in the solution. If a new solution is added, the next time you need to open it separately.
Different points of language:
The Java language is very similar to the C # language, although there are many differences in the internal, the API is not the same, but the idea of developing a specific function point is often the same, due to the relatively new technology and characteristics of the development process of not much contact, I encountered different points include:
1, the default modifier in Java is visible within the package (corresponding to the same folder directory, not the project large jar package), the protected variables and methods are within the package and the child class is visible. NET is only the default modifier of the class in the visible net itself and the subclass is internal, which is accessible within the assembly. The method and the word defaults are considered private and are not visible in the Java default package.
2, if found a jar package, Java view the new Jar Package Method field description, need to have a separate corresponding JAR package doc document, to see the interface call parameter description, otherwise it looks not intuitive, but if there is a source code out of the jar package, Debugging can be convenient to see the package in the source code net as long as there is a DLL file, you can easily see the method metadata call parameters, but see the parameters in detail, or need the corresponding DLL XML document.
3, byte type of the number range is not the same, Java is 128 to 127,. NET is 0-255, generally need to exchange data and processing are converted to 16 binary, and then take 8bit after 2 bit, so that their values are the same, convenient synchronous encryption decryption or related processing
4, the Java file is saved by default automatically compiled, but this also thanks to it to compile each Java file into a class file. NET needs to compile the project individually every time, because it is a project one DLL file, if one is saved. CS files are compiled, the workload is too large to affect the development speed.
5, the final keyword in Java, when given a field, indicating that the field can not be modified, the constructor can not be modified, this and C # Const a bit like, but the const default is static. and C # ReadOnly are also more like, but ReadOnly can be modified in the constructor. When it is used as a modifier of a method, it class tries C # 's sealed class and cannot override it.
6, the Java package name is corresponding to the physical file location one by one, C # namespace can be casually written, and the compiled assembly can be arbitrarily changed, can not be consistent with the namespace, the assembly and Java in a separate jar package is similar meaning.
7, Java recommended to use the Get,set method to assign values and get the value of internal variables. NET can be obtained with the field get,set, and can be directly get;set after vs2008, with the help of syntax sugar, the compiler will automatically generate equivalent Get,set internal fields.
Different points of the plugin:
1, MyEclipse itself is a plug-in, which integrates a large number of open-source framework, and VS is a Microsoft Unification IDE, to use other open source plug-ins, need to be downloaded separately and individually configured. Www.2cto.com
2, Java implementation of webservice many methods, in addition to the JAVAX.JWS package only the Jax-ws,java WebService specification comes with the version, there axis,xfire WebService open source implementation, axis including AXIS1, Axis2,xfire has been renamed to CXF, but various implementations vary, in and. NET release of WebService call each other, often encountered some problems, in general, Java to the WSDL format requirements more stringent.
Different counts of Java and. NET in development