我在windows 10 pro上安装了docker.我在git-bash中运行以下命令时遇到了问题.
docker-compose up -d --build
并得到以下错误.
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
(23) Failed writing body
Error executing command, exiting
ERROR: Service 'web' failed to build: The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_8.x | bash' returned a non-zero code: 1
Run Code Online (Sandbox Code Playgroud)
任何帮助深表感谢.提前致谢.
我尝试定期在JavaFX应用程序后台线程中运行,这会修改一些GUI属性.
我想我知道如何使用Task和Service类,javafx.concurrent并且无法弄清楚如何在不使用Thread#sleep()方法的情况下运行这样的周期性任务.如果我可以使用一些Executor来自Executors制造方法(Executors.newSingleThreadScheduledExecutor())会很好
我试图Runnable每5秒运行一次,重启javafx.concurrent.Service但它会立即挂起,service.restart甚至service.getState()被调用.
所以最后我使用Executors.newSingleThreadScheduledExecutor(),它Runnable每隔5秒发射一次并使用以下命令Runnable运行另一个Runnable:
Platform.runLater(new Runnable() {
//here i can modify GUI properties
}
Run Code Online (Sandbox Code Playgroud)
它看起来非常讨厌:(有没有更好的方法来使用Task或Service类?
我正在使用Maven作为我的项目,并有以下问题:
我想在测试报告中看到我的JUnit测试的日志输出(log4j,System.out,等等).你知道如何实现这个目标吗?
谢谢 ;-)
我使用JavaFX 2.1并使用FXML创建了GUI,在我添加的GUI的控制器中myTextField.requestFocus();.
但我总是把焦点放在另一个控件上.
我试图改变javafx-2中TextArea的背景和文本颜色.
myComponent = new TextArea();
myComponent.setStyle("-fx-text-fill: white;");
myComponent.setStyle("-fx-background-color: black;");
myComponent.setStyle("-fx-font: " + GUIConstants.SysResponseFont.getName());
myComponent.setStyle("-fx-font-family: " + GUIConstants.SysResponseFont.getFamily());
myComponent.setStyle("-fx-font-size: " + GUIConstants.SysResponseFont.getSize());
myComponent.setStyle("-fx-font-weight: " + GUIConstants.SysResponseFont.getStyle());
Run Code Online (Sandbox Code Playgroud)
此TextArea中的颜色和字体均未设置.我必须使用不同的方法吗?
我正在尝试在javafx 2+中创建一个计划界面,我无法让TableView包含看起来像连接组件的TableCells.
我尝试的第一件事是使用背景颜色和边框,但是,我不能让顶部和底部之间的边框不同.
-fx-border-width: 1px, 0px, 0px, 0px; 顶部
-fx-border-width: 0px, 0px, 1px, 0px; 为了底部
理想情况下,我可以跨越列或行,但我知道它不适合控件的模型.任何帮助是极大的赞赏.
我升级到Windows 10的情况非常好,只需要重新安装几个程序.Java就是其中之一,因为Eclipse不再启动了:eclipse 64位没有运行但是32位运行了,我在64位机器上运行它.通过卸载并重新安装Java和JDK可以轻松解决这个问题.但是,仍有一个问题.
System.getProperty(" ... ") 返回下一个错误的值:
"os.name" = "Windows 8.1" 应该说 "Windows 10""os.version" = "6.3" 这也错了吗?这是Java的问题还是因为Windows 10是通过系统更新完成的,而我的系统在技术上仍然是"Windows 8.1"?
我在本网站和其他地方读过几个问题,表明安装Oracle JDK7时,没有必要在正确安装JDK时指定jfxrt.jar的类路径.不幸的是,我的安装似乎不正确,但我无法弄清楚出了什么问题.
我为我的Red Hat Enterprise Linux 6.2服务器使用了正确的RPM,当我将jfxrt.jar添加到External Jars时,我能够在Eclipse中构建JavaFX应用程序.但是当尝试从命令行编译和运行时,除非我为javac和java指定-cp选项,否则它找不到JavaFX类.服务器最初使用的是openjdk-1.6,但我使用了替代方法来配置javac和java以指向新安装的JDK.除了这个问题,它看起来工作正常.
我发现在尝试运行JavaFX Exporter时,同样的问题困扰着我.我试图导出一个在Eclipse中运行良好的项目.但是在尝试运行时找不到JavaFX类.我还没有弄清楚如何告诉导出器jfxrt.jar文件所在的位置.
作为参考,jfxrt.jar位于我系统上的/usr/java/jdk1.7.0_21/jre/lib/jfxtr.jar中.
我一直在用JavaFx粉碎我的脑袋......
这适用于没有运行应用程序的实例的情况:
public class Runner {
public static void main(String[] args) {
anotherApp app = new anotherApp();
new Thread(app).start();
}
}
public class anotherApp extends Application implements Runnable {
@Override
public void start(Stage stage) {
}
@Override
public void run(){
launch();
}
}
Run Code Online (Sandbox Code Playgroud)
但是,如果我new Thread(app).start() 在另一个应用程序中执行,我会得到一个例外,说明我不能进行两次启动.
此外,我的方法由另一个应用程序上的观察者调用,如下所示:
@Override
public void update(Observable o, Object arg) {
// new anotherApp().start(new Stage());
/* Not on FX application thread; exception */
// new Thread(new anotherApp()).start();
/* java.lang.IllegalStateException: Application launch must not be …Run Code Online (Sandbox Code Playgroud)