Jfreechart classpath?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
userlander
Posts: 3
Joined: Sat Oct 25, 2014 9:57 pm
antibot: No, of course not.

Jfreechart classpath?

Post by userlander » Sat Oct 25, 2014 10:04 pm

I'm trying to run interactivebrokers TWS on linux, but I keep getting this classpath error:
Fatal Error: one of the following jar files is missing from the classpath:
jfreechart-1.0.9.jar
jcommon-1.0.12.jar
Please make sure you run the application from the shortcut that was
installed on your desktop or on the Start menu when you upgraded.
I've searched google for hours but can't find a simple explanation for how to add jfreechart and jcommon to the classpath. Can anyone tell me how to do that?

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

Re: Jfreechart classpath?

Post by david.gilbert » Sun Oct 26, 2014 2:42 pm

Normally you invoke the java runtime with the -classpath option, for example:

java -classpath jfreechart-1.0.9.jar:jcommon-1.0.12.jar yourapp.jar

But the exact class path configuration will depend on the requirements of your application. Some applications will bundle everything in one jar, so all you have to do is:

java -jar yourapp.jar

Others will use external jars as dependencies, but put references to the external jar files in the manifest entries (in the app jar file) so you don't have to specify class path entries on the command line.
David Gilbert
JFreeChart Project Leader

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

userlander
Posts: 3
Joined: Sat Oct 25, 2014 9:57 pm
antibot: No, of course not.

Re: Jfreechart classpath?

Post by userlander » Sun Oct 26, 2014 4:10 pm

Thanks! I neglected to say that this is a .jnlp file tho, which needs to start with javaws. I've tried doing javaws -cp "/usr/share/java" latest.jnlp but to no avail. I've also tried #export CLASSPATH="/usr/share/java" before running the javaws command, neither of which worked.

Not sure why this is so difficult, and why these applications aren't automatically linked to the correct files. What should I try next? I'm at a loss.

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

Re: Jfreechart classpath?

Post by david.gilbert » Sun Oct 26, 2014 5:36 pm

If it is launched by JNLP then everything should be specified in the .jnlp file. You should contact the producer of the application.
David Gilbert
JFreeChart Project Leader

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

userlander
Posts: 3
Joined: Sat Oct 25, 2014 9:57 pm
antibot: No, of course not.

Re: Jfreechart classpath?

Post by userlander » Mon Oct 27, 2014 1:55 am

david.gilbert wrote:If it is launched by JNLP then everything should be specified in the .jnlp file. You should contact the producer of the application.
Hmm, that's an interesting idea, but it doesn't make much sense given the application launches fine in windows. ;-) The issue obviously is one having to do with the classpath variable in linux.

Once again: does anyone know how to set the CLASSPATH environment variable in linux for jfreechart and jcommon?

martyj
Posts: 1
Joined: Tue Dec 23, 2014 8:49 pm
antibot: No, of course not.

Re: Jfreechart classpath?

Post by martyj » Tue Dec 23, 2014 8:58 pm

It's been a couple of months, so I hope you found a solution. I ran into this today, and found that the latest TWS download has fixed the issue, as it includes the jfreechart and jcommon classes in its total.2013.jar file. Here's the link:

https://www.interactivebrokers.com/en/? ... _entity%3D

Just install the TWS 9482 (Dec 19 2014) release as directed, then start it as directed:

Code: Select all

cd IBJts; java -cp jts.jar:total.2013.jar -Xmx512M -XX:MaxPermSize=128M jclient.LoginFrame .

Locked