A VS Code extension for Windows that lists all running Java processes via jps -v,
and for Tomcat processes specifically shows the CATALINA_BASE folder and
HTTP port. You can stop any process directly from the tree view.
Features
- Tree view ("Java Processes" in the Activity Bar) listing every process from
jps -v. - Tomcat processes (main class
Bootstrap) are auto-detected and show:- Folder name (from
-Dcatalina.base, e.g.tomcat-8080) - HTTP port (read from that folder's
conf/server.xml, ignoring the AJP connector and ignoring the JPDA debug port from-agentlib:jdwp=...,address=NNNN)
- Folder name (from
- Stop Process — runs
taskkill /PID <pid> /Fafter a confirmation prompt. - Open Tomcat Folder — reveals
CATALINA_BASEin Windows Explorer. - Copy PID / Copy Full Command Line to clipboard.
- Manual refresh button, or optional auto-refresh on an interval.
- Hover tooltip shows full command line and resolved details.
Requirements
- A JDK's
binfolder (containingjps.exe) must be onPATH, or setjpsViewer.jpsPathin Settings to the full path, e.g.:C:\Program Files\Java\jdk-17\bin\jps.exe - Windows (uses
taskkillto stop processes).
Settings
| Setting | Default | Description |
|---|---|---|
jpsViewer.jpsPath |
jps |
Path to the jps executable |
jpsViewer.autoRefreshInterval |
0 |
Seconds between auto-refreshes; 0 disables |
Running / Developing
npm install
npm run compile
Then press F5 in VS Code (with this folder open) to launch an Extension Development Host with the extension loaded.
Packaging a .vsix to install
npm install -g @vscode/vsce
vsce package
This produces jps-tomcat-viewer-0.0.1.vsix. Install it via:
code --install-extension jps-tomcat-viewer-0.0.1.vsix
or through the Extensions view's "Install from VSIX..." command.
Notes / limitations
- Tomcat's HTTP port is not in
jps -voutput directly — the value after-agentlib:jdwp=...address=NNNNis the remote-debug port, not the HTTP port. This extension reads the real port fromconf/server.xmlinCATALINA_BASE(falling back toCATALINA_HOMEif needed). - If
CATALINA_BASE/CATALINA_HOMEpaths contain spaces, the simple-D...=parsing here (which splits on whitespace) may not extract them correctly, since JVM args generally aren't quoted injps -voutput. This is uncommon for Tomcat installs but worth knowing. - Stopping a process is a hard
taskkill /F(equivalent to killing the JVM). Tomcat won't get a chance to run shutdown hooks. A gracefulcatalina.bat stopoption could be added later if needed.