I am using jChats(jCharts-0.7.5.jar) application with its included example for PieChart
If I provide the claspath to the jar file of charts ,it doesnt work,it gives me error that it is not finding particular class(in this case it is IPieChartDataSet)
But if I extract the jar file and place the "org" folder in the current directory,it works absolutely fine
I am providing the correct calss path i.e if it is E:\ directorty(jar file of jCharts)
I provide the classpath i.e is E:\jCharts-0.7.5.jar
If the class is in the jar file (which it seems to be), but cannot be found, then the classpath is not correct. Simples
Teachers open the door, but you must enter by yourself...
Chinese proverb
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
I use appletviewer "XXX".html where XXX is html file name or directly run the HTML file
I have also tried tunning apletviewer SwingDemo.java.It doesnt even work
"dlorde" :What classpath should I give if it is the problem of classpath because according to me ,I am providing correct classpath
* The full directory path to your code
My code and class file is in C:\ drive
* The full directory path to the jar file
Jar file is in E:\jChatrs thus I set the enviorment variable path to E:\jChatrs\jCharts-0.7.5.jar
* The command line you are using to try to start the application
I usually run the HTML file or appletviewer XXX.html
* The command line you used to start the application when you unpacked the jar
I usually run the HTML file or appletviewer XXX.htm
Last edited by vin_eets; April 7th, 2011 at 12:03 AM.
"dlorde" :What classpath should I give if it is the problem of classpath because according to me ,I am providing correct classpath
You should provide the classpath to the jar file.
* The full directory path to the jar file
Jar file is in E:\jChatrs thus I set the enviorment variable path to E:\jChatrs\jCharts-0.7.5.jar
The environment variable 'path' is the OS executables directory list, not the Java application classpath, which is called 'classpath'.
However, the applet classpath is set using the 'archive' tag as Ray Newman explained previously.
You should be aware that for security reasons, applets are restricted in what they can do, and the applet's class loader can read only from the same codebase from which the applet was started.
This means that archives in archiveList must be in the same directory as, or in a subdirectory of, the codebase. Entries in archiveList of the form ../a/b.jar will not work unless explicitly allowed for in the security policy file (except in the case of an http codebase, where archives in archiveList must be from the same host as the codebase, but can have ".."'s in their paths.). See The Applet Tag.
For this reason, applets requiring additional libraries are usually packaged in a jar - see Running Jar-packaged Software.
The truth is, when all is said and done, one does not teach a subject, one teaches a student how to learn it. Teaching may look like administering a dose, but even a dose must be worked on by the body if it is to cure. Each individual must cure his or her own ignorance...
J. Barzun
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.