简体   繁体   English

JAVA jar执行问题

[英]JAVA jar execution problem

When i execute the application in jidea ide it executes fine. 当我在jidea ide中执行应用程序时,它执行得很好。 But when i double click the jar file it shows the gui fine, then i click a button which must create some objects, but only some objects created, in that action call some constructors does not called. 但是,当我双击jar文件时,它显示的gui很好,然后我单击了一个按钮,该按钮必须创建一些对象,但是只能创建一些对象,在该操作中,某些构造函数没有被调用。 But when this is done in the ide all the constructors called!!! 但是,当在理想情况下完成此操作时,所有构造函数都称为!!!

what is the reason for this behavior? 这种行为的原因是什么? what would i do to solve this different behaviors? 我将如何解决这种不同的行为?

You are probably missing some classes in the jar you've created. 您可能会在创建的jar中缺少某些类。 Check the classpath in your IDE project and compare with your system classpath. 检查您的IDE项目中的类路径,并将其与系统类路径进行比较。 Any differences between those need to be included in your jar (or you jar-classpath). 两者之间的任何差异都必须包含在您的jar(或jar-classpath)中。

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

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