用于gradle的JLink插件给出了找不到文件的错误

时间:2019-08-11 21:47:39

标签: java gradle intellij-idea javafx jlink

我正在尝试创建一个独立的运行时映像,如this答案中所述。当我尝试从“ Badass JLink”插件运行gradle的JLink任务时,出现以下错误:

Execution failed for task ':prepareMergedJarsDir'. > java.io.IOException: Cannot run program "C:\Program" (in directory "C:\Users\erik\AppData\Local\Temp\badass-2371206120064261418"): CreateProcess error=2, The system cannot find the file specified

我似乎在插件documentation上找不到任何有关此类错误的文档。

我的build.grade文件如下:

plugins {
    id 'java'
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.8'
    id 'org.beryx.jlink' version '2.14.0'
}

group 'CAM'
version '0.2'
sourceCompatibility = 11

repositories {
    mavenCentral()
}

javafx {
    version = "12.0.2"
    modules = [ 'javafx.controls', 'javafx.fxml' ]
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile 'net.sourceforge.htmlunit:htmlunit:2.13'
    compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
    compile group: 'net.lingala.zip4j', name: 'zip4j', version: '1.2.4'
}

jlink {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
        name = 'CAM'
    }
}

编辑

今天回来后,奇怪的是,现在的错误有所不同。我什么都没做,所以我想重启电脑可能会影响它吗?

我现在得到的错误是

Execution failed for task ':createMergedModule'.
> Unsupported major.minor version 56.0

与--stacktrace一起运行

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':createMergedModule'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:121)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:117)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:184)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:110)
    at org.gradle.api.internal.tasks.execution.ResolveIncrementalChangesTaskExecuter.execute(ResolveIncrementalChangesTaskExecuter.java:84)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
    at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:74)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:109)
    at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
    at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:94)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:63)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:46)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.module.InvalidModuleDescriptorException: Unsupported major.minor version 56.0
    at java.base/jdk.internal.module.ModuleInfo.invalidModuleDescriptor(ModuleInfo.java:1092)
    at java.base/jdk.internal.module.ModuleInfo.doRead(ModuleInfo.java:196)
    at java.base/jdk.internal.module.ModuleInfo.read(ModuleInfo.java:132)
    at org.beryx.jlink.util.Util.getModuleDescriptor(Util.groovy:340)
    at org.beryx.jlink.util.ModuleManager$_closure1.doCall(ModuleManager.groovy:32)
    at org.beryx.jlink.util.ModuleManager$_closure1.call(ModuleManager.groovy)
    at org.beryx.jlink.util.ModuleManager.<init>(ModuleManager.groovy:31)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at org.beryx.jlink.util.SuggestedMergedModuleInfoBuilder.getRequiresBuilders(SuggestedMergedModuleInfoBuilder.groovy:69)
    at org.beryx.jlink.util.SuggestedMergedModuleInfoBuilder.getModuleInfo(SuggestedMergedModuleInfoBuilder.groovy:41)
    at org.beryx.jlink.impl.CreateMergedModuleTaskImpl.genModuleInfoBadass(CreateMergedModuleTaskImpl.groovy:111)
    at org.beryx.jlink.impl.CreateMergedModuleTaskImpl.genModuleInfo(CreateMergedModuleTaskImpl.groovy:67)
    at org.beryx.jlink.impl.CreateMergedModuleTaskImpl$genModuleInfo.callCurrent(Unknown Source)
    at org.beryx.jlink.impl.CreateMergedModuleTaskImpl.execute(CreateMergedModuleTaskImpl.groovy:46)
    at org.beryx.jlink.CreateMergedModuleTask.createMergedModuleAction(CreateMergedModuleTask.groovy:106)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:48)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:672)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$4.run(ExecuteActionsTaskExecuter.java:338)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:327)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:312)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:75)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:158)
    at org.gradle.internal.execution.impl.steps.ExecuteStep.execute(ExecuteStep.java:46)
    at org.gradle.internal.execution.impl.steps.CancelExecutionStep.execute(CancelExecutionStep.java:34)
    at org.gradle.internal.execution.impl.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:69)
    at org.gradle.internal.execution.impl.steps.TimeoutStep.execute(TimeoutStep.java:49)
    at org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34)
    at org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:49)
    at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:42)
    at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:28)
    at org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:133)
    at org.gradle.internal.execution.impl.steps.CacheStep.lambda$execute$5(CacheStep.java:83)
    at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82)
    at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:37)
    at org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33)
    at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38)
    at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23)
    at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:95)
    at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:88)
    at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
    at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
    at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:109)
    ... 37 more

编辑2

将build.gradle中的源兼容性从11更改为12,并更新gradle以使用JDK 12进行编译,从而修复了该错误,但现在我明白了

the unnamed module reads package javax.xml from both ClassicAddonManager.merged.module and java.xml

和merged.module / module-info.java出现以下错误:

package.org.apache.xalan.extensions.bsf does not exist
package.org.apache.bsf does not exist
cannot find symbol class DOMImplementationSourceList
cannot find symbol class driver

编辑3 这是它生成的module-info.java:

open module ClassicAddonManager.merged.module {
    exports com.gargoylesoftware.htmlunit;
    exports com.gargoylesoftware.htmlunit.attachment;
    exports com.gargoylesoftware.htmlunit.gae;
    exports com.gargoylesoftware.htmlunit.html;
    exports com.gargoylesoftware.htmlunit.html.applets;
    exports com.gargoylesoftware.htmlunit.html.impl;
    exports com.gargoylesoftware.htmlunit.html.xpath;
    exports com.gargoylesoftware.htmlunit.javascript;
    exports com.gargoylesoftware.htmlunit.javascript.background;
    exports com.gargoylesoftware.htmlunit.javascript.configuration;
    exports com.gargoylesoftware.htmlunit.javascript.host;
    exports com.gargoylesoftware.htmlunit.javascript.host.arrays;
    exports com.gargoylesoftware.htmlunit.javascript.host.canvas;
    exports com.gargoylesoftware.htmlunit.javascript.host.css;
    exports com.gargoylesoftware.htmlunit.javascript.host.dom;
    exports com.gargoylesoftware.htmlunit.javascript.host.geo;
    exports com.gargoylesoftware.htmlunit.javascript.host.html;
    exports com.gargoylesoftware.htmlunit.javascript.host.svg;
    exports com.gargoylesoftware.htmlunit.javascript.host.xml;
    exports com.gargoylesoftware.htmlunit.javascript.regexp;
    exports com.gargoylesoftware.htmlunit.protocol.about;
    exports com.gargoylesoftware.htmlunit.protocol.data;
    exports com.gargoylesoftware.htmlunit.protocol.javascript;
    exports com.gargoylesoftware.htmlunit.svg;
    exports com.gargoylesoftware.htmlunit.util;
    exports com.gargoylesoftware.htmlunit.xml;
    exports com.google.gson;
    exports com.google.gson.annotations;
    exports com.google.gson.internal;
    exports com.google.gson.internal.bind;
    exports com.google.gson.internal.bind.util;
    exports com.google.gson.reflect;
    exports com.google.gson.stream;
    exports com.steadystate.css.dom;
    exports com.steadystate.css.parser;
    exports com.steadystate.css.parser.selectors;
    exports com.steadystate.css.sac;
    exports com.steadystate.css.userdata;
    exports com.steadystate.css.util;
    exports java_cup.runtime;
    exports javax.xml;
    exports javax.xml.datatype;
    exports javax.xml.namespace;
    exports javax.xml.parsers;
    exports javax.xml.stream;
    exports javax.xml.stream.events;
    exports javax.xml.stream.util;
    exports javax.xml.transform;
    exports javax.xml.transform.dom;
    exports javax.xml.transform.sax;
    exports javax.xml.transform.stax;
    exports javax.xml.transform.stream;
    exports javax.xml.validation;
    exports javax.xml.xpath;
    exports net.lingala.zip4j.core;
    exports net.lingala.zip4j.crypto;
    exports net.lingala.zip4j.crypto.PBKDF2;
    exports net.lingala.zip4j.crypto.engine;
    exports net.lingala.zip4j.exception;
    exports net.lingala.zip4j.io;
    exports net.lingala.zip4j.model;
    exports net.lingala.zip4j.progress;
    exports net.lingala.zip4j.unzip;
    exports net.lingala.zip4j.util;
    exports net.lingala.zip4j.zip;
    exports net.sourceforge.htmlunit.corejs.classfile;
    exports net.sourceforge.htmlunit.corejs.javascript;
    exports net.sourceforge.htmlunit.corejs.javascript.annotations;
    exports net.sourceforge.htmlunit.corejs.javascript.ast;
    exports net.sourceforge.htmlunit.corejs.javascript.commonjs.module;
    exports net.sourceforge.htmlunit.corejs.javascript.commonjs.module.provider;
    exports net.sourceforge.htmlunit.corejs.javascript.debug;
    exports net.sourceforge.htmlunit.corejs.javascript.jdk13;
    exports net.sourceforge.htmlunit.corejs.javascript.jdk15;
    exports net.sourceforge.htmlunit.corejs.javascript.json;
    exports net.sourceforge.htmlunit.corejs.javascript.optimizer;
    exports net.sourceforge.htmlunit.corejs.javascript.regexp;
    exports net.sourceforge.htmlunit.corejs.javascript.serialize;
    exports net.sourceforge.htmlunit.corejs.javascript.tools;
    exports net.sourceforge.htmlunit.corejs.javascript.tools.debugger;
    exports net.sourceforge.htmlunit.corejs.javascript.tools.debugger.treetable;
    exports net.sourceforge.htmlunit.corejs.javascript.tools.shell;
    exports net.sourceforge.htmlunit.corejs.javascript.v8dtoa;
    exports net.sourceforge.htmlunit.corejs.javascript.xml;
    exports netscape.javascript;
    exports org.apache.bcel;
    exports org.apache.bcel.classfile;
    exports org.apache.bcel.generic;
    exports org.apache.bcel.util;
    exports org.apache.bcel.verifier;
    exports org.apache.bcel.verifier.exc;
    exports org.apache.bcel.verifier.statics;
    exports org.apache.bcel.verifier.structurals;
    exports org.apache.commons.codec;
    exports org.apache.commons.codec.binary;
    exports org.apache.commons.codec.digest;
    exports org.apache.commons.codec.language;
    exports org.apache.commons.codec.language.bm;
    exports org.apache.commons.codec.net;
    exports org.apache.commons.collections;
    exports org.apache.commons.collections.bag;
    exports org.apache.commons.collections.bidimap;
    exports org.apache.commons.collections.buffer;
    exports org.apache.commons.collections.collection;
    exports org.apache.commons.collections.comparators;
    exports org.apache.commons.collections.functors;
    exports org.apache.commons.collections.iterators;
    exports org.apache.commons.collections.keyvalue;
    exports org.apache.commons.collections.list;
    exports org.apache.commons.collections.map;
    exports org.apache.commons.collections.set;
    exports org.apache.commons.io;
    exports org.apache.commons.io.comparator;
    exports org.apache.commons.io.filefilter;
    exports org.apache.commons.io.input;
    exports org.apache.commons.io.monitor;
    exports org.apache.commons.io.output;
    exports org.apache.commons.lang3;
    exports org.apache.commons.lang3.builder;
    exports org.apache.commons.lang3.concurrent;
    exports org.apache.commons.lang3.event;
    exports org.apache.commons.lang3.exception;
    exports org.apache.commons.lang3.math;
    exports org.apache.commons.lang3.mutable;
    exports org.apache.commons.lang3.reflect;
    exports org.apache.commons.lang3.text;
    exports org.apache.commons.lang3.text.translate;
    exports org.apache.commons.lang3.time;
    exports org.apache.commons.lang3.tuple;
    exports org.apache.commons.logging;
    exports org.apache.commons.logging.impl;
    exports org.apache.html.dom;
    exports org.apache.http;
    exports org.apache.http.annotation;
    exports org.apache.http.auth;
    exports org.apache.http.auth.params;
    exports org.apache.http.client;
    exports org.apache.http.client.config;
    exports org.apache.http.client.entity;
    exports org.apache.http.client.methods;
    exports org.apache.http.client.params;
    exports org.apache.http.client.protocol;
    exports org.apache.http.client.utils;
    exports org.apache.http.concurrent;
    exports org.apache.http.config;
    exports org.apache.http.conn;
    exports org.apache.http.conn.params;
    exports org.apache.http.conn.routing;
    exports org.apache.http.conn.scheme;
    exports org.apache.http.conn.socket;
    exports org.apache.http.conn.ssl;
    exports org.apache.http.conn.util;
    exports org.apache.http.cookie;
    exports org.apache.http.cookie.params;
    exports org.apache.http.entity;
    exports org.apache.http.entity.mime;
    exports org.apache.http.entity.mime.content;
    exports org.apache.http.impl;
    exports org.apache.http.impl.auth;
    exports org.apache.http.impl.client;
    exports org.apache.http.impl.conn;
    exports org.apache.http.impl.conn.tsccm;
    exports org.apache.http.impl.cookie;
    exports org.apache.http.impl.entity;
    exports org.apache.http.impl.execchain;
    exports org.apache.http.impl.io;
    exports org.apache.http.impl.pool;
    exports org.apache.http.io;
    exports org.apache.http.message;
    exports org.apache.http.params;
    exports org.apache.http.pool;
    exports org.apache.http.protocol;
    exports org.apache.http.util;
    exports org.apache.regexp;
    exports org.apache.wml;
    exports org.apache.wml.dom;
    exports org.apache.xalan;
    exports org.apache.xalan.client;
    exports org.apache.xalan.extensions;
    exports org.apache.xalan.lib;
    exports org.apache.xalan.lib.sql;
    exports org.apache.xalan.processor;
    exports org.apache.xalan.res;
    exports org.apache.xalan.serialize;
    exports org.apache.xalan.templates;
    exports org.apache.xalan.trace;
    exports org.apache.xalan.transformer;
    exports org.apache.xalan.xslt;
    exports org.apache.xalan.xsltc;
    exports org.apache.xalan.xsltc.cmdline;
    exports org.apache.xalan.xsltc.cmdline.getopt;
    exports org.apache.xalan.xsltc.compiler;
    exports org.apache.xalan.xsltc.compiler.util;
    exports org.apache.xalan.xsltc.dom;
    exports org.apache.xalan.xsltc.runtime;
    exports org.apache.xalan.xsltc.runtime.output;
    exports org.apache.xalan.xsltc.trax;
    exports org.apache.xalan.xsltc.util;
    exports org.apache.xerces.dom;
    exports org.apache.xerces.dom.events;
    exports org.apache.xerces.dom3.as;
    exports org.apache.xerces.impl;
    exports org.apache.xerces.impl.dtd;
    exports org.apache.xerces.impl.dtd.models;
    exports org.apache.xerces.impl.dv;
    exports org.apache.xerces.impl.dv.dtd;
    exports org.apache.xerces.impl.dv.util;
    exports org.apache.xerces.impl.dv.xs;
    exports org.apache.xerces.impl.io;
    exports org.apache.xerces.impl.msg;
    exports org.apache.xerces.impl.validation;
    exports org.apache.xerces.impl.xpath;
    exports org.apache.xerces.impl.xpath.regex;
    exports org.apache.xerces.impl.xs;
    exports org.apache.xerces.impl.xs.identity;
    exports org.apache.xerces.impl.xs.models;
    exports org.apache.xerces.impl.xs.opti;
    exports org.apache.xerces.impl.xs.traversers;
    exports org.apache.xerces.impl.xs.util;
    exports org.apache.xerces.jaxp;
    exports org.apache.xerces.jaxp.datatype;
    exports org.apache.xerces.jaxp.validation;
    exports org.apache.xerces.parsers;
    exports org.apache.xerces.stax;
    exports org.apache.xerces.stax.events;
    exports org.apache.xerces.util;
    exports org.apache.xerces.xinclude;
    exports org.apache.xerces.xni;
    exports org.apache.xerces.xni.grammars;
    exports org.apache.xerces.xni.parser;
    exports org.apache.xerces.xpointer;
    exports org.apache.xerces.xs;
    exports org.apache.xerces.xs.datatypes;
    exports org.apache.xml.dtm;
    exports org.apache.xml.dtm.ref;
    exports org.apache.xml.dtm.ref.dom2dtm;
    exports org.apache.xml.dtm.ref.sax2dtm;
    exports org.apache.xml.res;
    exports org.apache.xml.serialize;
    exports org.apache.xml.serializer;
    exports org.apache.xml.serializer.dom3;
    exports org.apache.xml.serializer.utils;
    exports org.apache.xml.utils;
    exports org.apache.xml.utils.res;
    exports org.apache.xmlcommons;
    exports org.apache.xpath;
    exports org.apache.xpath.axes;
    exports org.apache.xpath.compiler;
    exports org.apache.xpath.domapi;
    exports org.apache.xpath.functions;
    exports org.apache.xpath.jaxp;
    exports org.apache.xpath.objects;
    exports org.apache.xpath.operations;
    exports org.apache.xpath.patterns;
    exports org.apache.xpath.res;
    exports org.cyberneko.html;
    exports org.cyberneko.html.filters;
    exports org.cyberneko.html.parsers;
    exports org.cyberneko.html.xercesbridge;
    exports org.eclipse.jetty.http;
    exports org.eclipse.jetty.http.gzip;
    exports org.eclipse.jetty.http.ssl;
    exports org.eclipse.jetty.io;
    exports org.eclipse.jetty.io.bio;
    exports org.eclipse.jetty.io.nio;
    exports org.eclipse.jetty.util;
    exports org.eclipse.jetty.util.ajax;
    exports org.eclipse.jetty.util.component;
    exports org.eclipse.jetty.util.log;
    exports org.eclipse.jetty.util.preventers;
    exports org.eclipse.jetty.util.resource;
    exports org.eclipse.jetty.util.security;
    exports org.eclipse.jetty.util.ssl;
    exports org.eclipse.jetty.util.statistic;
    exports org.eclipse.jetty.util.thread;
    exports org.eclipse.jetty.websocket;
    exports org.w3c.css.sac;
    exports org.w3c.css.sac.helpers;
    exports org.w3c.dom;
    exports org.w3c.dom.bootstrap;
    exports org.w3c.dom.css;
    exports org.w3c.dom.events;
    exports org.w3c.dom.html;
    exports org.w3c.dom.ls;
    exports org.w3c.dom.ranges;
    exports org.w3c.dom.stylesheets;
    exports org.w3c.dom.traversal;
    exports org.w3c.dom.views;
    exports org.w3c.dom.xpath;
    exports org.xml.sax;
    exports org.xml.sax.ext;
    exports org.xml.sax.helpers;
    requires java.naming;
    requires java.logging;
    requires java.sql;
    requires java.desktop;
    requires java.security.jgss;
    provides javax.xml.transform.TransformerFactory with org.apache.xalan.processor.TransformerFactoryImpl;
    provides javax.xml.parsers.DocumentBuilderFactory with org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;
    provides org.apache.xalan.extensions.bsf.BSFManager with org.apache.bsf.BSFManager;
    provides javax.xml.datatype.DatatypeFactory with org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl;
    provides javax.xml.validation.SchemaFactory with org.apache.xerces.jaxp.validation.XMLSchemaFactory;
    provides org.w3c.dom.DOMImplementationSourceList with org.apache.xerces.dom.DOMXSImplementationSourceImpl;
    provides javax.xml.stream.XMLEventFactory with org.apache.xerces.stax.XMLEventFactoryImpl;
    provides javax.xml.xpath.XPathFactory with org.apache.xpath.jaxp.XPathFactoryImpl;
    provides org.xml.sax.driver with org.apache.xerces.parsers.SAXParser;
    provides javax.xml.parsers.SAXParserFactory with org.apache.xerces.jaxp.SAXParserFactoryImpl;
    provides org.apache.xml.dtm.DTMManager with org.apache.xml.dtm.ref.DTMManagerDefault;
}

编辑4 找不到我的module-info.java,所以不得不制作一个新的模块,猜想我一定在某个时候错误地将其删除了吗?但是,收到新错误:

error: the unnamed module reads package org.w3c.dom.html from both xml.apis and xercesImpl
error: the unnamed module reads package org.w3c.dom.html from both xml.apis and xercesImpl

error: the unnamed module reads package javax.xml from both xml.apis and java.xml
error: the unnamed module reads package javax.xml from both xml.apis and java.xml

error: the unnamed module reads package javax.xml.datatype from both xml.apis and java.xml
error: the unnamed module reads package javax.xml.datatype from both xml.apis and java.xml

error: the unnamed module reads package javax.xml.namespace from both xml.apis and java.xml
error: the unnamed module reads package javax.xml.namespace from both xml.apis and java.xml

100 errors

其中很多,但它们占用的空间过多

编辑5 我自己的module-info.java如下:

module ClassicAddonManager.main {
    requires javafx.controls;
    requires javafx.fxml;
    requires htmlunit;
    requires gson;
    requires zip4j;
    requires commons.io;

    opens com.CAM to javafx.fxml;
    exports com.CAM;
}

0 个答案:

没有答案