Skip to content
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

There is something wrong when #14

Closed
ShiningBoy opened this issue Jun 10, 2015 · 1 comment
Closed

There is something wrong when #14

ShiningBoy opened this issue Jun 10, 2015 · 1 comment

Comments

@ShiningBoy
Copy link

I run the following code in eclipse, i am sure i have include the jmathplot.jar :
double[] x = { 1.0, 2.0, 3.0 };
double[] y = { 4.0, 5.0, 6.0 };
// create your PlotPanel (you can use it as a JPanel)
Plot2DPanel plot = new Plot2DPanel();

    // add a line plot to the PlotPanel
    plot.addLinePlot("my plot", x, y);

    // put the PlotPanel in a JFrame, as a JPanel
    JFrame frame = new JFrame("a plot panel");
    frame.setContentPane(plot);
    frame.setVisible(true);

Then comes the error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/math/io/StringPrintable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.math.plot.canvas.PlotCanvas.(PlotCanvas.java:491)
at org.math.plot.canvas.Plot2DCanvas.(Plot2DCanvas.java:25)
at org.math.plot.Plot2DPanel.(Plot2DPanel.java:31)
at cn.hhj.Test.main(Test.java:14)
Caused by: java.lang.ClassNotFoundException: org.math.io.StringPrintable
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more

I can't figure it out, and i can't find the org.math.io.StringPrintable Class, please help me~~~

@yannrichet
Copy link
Owner

you also need the jmathio.jar dependancy. (see the pom.xml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants