I'm starting a java program from IntelliJ Idea which uses a .dll
which is written by me in C++. After the startup of the application I can attach to the process using Microsoft Visual Studio (Debug / Attach to Process...) which allows me to debug the C++ part of the running application.
The name of the process is simply java
. It is always a pain to select the right one from all the java
processes. The simple Task Manager is not sufficient. The Process Explorer is good, but I still need to inspect multiple processes until I find the right one. It would be much easier for me if Idea would just tell the PID of the application it started.
Does Idea have such a feature?
(Win 7 64bit fresh @ 2017-04-19, Idea 2017.1.1)
You can use the jps utility that is included in the JDK to find the process id of a Java process. The output will show you the name of the executable JAR file or the name of the main class. jps tool is now included in JDK/bin directory.
Use Windows Task manager, go to 'processes' tab to locate your java process and get the process id. If the process id column does not show up, you will have to click on 'View -> Add Columns' and select PID.
Run tool window The Run tool window displays output generated by your application. If you are running multiple applications, each one is displayed in a tab named after the run/debug configuration applied. If you re-run an application, the new output overwrites the contents of the tab.
Do Cmd + F12 + Fn Key on mac in IntelliJ if clicking Cmd + F12 starts. Show activity on this post.
You can list all java processes with the jps
utility (Can be executed from Idea terminal window) which makes it extremely easy to identify your process. Example scenario:
D:\projects\git\CENSORED>jps
12084
5476 WorkerMain
8772 WebSocketProxyMain
9444 Launcher
12920 RemoteMavenServer
13400 Bootstrap
7752 Jps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With