Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: editing and running code live

When editing Java code in Eclipse I can modify the code while it's running in various ways and have those changes take effect without restarting my program.

What is the technology underlying this feature? Is it part of Eclipse, or is it something I can do with the command line tools and the tools that come with the JDK?

like image 735
justinhj Avatar asked Oct 20 '10 19:10

justinhj


People also ask

How do you write and run code in Eclipse?

Step 1: Open Eclipse and click File > New > Java Project. Step 2: Provide the Project Name and click on the Finish button. Step 3: In the Package Explorer (left-hand side of the window) select the project which you have created. Step 4: Right-click on the src folder, select New > Class from the submenu.

Can you work collaboratively on Eclipse?

Saros - Distributed Collaborative Editing and Pair Programming. Saros is a real-time collaborative editor for eclipse projects. All collaborators have an identical copy of Eclipse projects. Two or more users can jointly edit files in the project.

Is the Eclipse code editor free?

Eclipse software development kit (SDK) is free and open-source software, released under the terms of the Eclipse Public License, although it is incompatible with the GNU General Public License. It was one of the first IDEs to run under GNU Classpath and it runs without problems under IcedTea.

Can you share code on Eclipse?

Just click the Copy Invite URL button, and then share the link with anyone. Invitees access the link from the CodeTogether view in their IDE (Eclipse, IntelliJ, or VS Code, or from a browser (no registration, download or installation required). Work with a team?


2 Answers

Its part of the JVM and its called HotSwap.

http://download.oracle.com/javase/1.4.2/docs/guide/jpda/enhancements.html

like image 81
hvgotcodes Avatar answered Oct 11 '22 13:10

hvgotcodes


This feature is usually called "hot code replace" and was introduced in Java 1.4 - it's part of the Java Virtual Machine Debug Interface and various APIs on top of that.

So it's not specific to Eclipse, but I don't think any of the command line tools that come with the JDK support it.

like image 24
Michael Borgwardt Avatar answered Oct 11 '22 13:10

Michael Borgwardt