The main implementation files in the dynamic library are: eclipse.c
Its main function is to locate the Startup Java Virtual machine and display the splash window (temporarily unused, which is displayed by calling in Org.eclipse.equinox.launcher.Main)
Java Virtual machine location algorithm:
1. Find from the file or directory specified by the-VM parameter
2. If you do not specify the-VM parameter, the program looks for the JRE that comes with Eclipse and finds it in the current directory Jre\bin\javaw.exe
3. Follow the path specified by the system's environment variable to find the Javaw.exe
There are several options for specifying the virtual machine location through the-VM parameter:
1. Directory Name: Find the default.ee file in the specified directory, and if not, find the Java Virtual machine executable program Javaw.exe. If you have not continued to find the Java Virtual Machine Dynamic library file Jvm.dll;
2. Execute the environment description file. ee
3.java Virtual machine Dynamic library file
4.java Virtual Machine executable file
Find the Java Virtual machine The next step is to find Startup.jar
1. Find under the-startup parameter specified directory
2. Find the jar file starting with Org.eclipse.equinox.launcher in the plugins directory
3. Look in the startup directory of the program (compatible with previous boot mode)
Splash window icon Positioning algorithm:
1. Determine if the-nosplash parameter is included and the splash window is not displayed
2. If there is a-showsplash parameter and the parameter points to a file, the specified file is returned directly
3. If you have the-showsplash parameter and the parameter points to a directory, navigate to the Splash.bmp file in the specified directory
4. If not found, the parameters are/path/prefix_<version> split, and then go to the/path/prefix directory to find
5. If not found, finally to the plugins directory under the + parameter under the specified path to find
Finally, the virtual machine is started and the "Org.eclipse.equinox.launcher.Main" class under the Org.eclipse.equinox.launcher.<version> package is loaded via the virtual machine. Then call its Run method
Collected in 2012-12-10 from the Baidu spaceproblem with the article? Click here to give us feedback
Eclipse launch two: Eclipse Dynamic Library (Baidu space Migration)