Page 1 of 1

java fx and transition to java 7

PostPosted: 25 Apr 2013, 23:51
by Max mtg
It's a known problem that swing leaks memory dealing with images, behaves in an unpredictable way when accessed from other threads than EDT and is becoming an outdated technology in general.

I suggest that we should use a newer UI framework for batlefield that is expected to consume less memory and be able to use modern videoboards where avaliable. That is Java FX 2.2 from Oracle.
It is also said to fire exceptions whenever programmer tries to use ui components from a wrong thread.
It allows to embed javafx scenes onto swing components, so it can be applied to a few areas to start with.

I haven't seen it before, but want to give it a try as soon as I return from a vacation (this Sunday through May 6). Thus in case of success we'll need to upscale the required jre version to 7 to support the new components.

What do you think of this?

Re: java fx and transition to java 7

PostPosted: 03 May 2013, 12:00
by Chris H.
Max mtg wrote:I haven't seen it before, but want to give it a try as soon as I return from a vacation (this Sunday through May 6). Thus in case of success we'll need to upscale the required jre version to 7 to support the new components.

What do you think of this?
 
I updated to java 7 a few weeks ago so this won't be a problem for me.

There may be some people in our user base that may have an issue in that they might be stuck at java 6 for some reason.

Re: java fx and transition to java 7

PostPosted: 03 May 2013, 12:19
by friarsol
It probably would be fine to ugprade Forge to Java 7 requirements. But we should probably give two release notices that it's coming.

Announce now that sometime soon in the future Java 7 will be required to improve performance. Announce when the last release that support Java 6 is out, etc.

Re: java fx and transition to java 7

PostPosted: 17 May 2013, 22:32
by Sloth
Eclipse is complaining that the following expression is Java 7 only:

Code: Select all
List<String> unused = new ArrayList<>(4);
I can't compile without changing my project compliance and JRE to Java 7.

Re: java fx and transition to java 7

PostPosted: 18 May 2013, 05:30
by Max mtg
Sloth wrote:Eclipse is complaining that the following expression is Java 7 only:

Code: Select all
List<String> unused = new ArrayList<>(4);
I can't compile without changing my project compliance and JRE to Java 7.
I am sorry.
My environment is switched to use compiler from jdk 7 but still targets jre 6. Eclipse didin't mark this as an error.
If there is an obvious error, feel free to correct it and commit.

I have updated the file in r21510.

Re: java fx and transition to java 7

PostPosted: 18 May 2013, 11:21
by Chris H.
I had noticed a similar problem on my system. Thank you Max for fixing this. :)

Turns out that I still have the Java 6 JDK installed on my iMac. My new insulin pump requires a functioning java web plugin and Apple had disabled this in their Java 6 JDK.

I had followed instructions for installing the Oracle based java 7 JRE but this apparently gave me a mixture of a Java 6 JDK with the java 7 java web plugin. It works for my insulin pump but it looks like I need to eventually update to the Java 7 JDK.

At some point it looks like we will also have to change the project compliance over to java 7.

Re: java fx and transition to java 7

PostPosted: 18 May 2013, 15:36
by mark
I use Java 7 (7 and only 7, no 6) since two years and never had major problems with forge. I also use the svn sources of forge and update daily; the only problem so far is low (but bearable) battlefield performance, especially while arrows are on the screen.
A friend of mine tried the newer versions and even if nothing is on the board, the performance there is devastating (changing phases needs nearly a second each). If you want to change because of Java FX, I think that will be fine for us :D

Re: java fx and transition to java 7

PostPosted: 29 May 2013, 07:25
by Agetian
This is a welcome transition and sounds like a good plan overall. I have no objections whatsoever and I'm all for it. Also, I've updated to Java 7 a long time ago and can confirm that Forge is working very well with Java 7 on both Windows and Linux.

- Agetian