Skip to content

Can jfreechart 1.5.3 be used with jlink to create a self contained executable? #374

Answered by AlexHomebrew
AlexHomebrew asked this question in Q&A
Discussion options

You must be logged in to vote

I created a Hack that allowed me to build with jlink and include JFreeChart-1.5.3.

  1. Download the source code into a new Netbeans project called JFreeChart.
  2. Create a new file: JFreeChart/src/main/java/module-info.java containing the following
module jfreechart
{
    requires java.desktop;
    requires java.logging;
    requires java.sql;

    exports org.jfree.chart;
    exports org.jfree.chart.axis;
    exports org.jfree.chart.plot;
    exports org.jfree.chart.renderer.xy;
    exports org.jfree.chart.ui;
    exports org.jfree.data.time;
}
  1. Remove the package (and contents) org.jfree.chart.servlet
  2. Add requires jfreechart; to my project's module-info.java

JLink now is happy and builds th…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@trashgod
Comment options

@AlexHomebrew
Comment options

Answer selected by AlexHomebrew
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants