Question

Hi I have a java program which I need to auto-load LiveGraph and dynamically send data to the LiveGraph Plotter. According to the manual I should create my data and start writing it to a file and then run the Plotter within JVM.

LiveGraph app = LiveGraph.application();
app.exec(String [0]);

On the website it says this is the command to start the LiveGraph program. They also say that I can just pass no parameters to app.exec() as it will generate settings for the graph with default values.

Problem is that I cannot execute app.exec() it returns a no method error! This is my only issue, this function which is supposed to start the gui for the graph.

Are there important things I am missing here?

Steliyan

No correct solution

OTHER TIPS

Thanks for the link to LiveGraph, I hadn't heard of it before. I got the source and compiled it, then called it from groovy:

$ CLASSPATH=LiveGraph.2.0.beta01.Complete.jar:SoftNetConsultUtils.2.01.slim.jar groovysh
Groovy Shell (1.8.4, JVM: 1.6.0_24)
Type 'help' or '\h' for help.
------------------------------------------------------------------
groovy:000> import org.LiveGraph.LiveGraph
===> [import org.LiveGraph.LiveGraph]
groovy:000> lg = new LiveGraph()
===> org.LiveGraph.LiveGraph@7563a320
groovy:000> app = lg.application()
===> org.LiveGraph.LiveGraph@3844006e

I got to that point pretty much from your line of code above. When I get to the 'exec' method, I hit <TAB> and groovy shows me completions on the available methods and their signatures:

groovy:000> app.exec<TAB>
execEngine()       execStandalone(    execStandalone()

No exec method here. If I call app.execStandalone() the applications windows come up like in the screenshots. If I call execStandalone with arguments I get another window showing usage, because I really haven't read any documentation.

I did see that the online manuals refer to version 1.x.x, and this is 2.0.beta01; maybe that's one of the differences not reflected in the manual, or maybe there is a typo in the documentation. If you have code (or at least jars) loaded into a modern IDE like NetBeans (or Eclipse, etc.), it would show you the available methods as you are typing and show the error before you tried running your code. There is a learning curve, but it will help you avoid these simple errors and allow you to make more powerful ones.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top