When I run ant, it is always using JRE from MyEclipse (see 0.jpg)
– In Run profiles in ant I have selected option to Run in the same JRE as the workspace. (see 1.jpg)
– In worskpace I have set defaul JRE jdk1.8.0._144 (see 2.jpg)
– in project buildpath too (see 4.jpg)
But in result is still using JRE from MyEclipse. When I actualize JRE in workspace I have to configure it manually in Ant run profile.
The ‘Run in the same JRE as the workspace’ setting means that the JRE that the workspace is running with i.e the JRE which is used to launch that workspace (i.e the one MyEclipse/Eclipse runs with).
The behavior is same for ANT builds in Eclipse as well. As MyEclipse is based on Eclipse, we haven’t made any changes to the way ANT works in MyEclipse.
You can select ‘Separate JRE’ in the External Tools Configuration dialog to choose a different JRE. If you still have issues, then please also cross post to development forums like stackoverflow.com for better suggestions from developer community regarding Eclipse + ANT integration.
Hope this helps. Please let us know if you have any questions.