Javaw.exe running when starting eclipse - eclipse

Whenever I launch eclipse, javaw.exe automatically starts and is displayed in the list of processes in the task manager. How does javaw.exe automatically start on launching eclipse? Can it be due to some virus or some configuration in eclipse is required for that? It didn't happen earlier. Please help.

No. It is not virus. javaw.exe is similar to java.exe. It is a Win32 GUI application. This is provided as a helper so that application launches its own GUI window and will not launch a console.
Eclipse uses its own GUI and hence it uses javaw process. So when you click on eclipse.exe it launches eclipse using javaw process.
Just to add a little more explanation - instead of running eclipse.exe, try executing following command.
java -jar <Eclipse HOME Directory>plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
Here the console will be locked until the eclipse is running.
Now if you use javaw instead -
javaw -jar <Eclipse HOME Directory>plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
You should see same eclipse getting opened. But notice that the console window is freed. You can continue using the console for some other purpose.
Eclipse.exe uses the latter.

Related

Show console for install4j launchers

How to enable java console for GUI app installed by install4j installer. When I use JNLP mode for my app console work as expected.
The "Java console" setting in the Java 8 control panel has no effect on launchers compiled by install4j.
To get a console, you have to add a console launcher in addition to the GUI launcher.
Alternatively, you can execute the GUI launcher from a console and start it with the
-console
parameter, then stderr and stdout will be written to the console (without blocking).

remote debugging jython script runned by java program with eclipse and Pydev

I am trying to debug a jython script which runs via a java project. I have installed pydev in my eclipse IDE and I followed these instructions(http://www.pydev.org/manual_adv_remote_debugger.html). when I am running the java app while python debug server is running debugger recognizes normally that the jython script is going to be executed halt the excecution and wait for step over or resume commands.
The problem is that PyEdit(editor window) does not highlight the lines which are executed. Also debugger does not know the breakpoints of the scripts. It seems like debugger can not correlate the running thread with the script file.
Is there any way to configure pydev server to correlate debugging with a specific file?

Debug in Eclipse while running from command line ubuntu

Is there a way I can debug my application (using breakpoints in eclipse) while running it from command line (ubuntu)? I'm using Eclipse Kepler version on Ubuntu 12.04LTS.
I know there's something like attach to process in .net, was wondering if eclipse has some such setup.
Thanks,
Is your application written in C or in Java?
If your application is in C and you are using CDT, you can attach to existing project by:
Run your application from terminal.
In Eclipse CDT, go to main menu "Run"->"Debug Configurations...", double-click "C/C++ Attach to Application" and press "Debug" (you should not need to specify executable and/or project).
For Java applications, see this

How to get the host OSGI console for Eclipse

I made an eclipse plugin. Testing it via "Run As -> Eclipse Application" works great. It always comes up with a console for me and I can interact with the OSGI shell from the eclipse that launched it. Now I want to try a test deploy where I put my plugin and its dependencies into the dropins folder of an eclipse distro. Once the application launches, how can I bring up the OSGI console so that I can interact with my plugin?
You should add the -console option to the launch arguments. Eg, something like this:
eclipse -console
Note that if -console is added to eclipse.ini, then it must appear before -vmargs.
See here for more information on Eclipse command line arguments.

How to cleanly stop m2e cargo:run from Eclipse?

Using the run mojo from the cargo-maven2-plugin I would like to know of a better way to shut down the container.
The console output says Ctrl+C to stop, but that seems to do nothing.
If I terminate, it leaves an orphan java.exe process that I have to kill myself.
Am I doing something wrong? This is a little cumbersome.
Edit: I am usign Tomcat in a standalone config. If I use embedded Jetty, naturally terminate works, however we need Tomcat.
The CTRL+C thing seems to be a known Eclipse/Jetty issue. The last post says that issuing mvn cargo:stop would stop an already running container, however it doesn't work for meā€”albeit, I've only made some quick test a with an archetype generated webapp.
Using Eclipse Indigo Service Release 1 (20110916-0149) if I issue mvn cargo:run and wait for the container to boot (for now it's Jetty, no configurations; let's see if you can get it working like this) clicking on the big red Terminate button kills the running process and no lingering java{,w}.exe are left behind.
I don't know how do you issue mvn cargo:run from Eclipse right now, but maybe you're using it as an External Tool (and that's why a process is left behind). If you have m2eclipse installed you should create Maven run configurations for it like this:
Run --> Run Configurations --> Maven build --> right click --> New
It should be straightforward from here on.
(I've found two Eclipse bug tickets (here and here) that seems to be related to Eclipse's inability to read a healthy CTRL+C via it's console.)
I've verified that when I'm starting an external Tomcat (7.0.23) instance with mvn cargo:run from Eclipse via the m2e plugin (after the container have started) CTRL+C indeed doesn't work.
After this I've ran mvn cargo:run from my Cygwin console. The result was the same.
Finally I've tried it from Windows's cmd and it worked.
My guess is that this is a bug in the cargo-maven-plugin.
Running mvn cargo:stop from either Eclipse or Cygwin did the trick for me.
You can run the cargo plugin from Eclipse by creating a Maven build Run or Debug configuration in Eclipse.
In general if you run Cargo using an Eclipse Maven launcher in DEBUG mode (i.e. Debug as --> Maven build...), killing the process on the Eclipse console (the red button) doesn't leave any orphan process...
I don't know why, but it works :) At least on my workspace