-1

I have been programming in Java for several months, one of the tools I use is Eclipse, which seems to be able to run standalone from any local Java installation by having the JDK/JRE in a directory next to the main binary.

Snapshot of the Eclipse root directory

I have run it from my USB-drive in computers without any Java Runtime/Framework/other... And it has been able to open itself, understand the Java code, compile it, and run it without any problem.

So, the question is How do they do it?. At least in the Windows version (Did not try in the Linux version but I think it might work as well).

  • If I had a wiser answer I would give it - but at least there's this: the eclipse editor is not only open source, it's also made easy to use to make your own eclipse app with the code. Check out Eclipse rcp, fiddle, and you'll learn the answer to your question and much more while at it. – Spork May 05 '18 at 01:01
  • What's on your eclipse.ini file? – Carl May 05 '18 at 01:02
  • There is nothing special about this location, it just one of the places the eclipse.exe looks when it is trying to find the JRE/JDK to use to start the main Eclipse code. – greg-449 May 05 '18 at 07:22

2 Answers2

1

See following threads. https://www.eclipse.org/forums/index.php/t/264351/

How does Eclipse compile classes with only a JRE?

Do I need to install Java SDK if I have eclipse

nyulan
  • 311
  • 3
  • 12
  • These answer *how Eclipse is able to understand and compile the Java code*, but still does not answer *how it is able to initialize without having Java installed, just by having it in a folder.* – David Tabernero M. May 05 '18 at 10:08
-1

The eclipse.ini file will point to the local vm location https://wiki.eclipse.org/Eclipse.ini

Carl
  • 64
  • 5