繁体   English   中英

Jar 文件无法正常工作

[英]Jar file not working correctly

我在 eclipse 中创建了.jar 文件。 我使用.jar 文件在 pos 打印机上打印文本。 我的程序打印正确,但是当我启动时。jar 文件没有与打印机连接。 为了与打印机连接,我使用 javax.comm 库。

在成就工具编辑 Menifest.txt 中打开 jar 添加以下内容

Class-Path: /path/to/requiredLibary.jar

另见

从命令行启动 jar 时,javax.comm jar 是否在类路径中?
就像是:

java -cp myproject.jar;javax-comm-3.0.jar com.mycompany.MyMainClass

Note that the java -jar myproject.jar is incompatible with -cp , ie this doesn't work: java -cp javax-comm-3.0.jar -jar myproject.jar

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM