Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
こんにちは、Java スイング アプリケーションを作成しました。そのアプリケーションを実行すると、正しく実行され (フレームが作成され)、プロセス ID に関連付けられます。そのアプリケーションが実行されているときに、プロセスIDを使用してそのフレームを見たい
ありがとうスニル・クマール・サフー
走る
String pid = new BufferedReader(new InputStreamReader( Runtime.getRuntime().exec("perl -e 'print getppid()'").getInputStream() )).readLine();;
これはJavaプロセスのPIDを返しますが、perlがインストールされている場合に限ります