Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Stephen F Northover
...@oracle.com To: Kevin Rushforth kevin.rushfo...@oracle.com Cc: openjfx-dev@openjdk.java.net, Sandipan Razzaque m...@sandipan.net Date: 04/07/2014 09:43 PM Subject:Re: [RT-33954] static block...causes IllegalStateException - re-open? Sent by:openjfx-dev openjfx-dev-boun

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Kevin Rushforth
Hi, What you've discovered is exactly how the Java launcher is intended to work (we have unit tests that verify this fact). The launcher recognizes a JavaFX application by checking whether the class to be launched extends javafx.application.Application. So this isn't a side effect, but an

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Kevin Rushforth
: Richard Bair richard.b...@oracle.com To: Kevin Rushforth kevin.rushfo...@oracle.com Cc: openjfx-dev@openjdk.java.net, Sandipan Razzaque m...@sandipan.net Date: 04/07/2014 09:43 PM Subject:Re: [RT-33954] static block...causes IllegalStateException - re-open? Sent

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Kevin Rushforth
-33954] static block...causes IllegalStateException - re-open? Sent by:openjfx-dev openjfx-dev-boun...@openjdk.java.net Yes, this is one of the few things that I just hate about IDEA. On Apr 7, 2014, at 6:00 PM, Kevin Rushforth kevin.rushfo...@oracle.com wrote: I can't speak to other

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Sandipan Razzaque
Hi Kevin - Thanks for the clarification that this is indeed by design - and also for the workarounds. For Clojure, the solution looks a little inelegant and isn't idiomatic clojure - any import statement will effectively cause a class initialization to happen - so if you have any source files

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Jonathan Giles
I'll leave Kevin to speak to the specifics of the JavaFX startup process, but the argument against what you are doing in your final paragraph is that this causes everyone to pay the controls tax even when they don't make use of UI controls in their application. In particular, this loads the

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Sandipan Razzaque
Oh and for the record, the workaround for Clojure is to simply use workaround provided (new up a JFXPanel) within Java, and then invoke your Clojure entry point via the Java-Clojure APIhttps://github.com/clojure/clojure/blob/master/changes.md#21-java-api. This is what I meant by little inelegant

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-08 Thread Sandipan Razzaque
This makes perfect sense. I was scratching my head about this, but now it's clear as to why that code existed in the Control class in the first place. Thanks! - SR Sandipan Razzaque | www.sandipan.net On Wed, Apr 9, 2014 at 12:01 AM, Jonathan Giles jonathan.gi...@oracle.comwrote: I'll leave

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-07 Thread Jonathan Giles
Kevin, Yes, that is the program I used, and yes, I get the 'Toolkit not initialized' exception. I am running IntelliJ, so that is the reason. I switched over to Eclipse and the code run as expected. I am slightly bothered by the occasional failures that seem to be IntelliJ-specific. I have

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-07 Thread Kevin Rushforth
I can't speak to other IntelliJ issues, but the root cause of this particular one is the same thing that Debbie ran into last week -- IntelliJ doesn't launch programs using the standard Java launcher. For whatever reason, it uses its own launcher. This might be worth raising with JetBrains.

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-07 Thread Richard Bair
Yes, this is one of the few things that I just hate about IDEA. On Apr 7, 2014, at 6:00 PM, Kevin Rushforth kevin.rushfo...@oracle.com wrote: I can't speak to other IntelliJ issues, but the root cause of this particular one is the same thing that Debbie ran into last week -- IntelliJ doesn't

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-07 Thread Sandipan Razzaque
Kevin/Jonathan - Steve's example in the Jira captures perfectly what I was encountering in Java, and I've been trying to boil it down into a minimal failing example - reconciling it with what I've experienced in dynamic languages. Turns out it's about whether or not you extend Application. This

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-05 Thread Jonathan Giles
Firstly, I agree - this does seem to still be reproducible despite Kevin's comment that it should have been resolved in JavaFX 8.0 due to RT-28754 https://javafx-jira.kenai.com/browse/RT-28754, so that is troubling. I'll leave Kevin to comment on that. Secondly, RT-33954 was closed as a

Re: [RT-33954] static block...causes IllegalStateException - re-open?

2014-04-05 Thread Sandipan Razzaque
Hi Jonathan, Thanks for the fast response and the warm welcome :-) I've moved my comment into RT-28754, so let's await Kevin's input. Will work on a test class as the next thing as you've recommended. I received confirmation of the OCA being processed just yesterday, so should be OK from that