简体   繁体   English

在netbeans上运行但在运行jar时没有错误?

[英]No errors when runs on netbeans but not when running the jar?

When I run my program which use smslib works fine when I run it on netbeans, But when I generated the jar file and run it, the console shows me this error. 当我在netbeans上运行使用smslib的程序时,可以正常工作,但是当我生成jar文件并运行它时,控制台将向我显示此错误。 Any thoughts on how to solve it? 关于如何解决的任何想法? Your help will be much appreciated. 您的帮助将不胜感激。

log4j:WARN No appenders could be found for logger (smslib).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "Thread-6" java.lang.ExceptionInInitializerError
    at org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java:69)
    at org.smslib.modem.AModemDriver.connect(AModemDriver.java:114)
    at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:189)
    at org.smslib.Service$1Starter.run(Service.java:277)
Caused by: java.lang.RuntimeException: CommPortIdentifier class not found
    at org.smslib.helper.CommPortIdentifier.<clinit>(CommPortIdentifier.java:76)
    ... 4 more

smslib库不在运行时类路径上,或者运行时类路径未正确设置。

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

相关问题 Java程序在Netbeans中可以正常运行,但是从内置的JAR运行时,它不起作用 - Java program runs fine within Netbeans, but when running from a built JAR it does not work 在运行jar时出错,但在netbeans / apache poi中运行时却没有 - outofmemoryerror when running jar but not when running in netbeans/ apache poi 运行可执行jar文件时出错 - Errors when running executable jar file 从NetBeans项目的命令行运行jar时找不到文件 - File not found when running jar from command line of a NetBeans project 直接从Netbeans和JAR运行时,XOR不同 - XOR differs when running from Netbeans directly and from JAR 我的代码在Netbeans中运行正常,但是在运行jar时抛出异常 - My code is working fine in Netbeans but throws exception when running the jar 在Netbeans外部运行jar文件时无法访问映像文件 - Not able to access the image file when running jar file outside Netbeans ClassNotFoundException 运行 jar 文件但在 Intellij 中运行良好 - ClassNotFoundException When running jar file but runs fine in Intellij 由NetBeans生成的jar虽然从IDE运行,但没有运行 - Jar generated by NetBeans not running although it runs from the IDE 当我从Netbeans运行JFrame程序时,印地语字体是可见的,但运行.jar文件时,则看不见 - Hindi font is visible when I am running JFrame program from Netbeans but not visible when running .jar file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM