0

I am running a simple java client through java <class file> command. The java command is actually invoked by a system process. This is on Unix.

We were facing problem with X11 Display. So we added export DISPLAY=:0.0 in the startup file and the Display problem was resolved. Now when the export DISPLAY=:0.0 line is removed from the startup file and the java client is run again, we are not able to revert to old state, i.e., we no longer get the X11 Display error. So there is something that is persisting on the system. Is there any way to make sure the JVM context was killed before running the client?

We have killed the process that triggers the java client, then restarted the process to run the java client again. But not succeeded to go back to the old state.

[Edit] I forgot to mention that I have already tried "unset DISPLAY" in the stop file. The startup fie is run when the environment is brought up and the stop file is run when the environment is brought down. I have also tried headless mode but that doesn't work for our program.

4

2 に答える 2

3

以前に現在のシェルで (起動ファイルからでも) export コマンドを実行したことがある場合、値は環境にあります。設定を解除する (またはクリーンな環境で新しいシェルを取得する) ことが、環境設定を取り除く唯一の方法です。

起動スクリプトに $DISPLAY をエコーする行を追加することをお勧めします。これにより、問題のトラブルシューティング中に現在設定されている内容が明確になります。

プロセスが xwindows ディスプレイを実際に必要としない場合は、JVM をヘッドレス モードで起動する必要があります。詳細はこちら

于 2009-02-12T18:30:07.017 に答える
2

シェルで DISPLAY 環境を設定している可能性があります。「export DISPLAY=」または「unset DISPLAY」と入力してみてください。

于 2009-02-12T18:12:00.023 に答える