命令符无法运行JAVA程序,Java应用程序无法从命令提示符处运行

i have implemented java application with eclipse IDE. It is running and working fine with eclipse. But when i have created executed JAR file with the code. It is giving below error. Please let me know if i have missed anything.

Exception in thread "pool-2-thread-1" java.lang.UnsatisfiedLinkError: com.microsoft.cognitiveservices.speech.internal.carbon_javaJNI.swig_module_init()V

at com.microsoft.cognitiveservices.speech.internal.carbon_javaJNI.swig_module_init(Native Method)

at com.microsoft.cognitiveservices.speech.internal.carbon_javaJNI.(carbon_javaJNI.java:517)

at com.microsoft.cognitiveservices.speech.SpeechConfig.(SpeechConfig.java:69)

at com.autoAnalyser.AudioToTextConverter.configureService(AudioToTextConverter.java:38)

at com.autoAnalyser.ServiceThread.run(ServiceThread.java:21)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Exception in thread "pool-55-thread-1" java.lang.NoClassDefFoundError: Could not initialize class com.microsoft.cognitiveservices.speech.SpeechConfig

at com.autoAnalyser.AudioToTextConverter.configureService(AudioToTextConverter.java:38)

at com.autoAnalyser.ServiceThread.run(ServiceThread.java:21)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

JVM details :

java version "1.8.0_191"

Java(TM) SE Runtime Environment (build 1.8.0_191-b12)

Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

I have raised request in GitHub a day before yesterday but did not receive any response yet. I am using Windows 10 OS and GitHub issue number is 190. I have also uploaded POM and source code. I referred https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstart-java-jre

I have implemented java application with eclipse IDE. It is running and working fine with eclipse. But when i have created executed JAR file with the code. It is giving below error. Please let me know if I have missed anything.

解决方案

Hi,

Could you please make sure you are using:

Windows (64-bit), Ubuntu Linux 16.04/18.04 (64-bit), or macOS 10.13 or late

And also, could you please make sure that you callSpeechConfig.fromSubscription(KEY, REGION) (or one of the other from*() functions) at least once before

creating your stream class.The reason is that the speech sdk internally loads the native dll only at the "entry" classes automatically, like SpeechConfig, or Recognizer classes.

Regards,

Yutong

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值