1

Please, can someone help me resolve this issue? I've tried solution mentioned at https://stackoverflow.com/a/12333879/7415499, however, this also didn't work out for me.

Eclipse Version: 
Version: Photon Milestone 3 (4.8.0M3)
Build id: 20171102-1036   

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Note: The error is not coming while launching the eclipse.exe, but rather when I am executing a main() method

Eclipse_Error_Screenshoot

eclipse.ini file is modified as below:

-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
C:\Users\DELL\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.600.v20170921-0935
-product
org.eclipse.epp.package.java.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx512m
--add-modules=ALL-SYSTEM
Lokeshwar Tailor
  • 341
  • 4
  • 12

2 Answers2

0

The line -vmargs C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe is completely wrong.

-vmargs must be on a line on its own, If you want to specify a JRE/JDK location you use -vm followed by a separate line containing the JRE/JDK path - this must be above any -vmargs line.

So:

-vm
C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe
-vmargs

Note that this only sets the JRE/JDK that Eclipse uses to run. You should also set the JRE/JDK used to run programs from with Eclipse - this is in the Preferences in 'Java > Installed JREs'.

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • As instructed by you, I tried executing a 'Hello World' program through eclipse after making sure below two points: **1. eclipse.ini is modified as -** --launcher.defaultAction openFile --launcher.appendVmargs -vm C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe -vmargs -Declipse.p2.max.threads=10 **2. Confirming JRE** is included in 'Preferences' -> Java -> Installed JREs However, I am still **facing this issue**, while executing any main class. Let me know if you require more info from my side. – Lokeshwar Tailor Dec 01 '17 at 00:32
0

There seemed to be an issue while tweaking with the eclipse.ini file and my Java installation. After performing java installation and downloading new eclipse ver, all worked well

Lokeshwar Tailor
  • 341
  • 4
  • 12