Question

Hello fellow developers!

I have written a Java program that uses an earlier version of JFreeChart (coincidentally, I found it already on my computer whilst downloading the Android SDK) to create some charts. What I am wondering is two things (yes, this is a double question):

1.) Will this program work on other computers that may (or may not) have a version of JFreeChart installed (or any at all). I think I might know the answer to this: a JAR file is a compressed version of the bytecode that the Java code is compiled to.

2.) I have been having problems with this program; I have used a Time object for the times elapsed (this is the range axis), and it treats the Time like a time of day! I was thinking about getting the user's time zone, and then truncating the long number that is the time elapsed to remedy this, but is that the only way?

Was it helpful?

Solution

Will this program work on other computers that may (or may not) have a version of JFreeChart installed (or any at all).

No. Java programs need to ship their dependencies (except for the JVM itself and its libraries) with them. You can bundle them all together in one executable jar file.

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