JFreeChart Java JAR不在另一台机器上运行 [英] JFreeChart Java JAR not running on a different machine

查看:78
本文介绍了JFreeChart Java JAR不在另一台机器上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用JFreeChart库创建了一个应用程序,可在另一台机器上使用.

I have created an application using the JFreeChart library for use on another machine.

以前,我已经使用JFreeChart开发了应用程序(使用相同的库),该应用程序在其他计算机上运行良好.唯一的区别是这台计算机运行的是Vista.

Previously I have developed applications with JFreeChart (using the same libraries) which has worked fine on other machines. The only difference is this machine is running Vista.

请参阅以下有关我得到的运行时异常的信息:

Please see below for the run-time exception I am getting:

但是,找不到的类位于下图中突出显示的jar中,该图显示了我导入的JAR库.我还确定此JAR已包含在应用程序清单中.见下图:

The class that cannot be found, however, is located in the highlighted jar in the below image showing my imported libraries for the JAR. I have also established that this JAR is included in the manifest for the application. See below image:

因此,我非常需要此功能,并且不知道下一步要去哪里-或导致此问题的原因!

So I very much need this to work and have no idea where to look next - or what is causing this problem!

开发机Java版本: 1.7.0_45 目标机器的Java版本: 1.7.0_45

Development machine Java version: 1.7.0_45 Target machine Java version: 1.7.0_45

谢谢.

推荐答案

检查JAR清单中的Class-Path属性,该属性应包含以下条目:

Check the Class-Path attribute in your JAR's manifest, which should contain entries like this:

Class-Path: lib/jfreechart-1.0.17.jar lib/jcommon-1.0.21.jar …

另外,检查NetBeans项目文件夹中的dist/README.TXT,其中应该对项目所需的库说类似这样的内容:

Also, examine dist/README.TXT in your NetBeans project folder, which should say something like this regarding libraries required by your project:

要从命令行运行项目,请转到dist文件夹,然后 输入以下内容:

To run the project from the command line, go to the dist folder and type the following:

java -jar "CISOnlineMonitor.jar" 

要分发此项目,请压缩dist文件夹(包括lib文件夹) 并分发ZIP文件.

To distribute this project, zip up the dist folder (including the lib folder) and distribute the ZIP file.

这篇关于JFreeChart Java JAR不在另一台机器上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆