Fails to build fx version

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
venture
Posts: 5
Joined: Wed Sep 23, 2015 3:06 am
antibot: No, of course not.

Fails to build fx version

Post by venture » Wed Sep 23, 2015 12:47 pm

I am back to using JFreeChart after a long absence!
I wanted to use JavaFx version so I have downloaded 1.0.19 and run the ant for build-fx.xml but get errors.
Any hints or should I wait for JFreeChart 1.0.20?

Using Java 1.8.0_u60 on win 10 64 bit
ERROR MESSAGE:
C:\jfreechart-1.0.19>ant -f ant/build-fx.xml
Buildfile: C:\jfreechart-1.0.19\ant\build-fx.xml

initialise:

compile:
[javac] Compiling 629 source files to C:\jfreechart-1.0.19\build
[javac] C:\jfreechart-1.0.19\source\org\jfree\chart\fx\ChartViewer.java:122: error: getUserAgentStylesheet() in ChartViewer cannot override getUserAgentStylesheet() in Region
[javac] protected String getUserAgentStylesheet() {
[javac] ^
[javac] attempting to assign weaker access privileges; was public
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error

BUILD FAILED
C:\jfreechart-1.0.19\ant\build-fx.xml:62: Compile failed; see the compiler error output for details.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Fails to build fx version

Post by david.gilbert » Wed Sep 23, 2015 3:48 pm

If you change the method "protected String getUserAgentStylesheet()" to public it should build OK. It came about because of a non-backward compatible change in the JavaFX API.

I will try to bundle up a 1.0.20 release so that this works out-of-the-box.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

venture
Posts: 5
Joined: Wed Sep 23, 2015 3:06 am
antibot: No, of course not.

Re: Fails to build fx version

Post by venture » Thu Sep 24, 2015 2:22 am

yes, that fixed the build.
Onwards!
Thanks

digitalarcsystems
Posts: 1
Joined: Mon Apr 10, 2017 2:27 pm
antibot: No, of course not.

Re: Fails to build fx version

Post by digitalarcsystems » Mon Apr 10, 2017 2:29 pm

I just wanted to let you know that I ran into this problem as well.

Thanks.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Fails to build fx version

Post by david.gilbert » Tue Apr 11, 2017 5:48 am

Just for info I am working on new releases where the JavaFX support will be moved into a separate project. In the end it will make things simpler:

https://github.com/jfree/jfreechart-fx
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked