我创建了一个使用JACOB生成Word文件的应用程序.哪个适合我.
但现在我们不得不将工作站迁移到Citrix.现在应用程序非常慢.我发现生成Word文件的时间最多(尤其是创建ActiveXComponent)
在我的开发人员PC上用新的ActiveXComponent(APP_ID_WORD)创建ActiveXComponent; 需要大约300毫秒.在Citrix下,它需要3秒(仅用于创建ActiveXComponent),另外需要600-700ms才能打开文档.
如果我通过双击打开一个word文件,它需要大约1.5-2秒,直到它完全打开!
任何建议如何使这更快?(或者它完全受到Citrix环境的限制.)
如果所有者最小化,为什么javafx中的对话(警报)未正确显示.
看下面的代码:
public class JavaFxSample2 extends Application {
@Override
public void start(Stage primaryStage) throws InterruptedException, ExecutionException {
primaryStage.setTitle("open alert in 2 seconds");
Pane pane = new Pane();
Button b = new Button("open dialog");
b.setOnMouseClicked(event -> {
Task<Void> task = new Task<Void>() {
@Override
protected Void call() throws Exception {
Thread.sleep(2000);
return null;
}
};
task.stateProperty().addListener((observable, oldValue, newValue) -> {
if (newValue == State.SUCCEEDED) {
Alert alert = new Alert(AlertType.INFORMATION, "Hello");
alert.initOwner(primaryStage);
alert.showAndWait();
}
});
Thread thread = new Thread(task);
thread.start(); …Run Code Online (Sandbox Code Playgroud)