Skip to Main Content

Japanese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jre7update2以降のバージョンでGraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();の不具合がある

user8053341Oct 16 2014 — edited Oct 16 2014

windows7/windows8 64bitで32bitJREを実行(WOW64)でサブディスプレイ(displaylink)を使用した環境で下記のサンプルで、実行すると

WEBSTART(JNJP)では、起動後のディスプレイデバイスの変更をしても最新の情報が取得できません。

何か対応可能な実装方法がやAPIがあるのかもしれませんが、JAVA7update2まではうまくいっていました。

また、WEBSTARTでなく、ECLIPSEからの実行でもOKで、WEBSTARTのみでNGになります。

JAVA BUG DATABASE へ投稿したいのですが、私が英語は堪能ではないのでどなたかこの問題を報告してもらえるとありがたです。

---

SAMPLE Surce

GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
sb.append("\n getScreenDevices().length = "+devices.length);

// 2台にしても起動時が1のままでになる。
if (devices.length >= 1) {
  for (int i = 0; i < devices.length; i++) {
   GraphicsDevice aGraphicsDevice = devices[i];
   String strID= aGraphicsDevice.getIDstring();
   int intWidth = aGraphicsDevice.getDisplayMode().getWidth();
   int intHeight = aGraphicsDevice.getDisplayMode().getHeight();
   sb.append("\n "+i+":"+strID+" :    Width= "+intWidth+ " Height= "+intHeight);
   GraphicsConfiguration gc = aGraphicsDevice.getDefaultConfiguration();
   Point point = gc.getBounds().getLocation();
   sb.append(" point.x = "+point.x+ " y= "+point.y);
   System.out.printf("is_Online: display %d width  %d height %d bounds: posX %d posY %d \n",
     i, intWidth,intHeight,point.x,point.y  );
   }
  }
}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2014
Added on Oct 16 2014
0 comments
1,206 views