It is also worth noting that the JLCA does not seem to Java Training attempt to resolve imported packages (or using namespace statements) that it can’t find. Instead, it just passes them through to the generated C# code. If you were to try to compile your new C# application, you would probably get quite a few more compiler errors than the conversion report indicates.
Not to worry, though. As stated previously, the bulk of these Java Training errors falls into the same recurring patterns and can be addressed en masse. I look at resolutions to these common errors in the following sections, and I cover the other necessary tasks to make your converted app a true C# application.
The process of resource locating—specifically, finding and loading file resources—in Java differs significantly from resource locating in C#. Java Training uses a class loader to load and parse a class definition at run time. Part of the responsibility of a class loader is to manage the context of a class and provide environmental facilities for classes loaded by it. In Java, a special type of environment variable, called a class path, is used by a class loader to locate resources. A class path is similar to a path environment variable in that it defines where a class loader should look for other classes and resources. An application that wishes to load another class or resource can do so by telling the class loader the location of the file relative to the class path.
A very common approach to resource resolution in Java is to use a special type of file called a properties file for configurable information, such as connection or host information, paths to other resources, localization strings, and credentials to use for authentication. A properties file contains name=value pairs, which are separated by a new line. Popular third-party Java Training libraries that don’t have direct equivalents in the .NET Framework (such as Hibernate and log4j). Items that deal with class loading or resource resolution.
The situation is different today. We now have powerful free operating systems and many free programming tools. Whatever job you want to do, you can do it on a free platform; there is no need to accept a no free dependency even temporarily. The main reason people fall into the trap today is Java Training because they are not thinking about it. The easiest solution to the problem is to teach people to recognize it and not fall into it.
No comments:
Post a Comment