How to query java path in linux

Mar 21, 2023 am 09:42 AM
linux java

How to query the java path in Linux: 1. Check the relative path through the ps and top commands; 2. Check the absolute path of the directory where java is running, that is, "pos_service.jar" by executing the "ll /proc/PID" command. .

How to query java path in linux

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

How to query the java path in Linux?

linux Check the directory where java is running

When checking the process information through the ps and top commands, only the relative path can be found, and the detailed information of the process cannot be found

You need to check the absolute path of pos_service.jar (in which directory it is located). Use: ll /proc/PID

Linux is starting When there is a process, the system will create a folder named after PID under /proc. Under this folder, there will be information about our process, including a file named exe, which records the absolute path, through ll or ls You can view it with the -l command.

ll /proc/PID
Copy after login

cwd symbolic link is the process running directory;

exe symbolic link is the absolute path to execute the program;

cmdline is the command line command entered when the program is running;

environ records the environment variables when the process is running; the

fd directory is the symbolic link of the file opened or used by the process.

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to query java path in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

deepseek web version entrance deepseek official website entrance deepseek web version entrance deepseek official website entrance Feb 19, 2025 pm 04:54 PM

deepseek web version entrance deepseek official website entrance

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

How to install deepseek

Break or return from Java 8 stream forEach? Break or return from Java 8 stream forEach? Feb 07, 2025 pm 12:09 PM

Break or return from Java 8 stream forEach?

BITGet official website installation (2025 beginner's guide) BITGet official website installation (2025 beginner's guide) Feb 21, 2025 pm 08:42 PM

BITGet official website installation (2025 beginner's guide)

Java Made Simple: A Beginner's Guide to Programming Power Java Made Simple: A Beginner's Guide to Programming Power Oct 11, 2024 pm 06:30 PM

Java Made Simple: A Beginner's Guide to Programming Power

Create the Future: Java Programming for Absolute Beginners Create the Future: Java Programming for Absolute Beginners Oct 13, 2024 pm 01:32 PM

Create the Future: Java Programming for Absolute Beginners

Java Program to Find the Volume of Capsule Java Program to Find the Volume of Capsule Feb 07, 2025 am 11:37 AM

Java Program to Find the Volume of Capsule

Ouyi okx installation package is directly included Ouyi okx installation package is directly included Feb 21, 2025 pm 08:00 PM

Ouyi okx installation package is directly included

See all articles