我将Java版本从Java 8切换到Java 11,似乎在Java 11中从JDK bin文件夹中删除了Javah,然后才在pom.xml中执行javah命令,如下所示
<execution>
<id>javah</id>
<goals>
<goal>exec</goal>
</goals>
<phase>compile</phase>
<configuration>
<executable>javah</executable>
<arguments>
<argument>-classpath</argument>
<argument>${project.build.outputDirectory}</argument>
<argument>-d</argument>
<argument>${build.path}/include</argument>
</arguments>
</configuration>
</execution>
Run Code Online (Sandbox Code Playgroud)
由于Javah已从JDK 11中删除,如何在pom中将上述javah命令替换为javac -h以与Java 11一起使用
我得到的错误是
无法在项目myProject上执行目标org.codehaus.mojo:exec-maven-plugin:1.6.0:exec(javac -h):命令执行失败。:进程退出,错误:2(退出值:2)
任何的想法?谢谢
我正在eclipse 2019-09中在docker内部运行swtbot测试,如果我使用eclipse 2019-09从主机上运行它们,则测试运行正常,但是当我在docker中运行它们时,出现以下错误
!SESSION 2019-11-12 20:17:58.723 ----------------------------------------
-------
eclipse.buildId=unknown
java.version=11.0.5
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -swtbot -suite C:/testrun/NIGHTLY -application
org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication -product
org.eclipse.platform.ide -testApplication
C:/tmp/eclipse/plugins/org.eclipse.ui.ide.workbench -testPluginName
ui.test -className ui.test.collection.BasicTests
Command-line arguments: -swtbot -suite C:/testrun/NIGHTLY -application
org.eclipse.swtbot.eclipse.junit.headless.swtbottestapplication -product
org.eclipse.platform.ide -testApplication
C:/tmp/eclipse/plugins/org.eclipse.ui.ide.workbench -data
C:/tmp/eclipse/workspace -testPluginName ui.test -className
ui.test.collection.BasicTests -debug -clean
!ENTRY org.eclipse.osgi 4 0 2019-11-12 20:18:27.576
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:4737)
at org.eclipse.swt.SWT.error(SWT.java:4626)
at org.eclipse.swt.SWT.error(SWT.java:4597)
at org.eclipse.swt.widgets.Widget.error(Widget.java:452)
at org.eclipse.swt.widgets.TaskBar.createHandle(TaskBar.java:75)
at org.eclipse.swt.widgets.TaskBar.<init>(TaskBar.java:68)
at org.eclipse.swt.widgets.Display.getSystemTaskBar(Display.java:2512) …Run Code Online (Sandbox Code Playgroud) 我有一个复合(容器)在另一个复合(对话区域)内.容器包含一些UI元素.如何使对话框的大小更大或使其可调整大小.这是我的代码
protected Control createDialogArea(Composite parent) {
setMessage("Enter user information and press OK");
setTitle("User Information");
Composite area = (Composite) super.createDialogArea(parent);
Composite container = new Composite(area, SWT.NONE);
container.setLayout(new GridLayout(2, false));
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Label lblUserName = new Label(container, SWT.NONE);
lblUserName.setText("User name");
txtUsername = new Text(container, SWT.BORDER);
txtUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
txtUsername.setEditable(newUser);
txtUsername.setText(name);
return area;
}
Run Code Online (Sandbox Code Playgroud) 我有 2 个插件可以说
Plugin A
Plugin B
Run Code Online (Sandbox Code Playgroud)
插件 A 依赖于插件 B 并且 A 有首选项页面
内部插件 BI 也希望拥有 A 的偏好存储
当我打电话
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
Run Code Online (Sandbox Code Playgroud)
从插件 B 获取 A 的存储,我检测到循环,因为 A 依赖于 B 而 B 也依赖于 A 来获取偏好存储
有什么办法可以在插件 B 中获得 A 的偏好存储吗?