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

Even the example didn't work? #16

Closed
wamson opened this issue Jun 26, 2015 · 14 comments
Closed

Even the example didn't work? #16

wamson opened this issue Jun 26, 2015 · 14 comments

Comments

@wamson
Copy link

wamson commented Jun 26, 2015

I run your example "LinePlotExample" in eclipse. But it comes out a error that "Exception in thread "main" java.lang.NoClassDefFoundError: org/math/io/StringPrintable". help!!!
qq 20150626212808

qq 20150626212414

@siathalysedI
Copy link

You have to include jmathio.jar https://github.com/yannrichet/jmathio

Note. Even this fix won't work; you will have to recreate the jar with icons folder from the source.

@wamson
Copy link
Author

wamson commented Jul 6, 2015

Oh, how to recreate the jar with icons folder from the source?

@skipperguy12
Copy link

I'm sure this is related to me not "recreating the jar with icons folder from the source".
I have this issue (after including jmathio as a maven dependency).

Exception in thread "main" java.lang.NullPointerException
    at javax.swing.ImageIcon.<init>(ImageIcon.java:217)
    at org.math.plot.components.PlotToolBar.<init>(PlotToolBar.java:61)
    at org.math.plot.PlotPanel.addPlotToolBar(PlotPanel.java:149)
    at org.math.plot.PlotPanel.<init>(PlotPanel.java:59)
    at org.math.plot.PlotPanel.<init>(PlotPanel.java:67)
    at org.math.plot.Plot2DPanel.<init>(Plot2DPanel.java:31)
    at online.InitialData.plotData(InitialData.java:15)
    at online.TestGradDescent.main(TestGradDescent.java:10)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Please explain how I can fix this. Thanks!

@wamson
Copy link
Author

wamson commented Jul 8, 2015

I have the same problem as "skipperguy12".
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.(ImageIcon.java:217)
at org.math.plot.components.PlotToolBar.(PlotToolBar.java:61)
at org.math.plot.PlotPanel.addPlotToolBar(PlotPanel.java:149)
at org.math.plot.PlotPanel.(PlotPanel.java:59)
at org.math.plot.PlotPanel.(PlotPanel.java:67)
at org.math.plot.Plot2DPanel.(Plot2DPanel.java:31)
at online.InitialData.plotData(InitialData.java:15)
at online.TestGradDescent.main(TestGradDescent.java:10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

@yannrichet
Copy link
Owner

might be due to maven, not copying .png files in the jar, unlike ant. Probably need to move .png files in the src/main/resources/... directory. Let me some time to check that.

@yannrichet
Copy link
Owner

fixed in last push.

@PaulojsGoncalves
Copy link

I place last version of jmathplot.jar with fix #16 into libraries of my project using Netbeans IDE. The method Plot2DPanel was now recognized but when I run project next exception was thrown:

Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.(ImageIcon.java:217)
at org.math.plot.components.PlotToolBar.(PlotToolBar.java:61)
at org.math.plot.PlotPanel.addPlotToolBar(PlotPanel.java:149)
at org.math.plot.PlotPanel.(PlotPanel.java:59)
at org.math.plot.PlotPanel.(PlotPanel.java:67)
at org.math.plot.Plot2DPanel.(Plot2DPanel.java:31)
at runningactivitiesannalyser.PlotRunningData.plotgraph(PlotRunningData.java:38)
at runningactivitiesannalyser.RunningActivitiesAnnalyser.main(RunningActivitiesAnnalyser.java:55)
Java Result: 1

How can I solve the problem and use this method?

Thank you!

@yannrichet yannrichet reopened this Jul 17, 2015
@yannrichet
Copy link
Owner

Could you please check that .png files are located inside the jar file ?
Thx

@PaulojsGoncalves
Copy link

There are no .png files inside jar fie. Only java classes can be found into jar.

@wamson
Copy link
Author

wamson commented Jul 19, 2015

oh, I put the latest source file into eclipse and export them as Jar. And then it works.
qq 20150719131410
qq 20150719131548

@yannrichet
Copy link
Owner

Ok, so I expect it is ok now. For those who still have problems, please cleanup your jar and rebuild from scratch.

@isnopitag
Copy link

Well for the error of the icons download this .jar
and dont forget to include jmathio.jar https://github.com/yannrichet/jmathio

Link for the new jar ✌️
http://www.mediafire.com/download/wa3g3jfs6hv6aif/jmathplot.jar
Sorry for the mediafire link, I still no0b on Github ✌️

@rayryeng
Copy link

@isnopitag Cheers. I didn't want to rebuild the source again. Thanks so much for making the JAR available!

@rodanmuro
Copy link

I have the same problem
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.(ImageIcon.java:217)
at org.math.plot.components.PlotToolBar.(PlotToolBar.java:61)
at org.math.plot.PlotPanel.addPlotToolBar(PlotPanel.java:149)
at org.math.plot.PlotPanel.(PlotPanel.java:59)
at org.math.plot.PlotPanel.(PlotPanel.java:67)
at org.math.plot.Plot2DPanel.(Plot2DPanel.java:31)
at graficasjava.GraficasJava.main(GraficasJava.java:21)
I download the last .jar and nothing
Any help? Thanks

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

8 participants