有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

EclipseIDE的Java命令行参数

我已经从Eclipse4.4.2更新到4.7.3,新版本看起来比旧版本(字体和图形)更大。我已经在Windows中“放大”了我的分辨率,但这从未对Eclipse产生影响。我知道Java9(及更高版本)“包括”Windows升级,但我使用的是Java8。Eclipse的新版本似乎受到Windows升级的影响

是否可以使用命令行参数-Dsun启动Eclipse。java2d。uiScale=1.0以抑制新的缩放? 我曾尝试在eclipse开始时设置此参数,但以下操作不起作用:

eclipse.exe -vm -Dsun.java2d.uiScale=1.0 C:\jdk1.8.0_172\bin\javaw -vmargs -Xms1024m -Xmx1024m
eclipse.exe -Dsun.java2d.uiScale=1.0 -vm C:\jdk1.8.0_172\bin\javaw -vmargs -Xms1024m -Xmx1024m

我搜索了很多,但只找到了如何从eclipse应用程序(运行菜单)修改命令行参数的描述,但我不想设置应用程序的运行选项。我想从eclipse本身设置开始选项

是否可以应用参数-Dsun。java2d。Eclipse IDE上的uiScale=1.0


共 (1) 个答案

  1. # 1 楼答案

    EclipseUI使用SWT,因此java2d设置不相关

    swt.autoScale环境变量控制SWT缩放。这方面的JavaDoc说:

    System property that controls the autoScale functionality.

    • false: deviceZoom is set to 100%
    • integer: deviceZoom depends on the current display resolution, but only uses integer multiples of 100%. The detected native zoom is generally rounded down (e.g. at 150%, will use 100%), unless close to the next integer multiple (currently at 175%, will use 200%).
    • integer200: like integer, but the maximal zoom level is 200%.
    • quarter: deviceZoom depends on the current display resolution, but only uses integer multiples of 25%. The detected native zoom is rounded to the closest permissible value.
    • exact: deviceZoom uses the native zoom (with 1% as minimal step).
    • <value>: deviceZoom uses the given integer value in percent as zoom level.

    The current default is "integer200".

    所以-Dswt.autoScale=xxxxx是您使用的