«Ошибка: не удалось найти или загрузить основной класс #» при открытии Groovy консоли - PullRequest
1 голос
/ 15 октября 2019

Когда я пытаюсь открыть groovyConsole.bat, я получаю следующую ошибку

Ошибка: не удалось найти или загрузить основной класс #

Попытка устранения неполадок приведена ниже.

1) Проверил переменную env и выдал следующее

java_home: C: \ Program Files \ Java \ jdk1.8.0_221

Путь:% java_home%\ bin

2) Проверено также окружение Groovy

groovy_home: H: \ Documents \ Groovy-2.4.3

Путь:% groovy_home% \ bin

3) Переустановленная java

Журналы, когда я выполняю с set DEBUG=1

H: \ Documents \ groovy-2.5.8\ bin> if "Windows_NT" == "Windows_NT" setlocal

H: \ Documents \ groovy-2.5.8 \ bin> set DIRNAME = H: \ Documents \ groovy-2.5.8 \ bin \

H: \ Documents \ groovy-2.5.8 \ bin> если "H: \ Documents \ groovy-2.5.8 \ bin \" == "" установить DIRNAME =. \

H:\ Documents \ groovy-2.5.8 \ bin> "H: \ Documents \ groovy-2.5.8 \ bin \ startGroovy.bat" "H: \ Documents \ groovy-2.5.8 \ bin \" groovy.ui.Console

H: \ Documents \ groovy-2.5.8 \ bin> if "Windows_NT" == "Windows_NT" setlocal enabledelayedexpansion

H: \ Documents \ groovy-2.5.8 \ bin> set DIRNAME = H: \ Documents \ groovy-2.5.8 \ bin \

H: \ Documents \ groovy-2.5.8 \ bin> shift

H: \ Documents \ groovy-2.5.8 \ bin> установить CLASS = groovy.ui.Console

H: \ Documents \ groovy-2.5.8 \ bin> shift

H: \ Documents \ groovy-2.5.8 \ bin>, если существует"C: \ Users \ cogsujarulraj / .groovy / preinit.bat" вызывает "C: \ Users \ cogsujarulraj / .groovy / preinit.bat"

H: \ Documents \ groovy-2.5.8 \ bin>set COMMAND_COM = "cmd.exe"

H: \ Documents \ groovy-2.5.8 \ bin> если существует "C: \ WINDOWS \ system32 \ cmd.exe" set COMMAND_COM = "C: \ WINDOWS \system32 \ cmd.exe "

H: \ Documents \ groovy-2.5.8 \ bin> если существует" C: \ WINDOWS \ command.com "set COMMAND_COM =" C: \ WINDOWS \ command.com "

H: \ Documents \ groovy-2.5.8 \ bin> set FIND_EXE = "find.exe"

H: \ Documents \ groovy-2.5.8 \ bin> если существует "C: \ WINDOWS \ system32 \ find.exe "set FIND_EXE =" C: \ WINDOWS \ system32 \ find.exe "

H: \ Documents \ groovy-2.5.8 \ bin> если существует" C: \ WINDOWS \ command \ find.exe "set FIND_EXE =" C: \ WINDOWS \ command \ find. exe "

H: \ Documents \ groovy-2.5.8 \ bin>, если не" C: \ Program Files \ Java \ jdk1.8.0_221 "==" "goto have_JAVA_HOME

H: \ Documents \ groovy-2.5.8 \ bin> if "1" == "\" SET JAVA_HOME = C: \ Program Files \ Java \ jdk1.8.0_22

H: \ Documents \ groovy-2.5.8 \ bin> "C: \ WINDOWS \ system32 \ cmd.exe" / C DIR "C: \ Program Files \ Java \ jdk1.8.0_221" 2> & 1 |"C: \ WINDOWS \ system32 \ find.exe" / I / C "C: \ Program Files \ Java \ jdk1.8.0_221" 1> nul

H: \ Documents \ groovy-2.5.8 \bin> если нет, уровень ошибки 1, перейдите к valid_JAVA_HOME_DIR

H: \ Documents \ groovy-2.5.8 \ bin> set JAVA_EXE = C: \ Program Files \ Java \ jdk1.8.0_221 \ bin \ java.exe

H: \ Documents \ groovy-2.5.8 \ bin> если существует, «C: \ Program Files \ Java \ jdk1.8.0_221 \ bin \ java.exe» перейти к valid_JAVA_HOME

H: \Документы \ groovy-2.5.8 \ bin> если существует, "C: \ Program Files \ Java \ jdk1.8.0_221 \ lib \ tools.jar" set TOOLS_JAR = C: \ Program Files \ Java \ jdk1.8.0_221 \ lib \tools.jar

H: \ Documents \ groovy-2.5.8 \ bin> if "H: \ Documents \ groovy-2.5.8" == "" set GROOVY_HOME = H: \ Documents \ groovy-2.5.8 \ bin ..

H: \ Documents \ groovy-2.5.8 \ bin> if "8" == "\" SET GROOVY_HOME = H: \ Documents \ groovy-2.5.

H: \ Documents \ groovy-2.5.8 \ bin> set _SKIP = 2

H: \ Documents \ groovy-2.5.8 \ bin> set CP =

H: \ Documents \ groovy-2.5.8 \ bin> если "x" == "x-cp", установить CP =

H: \ Documents \ groovy-2.5.8 \ bin> if "x"==" x-classpath "установить CP =

H: \ Documents \ groovy-2.5.8 \ bin> если" x "==" x - classpath "установить CP =

H: \ Documents \ groovy-2.5.8 \ bin> if "x" == "x" goto preview_check

H: \ Documents \ groovy-2.5.8 \ bin> set PREV =

H: \ Documents \ groovy-2.5.8 \ bin> set REPLACE_PREVIEW =

H: \ Documents \ groovy-2.5.8 \ bin> if "x" == "x-pr" перейтиpreview_enable

H: \ Documents \ groovy-2.5.8 \ bin> if "x" == "x - enable-preview" перейти к preview_enable

H: \ Documents \ groovy-2.5.8 \ bin> перейти к init

H: \ Documents \ groovy-2.5.8 \ bin> установить GROOVY_SCRIPT_NAME =

H: \ Documents \ groovy-2.5.8 \ bin>, если нет"Windows_NT" == "Windows_NT" перейти к win9xME_args

H: \ Documents \ groovy-2.5.8 \ bin> if "eval [2 + 2]" == "4" перейти к 4NT_args

H: \ Documents \ groovy-2.5.8 \ bin> set CMD_LINE_ARGS =

H: \ Documents \ groovy-2.5.8 \ bin> if "x" == "x" перейти к выполнению

H: \ Documents \ groovy-2.5.8 \ bin> set STARTER_CLASSPATH = H: \ Documents \ groovy-2.5.8 \ lib \ groovy-2.5.8.jar

H: \ Documents \groovy-2.5.8 \ bin> если существует, "C: \ Users \ cogsujarulraj / .groovy / init.bat" вызывает "C: \ Users \ cogsujarulraj / .groovy / init.bat"

H: \Документы \ groovy-2.5.8 \ bin> if "x" == "x" goto empty_cp

H: \ Documents \ groovy-2.5.8 \ bin> установить CP =.

H: \ Documents \ groovy-2.5.8 \ bin> if "x" == "x" goto after_cp

H: \ Documents \ groovy-2.5.8 \ bin> setSTARTER_MAIN_CLASS = org.codehaus.groovy.tools.GroovyStarter

H: \ Documents \ groovy-2.5.8 \ bin> set STARTER_CONF = H: \ Documents \ groovy-2.5.8 \ conf \ groovy-starter. conf

H: \ Documents \ groovy-2.5.8 \ bin> set GROOVY_OPTS = -Dprogram.name = ""

H: \ Documents \ groovy-2.5.8 \ bin> setGROOVY_OPTS = -Dprogram.name = "" -Dgroovy.home = "H: \ Documents \ groovy-2.5.8"

H: \ Documents \ groovy-2.5.8 \ bin> если нет "C:\ Program Files \ Java \ jdk1.8.0_221 \ lib \ tools.jar "==" "set GROOVY_OPTS = -Dprogram.name =" "-Dgroovy.home =" H: \ Documents \ groovy-2.5.8 "-Dtools.jar = "C: \ Program Files \ Java \ jdk1.8.0_221 \ lib \ tools.jar"

H: \ Documents \ groovy-2.5.8 \ bin> set GROOVY_OPTS = -Dprogram.name ="" -Dgroovy.home = "H: \ Documents \ groovy-2.5.8" -Dtools.jar = "C: \ Program Files \ Java \ jdk1.8.0_221 \ lib \ tools.jar" -Dgroovy.starter.conf= "H: \ Documents \ groovy-2.5.8 \ conf \ groovy-starter.conf"

H: \ Documents \ groovy-2.5.8 \ bin> set GROOVY_OPTS = -Dprogram.name = "" -Dgroovy.home = "H: \ Documents \ groovy-2.5.8" -Dtools.jar = "C: \ Program Files\ Java \ jdk1.8.0_221 \ lib \ tools.jar "-Dgroovy.starter.conf =" H: \ Documents \ groovy-2.5.8 \ conf \ groovy-starter.conf "-Dscript.name =" "

H: \ Documents \ groovy-2.5.8 \ bin> для / F "токены = 3"% g in ('вызов "C: \ Program Files \ Java \ jdk1.8.0_221 \ bin \ java.exe"-version 2> & 1 |findstr / i "version" ') do (SET JAVA_VERSION =% g)

H: \ Documents \ groovy-2.5.8 \ bin> (SET JAVA_VERSION = "1.8.0_221")

H: \ Documents \ groovy-2.5.8 \ bin> for / F "маркеры использования" = * "% a in ('" 1.8.0_221 "') установите JAVA_VERSION =% ~ a

H:\ Documents \ groovy-2.5.8 \ bin> установить JAVA_VERSION = 1.8.0_221

H: \ Documents \ groovy-2.5.8 \ bin> установить JAVA_VERSION = 1.8.0

H:\ Documents \ groovy-2.5.8 \ bin> set ADD_MODULES_OPT = - add-modules

H: \ Documents \ groovy-2.5.8 \ bin> if "1.8.0" GTR "1.8.0"set JAVA_OPTS = -Dhttp.proxyHost = host -Dhttp.proxyPort = 80 -Dhttp.proxyUser = sarulraj -Dhttp.proxyPassword = changethis -Dhttps.proxyHost = host -Dhttps.proxyPort = 80 -Dhttps.proxyhserserchangethis -Djavax.net.ssl.keyStoreType = crt -Djavax.net.ssl.trustStoreType = jks -Djavax.net.ssl.keyStore = pit-wvrpnpd_j_co_uk.crt -Djavax.net.ssl.trustStore = vROps_foj.xnet.debug = ssl # очень подробный отладчик -Djavax.net.ssl.keyStorePassword = foxvrops -Djavax.net.ssl.trustStorePassword = foxvrops -Dgroovy.jaxb = jaxb

H: \ Documents \ groovy-2.5.8 \ bin> if "1.8.0" GTR "1.8.0" if "" == "true" установить JAVA_OPTS= -Dhttp.proxyHost = хост -Dhttp.proxyPort = 80-Dhttp.proxyUser = пользователь -Dhttp.proxyPassword = изменить это -Dhttps.proxyHost = хост -Dhttps.proxyPort = 80 -Dhttps.proxyUser = пользователь -Dhttps.proxyPassword = changethis -Djavax.net.ssl.keyStoreType = crt.ssl.trustStoreType = jks -Djavax.net.ssl.keyStore = pit-wvrpnpd_j_co_uk.crt -Djavax.net.ssl.trustStore = vROps_fox.jks -Djavax.net.debug = ssl # очень подробный отладчик.jax.keyStorePassword = foxvrops-Djavax.net.ssl.trustStorePassword = foxvrops --add-opens = java.base / java.io = ALL-UNNAMED --add-opens = java.base / java.lang = ALL-UNNAMED --add-opens =java.base / java.lang.annotation = ALL-UNNAMED --add-opens = java.base / java.lang.invoke = ALL-UNNAMED --add-opens = java.base / java.lang.module = ALL-UNNAMED --add-opens = java.base / java.lang.ref = ALL-UNNAMED --add-opens = java.base / java.lang.reflect = ALL-UNNAMED --add-opens = java.base / java.math = ALL-UNNAMED --add-opens = java.base / java.net = ALL-UNNAMED --add-opens = java.base / java.net.spi = ALL-UNNAMED --add-opens = java. base / java.nio = ALL-UNNAMED --add-opens = java.base / java.nio.channels = ALL-UNNAMED --add-opens = java.base / java.nio.channels.spi = ALL-UNNAMED --add-opens = java.base / java.nio.charset = ALL-UNNAMED --add-opens = java.base / java.nio.charset.spi = ALL-UNNAMED --add-opens = java.base / java.nio.file = ALL-UNNAMED --add-opens = java.base / java.nio.file.attribute = ALL-UNNAMED --add-opens = java.base / java.nio.file.spi = ALL-UNNAMED--add-opens = java.base / java.security = ALL-UNNAMED --add-opens = java.base / java.security.acl = ALL-UNNAMED --add-opens = java.base / java.security.cert = ALL-UNNAMED --add-opens = java.base / java.security.interfaces = ALL-UNNAMED--add-opens = java.base / java.security.spec = ALL-UNNAMED --add-opens = java.base / java.text = ALL-UNNAMED --add-opens = java.base / java.text. spi = ALL-UNNAMED --add-opens = java.base / java.time = ALL-UNNAMED --add-opens = java.base / java.time.chrono = ALL-UNNAMED --add-opens = java.base/java.time.format=ALL-UNNAMED --add-opens = java.base / java.time.temporal = ALL-UNNAMED --add-opens = java.base / java.time.zone = ALL-UNNAMED -add-opens = java.base / java.util = ALL-UNNAMED --add-opens = java.base / java.util.concurrent = ALL-UNNAMED --add-opens = java.base / java.util.concurrent. atomic = ALL-UNNAMED --add-opens = java.base / java.util.concurrent.locks = ALL-UNNAMED --add-opens = java.base / java.util.function = ALL-UNNAMED --add-opens= java.base / java.util.jar = ALL-UNNAMED --add-opens = java.base / java.util.regex = ALL-UNNAMED --add-opens = java.base / java.util.spi = ВСЕ-UNNAMED --add-opens = java.base / java.util.stream= ALL-UNNAMED --add-opens = java.base / java.util.zip = ALL-UNNAMED --add-opens = java.datatransfer / java.awt.datatransfer = ALL-UNNAMED --add-opens = java. desktop / java.applet = ALL-UNNAMED --add-opens = java.desktop / java.awt = ALL-UNNAMED --add-opens = java.desktop / java.awt.color = ALL-UNNAMED --add-opens= java.desktop / java.awt.desktop = ALL-UNNAMED --add-opens = java.desktop / java.awt.dnd = ALL-UNNAMED --add-opens = java.desktop / java.awt.dnd.peer= ALL-UNNAMED --add-opens = java.desktop / java.awt.event = ALL-UNNAMED --add-opens = java.desktop / java.awt.font = ALL-UNNAMED --add-opens = java. desktop / java.awt.geom = ALL-UNNAMED --add-opens = java.desktop / java.awt.im = ALL-UNNAMED --add-opens = java.desktop / java.awt.im.spi = ALL-UNNAMED --add-opens = java.desktop / java.awt.image = ALL-UNNAMED --add-opens = java.desktop / java.awt.image.renderable = ALL-UNNAMED --add-opens = java.desktop/java.awt.peer=ALL-UNNAMED --add-opens = java.desktop / java.awt.print = ALL-UNNAMED --add-opens = java.desktop / java.beans = ALL-UNNAMED --add-открывает = java.desktop / java.beans.beancontext= ALL-UNNAMED --add-opens = java.instrument / java.lang.instrument = ALL-UNNAMED --add-opens = java.logging / java.util.logging = ALL-UNNAMED --add-opens = java. management / java.lang.management = ALL-UNNAMED --add-opens = java.prefs / java.util.prefs = ALL-UNNAMED --add-opens = java.rmi / java.rmi = ALL-UNNAMED --add-opens = java.rmi / java.rmi.activation = ALL-UNNAMED --add-opens = java.rmi / java.rmi.dgc = ALL-UNNAMED --add-opens = java.rmi / java.rmi.registry= ALL-UNNAMED --add-opens = java.rmi / java.rmi.server = ALL-UNNAMED --add-opens = java.sql / java.sql = ALL-UNNAMED --add-opens = java.desktop /javax.swing = ALL-UNNAMED --add-opens = java.desktop / javax.swing.border = ALL-UNNAMED --add-opens = java.desktop / javax.swing.text = ALL-UNNAMED --add-opens= java.desktop / javax.swing.text.html = ALL-UNNAMED --add-opens = java.desktop / sun.awt.windows = ALL-UNNAMED --add-opens = java.desktop / sun.awt = ВСЕ-UNNAMED --add-opens = java.desktop / sun.java2d = ВСЕ НЕИЗВЕСТНО --add-opens = java.desktop / sun.font = ВСЕ НЕИЗВЕСТНО *

H: \ Documents \ groovy-2.5.8 \ bin> если существует"C: \ Users \ cogsujarulraj / .groovy / postinit.bat" вызывает "C: \ Users \ cogsujarulraj / .groovy / postinit.bat"

H: \ Documents \ groovy-2.5.8 \ bin>"C: \ Program Files \ Java \ jdk1.8.0_221 \ bin \ java.exe" -Dprogram.name = "" -Dgroovy.home = "H: \ Documents \ groovy-2.5.8" -Dtools.jar = "C: \ Program Files \ Java \ jdk1.8.0_221 \ lib \ tools.jar "-Dgroovy.starter.conf =" H: \ Documents \ groovy-2.5.8 \ conf \ groovy-starter.conf "-Dscript.name= "" -Dhttp.proxyHost = host -Dhttp.proxyPort = 80 -Dhttp.proxyUser = user -Dhttp.proxyPassword = changethis -Dhttps.proxyHost = host -Dhttps.proxyPort = 80 -Dhttps.proxyUser = user -Dhttps. changethis -Djavax.net.ssl.keyStoreType = crt -Djavax.net.ssl.trustStoreType = jks -Djavax.net.ssl.keyStore = pit-wvnpd_j_co_uk.crt -Djavax.net.ssl.trustStore = vROps_foj.jks. net.debug = ssl # очень подробный отладчик -Djavax.net.ssl.keyStorePassword = foxvrops -Djavax.net.ssl.trustStorePassword = foxvrops -classpath "H: \ Documents \ groovy-2.5.8 \ lib \ groovy-2.5.8.jar "org.codehaus.groovy.tools.GroovyStarter - основной класс. ui.Console --conf "H: \ Documents \ groovy-2.5.8 \ conf \ groovy-starter.conf" --classpath "."
Ошибка: не удалось найти или загрузить основной класс #

H: \ Documents \ groovy-2.5.8 \ bin> if "Windows_NT" == "Windows_NT" endlocal

H: \ Documents \ groovy-2.5.8 \ bin> if "" == "в"pause

H: \ Documents \ groovy-2.5.8 \ bin> C: \ WINDOWS \ system32 \ cmd.exe / C выход / B 1

...