How to run Eclipse with selected Java runtime (eclipse.ini vm argument)
Eclipse startup is controlled by the options in eclipse.ini file. It is a text file containing command-line options that are added to the command line used when Eclipse is started up. There are many options. Now I will show you how to use "-vm" option, which defines under which Java runtime will be Eclipse started.
If you want to modify eclipse.ini file, you must be aware of the following:
- Each option and each argument to an option must be on its own line.
- All lines after -vmargs are passed as arguments to the JVM, so all arguments and options for Eclipse must be specified before -vmargs (just like when you use arguments on the command-line).
So before line with "-vmargs" add line "-vm" and after that add line with absolute path to javaw.exe. Now when you start Eclipse, it will be started using this runtime.