Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exit eclipse and keep Java application running?

How can I exit Eclipse without killing applications launched from within eclipse? I understand that applications launched in debug mode have a network link with Eclipse, but there should be no problem with applications launched in release mode. However, no matter how I end eclipse (even killing the process) kills the launched applications a couple of seconds later, regardless of important unsaved data in those programs.

Motivation? Can be any of: eclipse internal error which requests a restart, needing to free more memory (eclipse is 330MiB), accidental kill by process explorer.

like image 751
Mark Jeronimus Avatar asked Mar 14 '13 20:03

Mark Jeronimus


People also ask

How do you exit out of Eclipse?

You can use the shortcut key – [Alt] + F + X or using menu option – File > Exit. And also the default Windows key 'Close Application' <Alt-F4> should work.

How do you stop a project from running in Eclipse?

It can typically be found somewhere along the bottom of your screen. If you can't find the console, go to Window > Show View > Console. Then you will see a red stop button as part of the console. This will terminate the running program, leaving the console messages behind.

How do I pause a program in eclipse?

If you have already started the application, the best you can do is to use kill -STOP from the command line. You may need to do this to the eclipse process itself if the application is running in the eclipse jvm.


1 Answers

Eclipse uses it's own emulator sandbox to run the compiled source code. Besides exporting your project to an executable .jar and running it outside of Eclipse, there is no way that I know of to close down Eclipse and have your program running, since you are shutting down Eclipse's emulator when you close Eclipse.


I don't think you know how an emulator works based on your comment. Look at software such as VirtualBox. When you run OS inside of it, you are still using the system resources of the OS on which you are running VirtualBox.

This is like Eclipse. You need Java installed on your machine in order for Eclipse to work properly. Eclipse still uses the Java on your main machine, but it puts it within it's own sandbox for the safety and security of the system, and emulates your program. Look up how Eclipse runs it's programs if you don't believe me.

Also, some parts of Eclipse are written in Java, so you will also see some processes from that in the Process Explorer.

like image 165
syb0rg Avatar answered Oct 28 '22 16:10

syb0rg