Here is the output of top
command
There is a process called java uses excessively high cpu. And the pid changes all the time. This is really annoying because it make the fan of the laptop noisy even when I run no apps.
So how to forbid this process from running? Thanks.
If I kill the process, a new process with name java but new pid creates. I want to forbid it from running.
Here is the output of top
command
There is a process called java uses excessively high cpu. And the pid changes all the time. This is really annoying because it make the fan of the laptop noisy even when I run no apps.
So how to forbid this process from running? Thanks.
If I kill the process, a new process with name java but new pid creates. I want to forbid it from running.
Share Improve this question asked Nov 20, 2024 at 7:51 Liang XiaoLiang Xiao 1,5162 gold badges14 silver badges21 bronze badges1 Answer
Reset to default 0Find the Parent Process
• Use the pstree or ps command to trace the parent process: pstree -p | grep java Disable the Parent Process
• If it’s a service, disable it: sudo systemctl stop <service_name> sudo systemctl disable <service_name> • If it’s a cron job, check and remove the job: crontab -e
Block Java Execution
• Locate the Java executable:
which java
Rename or restrict permissions to prevent it from running:
sudo chmod 000 /path/to/java
Windows
Locate the Source of the Java Process
• Open Task Manager (Ctrl + Shift + Esc). • Go to the Details tab, find java.exe, right-click, and select Open File Location. • Check which application or script is launching it.
Disable Startup Programs
• Press Win + R, type msconfig, and go to the Startup tab. • Disable any Java-related startup programs.
Stop Services
• Open Services: • Press Win + R, type services.msc, and press Enter. • Look for any Java-related services, right-click, and select Stop, then set the startup type to Disabled.
Prevent Java from Running
• Rename java.exe: • Navigate to its directory (found in Step 1) and rename it to something like java_disabled.exe. • Alternatively, use Group Policy to block it: • Press Win + R, type gpedit.msc, and navigate to:
Computer Configuration > Administrative Templates > System > Don't run specified Windows applications