问题描述
我有Java 10.0.1,并且下载了某人制作的应用程序。当我尝试运行bash脚本以运行应用程序时,出现了JAXB Exception错误:
26 Aug 2020 20:45:40,419 ERROR Main : Uncaught exception handled
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at org.hibernate.validator.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:261)
at org.hibernate.validator.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:148)
at edu.northwestern.radiology.atb.system.validation.AbstractValidator.<init>(AbstractValidator.java:72)
at edu.northwestern.radiology.atb.system.validation.AnyValidator.<init>(AnyValidator.java:38)
at edu.northwestern.radiology.atb.system.validation.AnyValidator.<clinit>(AnyValidator.java:40)
at edu.northwestern.radiology.atb.ui.presenter.tag.TagPresenter.<init>(TagPresenter.java:70)
at edu.northwestern.radiology.atb.ui.Application.initGroups(Application.java:225)
at edu.northwestern.radiology.atb.ui.Application.init(Application.java:161)
at edu.northwestern.radiology.atb.ui.Application.start(Application.java:129)
at edu.northwestern.radiology.atb.Main$2.run(Main.java:128)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventdispatchThread.pumpOneEventForFilters(EventdispatchThread.java:203)
at java.desktop/java.awt.EventdispatchThread.pumpEventsForFilter(EventdispatchThread.java:124)
at java.desktop/java.awt.EventdispatchThread.pumpEventsForHierarchy(EventdispatchThread.java:113)
at java.desktop/java.awt.EventdispatchThread.pumpEvents(EventdispatchThread.java:109)
at java.desktop/java.awt.EventdispatchThread.pumpEvents(EventdispatchThread.java:101)
at java.desktop/java.awt.EventdispatchThread.run(EventdispatchThread.java:90)
Caused by: java.lang.classNotFoundException: javax.xml.bind.JAXBException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.classLoader.loadClass(ClassLoader.java:499)
... 24 more
我尝试做java --add-modules java.xml.bind
,但对我没用。
Usage: java [options] <mainclass> [args...]
(to execute a class)
or java [options] -jar <jarfile> [args...]
(to execute a jar file)
or java [options] -m <module>[/<mainclass>] [args...]
java [options] --module <module>[/<mainclass>] [args...]
(to execute the main class in a module)
Arguments following the main class,-jar <jarfile>,-m or --module
<module>/<mainclass> are passed as the arguments to main class.
where options include:
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
--class-path <class search path of directories and zip/jar files>
A : separated list of directories,JAR archives,and ZIP archives to search for class files.
-p <module path>
--module-path <module path>...
A : separated list of directories,each directory
is a directory of modules.
--upgrade-module-path <module path>...
A : separated list of directories,each directory
is a directory of modules that replace upgradeable
modules in the runtime image
--add-modules <module name>[,<module name>...]
root modules to resolve in addition to the initial module.
<module name> can also be ALL-DEFAULT,ALL-SYstem,ALL-module-path.
--list-modules
list observable modules and exit
-d <module name>
--describe-module <module name>
describe a module and exit
--dry-run create VM and load main class but do not execute main method.
The --dry-run option may be useful for validating the
command-line options such as the module system configuration.
--validate-modules
validate all modules and exit
The --validate-modules option may be useful for finding
conflicts and other errors with modules on the module path.
-D<name>=<value>
set a system property
-verbose:[class|module|gc|jni]
enable verbose output
-version print product version to the error stream and exit
--version print product version to the output stream and exit
-showversion print product version to the error stream and continue
--show-version
print product version to the output stream and continue
--show-module-resolution
show module resolution output during startup
-? -h -help
print this help message to the error stream
--help print this help message to the output stream
-X print help on extra options to the error stream
--help-extra print help on extra options to the output stream
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>,e.g. -agentlib:jdwp
see also -agentlib:jdwp=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent,see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
hidpi scaled images are automatically supported and used
if available. The unscaled image filename,e.g. image.ext,should always be passed as the argument to the -splash option.
The most appropriate scaled image provided will be picked up
automatically.
See the SplashScreen API documentation for more @R_653_4045@ion
@argument files
one or more argument files containing options
-disable-@files
prevent further argument file expansion
To specify an argument for a long option,you can use --<name>=<value> or
--<name> <value>.
我以前使用依赖项看到了一些答案,但是对于Java来说我是非常陌生的人,我不知道如何实现这些依赖。任何帮助将不胜感激!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)