-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.out/err and jfxRun #29
Comments
Hi @embee1981 , first of all: thanks for using my gradle-plugin. The jfxRun-task uses the inheritIO-call of the ProcessBuilder, so you should see any output, which is done. To make sure you really are having "no output", please call |
Hiya, yeah I'm getting output when running via java -jar :-( Java version is 1.8.0_92 and Gradle is 3.0 (forgot to give some version info in first post) |
Hm .... that sounds strange ... but maybe because of gradle 3.0 ... |
Sure Simple IDE agnostic project attached :-) I'm on Windows 10, 64 bit version as well in case that's a factor. |
Thanks, will check it out now 👍 |
As gradle 3 now uses its daemons by default, this is the change that makes the output not being sent. I've added As this (again) is some problem with that daemon, I will have to take some time, finding a way to provide you with your information. Bug confirmed. |
Hi @embee1981, thanks for reporting this, it is a problem with the daemon-handling. I have found a way for telling gradle to print stdout and stderr to the normal output, the output recieved by the gradle-daemon is covered/mangled and it needs special adjustment for getting all that to the user. With gradle 3 the daemon is "used per-default", switching the personal setting (like mentioned in my answer before), does work, but disables the use of the daemon. I personally don't like that daemon, because it introduces another location for mistakes (especially when having buggy software which does not close threads or filehandles like in #12). A fix will be provided soon. |
Good news: buildscript {
dependencies {
classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.5.3-SNAPSHOT'
}
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
} |
Best fitting bug found on the gradle-project: |
Heya, still no joy with the new snapshot. I can use the disable daemon workaround in the meantime though :-) |
@embee1981 what do you mean with "joy"? The project you provided now does print the stdout and strerr when calling package com.test;
import javafx.application.Application;
import javafx.stage.Stage;
public class App extends Application{
@Override
public void start(Stage primaryStage) throws Exception {
System.out.println("Printing to sys out");
System.err.println("Printing to sys err");
// throw new RuntimeException("Throwing a runtime exception, should see stack trace");
System.exit(0);
}
public static void main(String... args) {
launch(args);
}
} Running gradle now does this output for me:
What problems do you still have now, maybe I can help further to locate this bug? |
I'm starting to realize, that there is no output .... hm ... only when having a problem?! Very strange ... will work on it... EDIT: hmpf ..... reminder to myself: when using gradle, make REALLY sure the daemon is running :( |
@embee1981 can you recheck? I have uploaded a new SNAPSHOT-version :) |
Awesome :-) Its printing now to the console with daemon running, good job! |
- fixes issue #30 - my first assumption, that it was a duplicate for #29, was wrong, because fix was only working on windows, seems that daemon or java ProcessBuilder works different when calling `inheritIO()` thanks to @toolforger for finding and reporting this ;) and to work with me together on it
Daft question but how do you get jfxRun to show output from System.out/err?
On running via this task, my app had an expected fatal crash and I get shown
I can't find build-log to see the stack trace from the exit and was wondering how I can get it to show all std out/err stuff to the gradle console?
The text was updated successfully, but these errors were encountered: