jps 顯示有問題 解決方法
Jps 是java提供的查看java進程的工具,但是最近發現有問題具體情況是
比如我用jps命令查看,正常情況會列出如下信息: <進程號1111> …… <進程名A> <進程號2222> …… <進程名B> <進程號3333> …… <進程名C> <進程號4444> …… <Jps> 這時用kill -9 <進程號> 是可以殺掉進程的; 但是現在我的情況是: <進程號11111> …… process information unavailable <進程號4444> …… <Jps> <進程號22222> …… process information unavailable <進程號44444> …… process information unavailable <進程號1111> …… <進程名A> <進程號55555> …… process information unavailable <進程號66666> …… process information unavailable <進程號2222> …… <進程名B> <進程號77777> …… process information unavailable <進程號88888> …… process information unavailable <進程號33333> …… process information unavailable <進程號3333> …… <進程名C> <進程號99999> …… process information unavailable
解決方法: 1:Linux/windows 下的 目錄不同 ,windows下是 C:\Users\EZHAYOG\AppData\Local\Temp\hsperfdata_[user_name] 。 這裏是區分大小寫的,但是windows不區分大小寫 。也就是說 同樣是 user 以及 USER都可以用來登錄。但是對於java不一樣 。所以來說當你切換用戶名的大小寫的時候會有問題 2:解決方法很簡單 。首先關閉所有java程序,然後刪除C:\Users\EZHAYOG\AppData\Local\Temp\hsperfdata_[user_name] 這個目錄。 再從新運行就可以了