Cannot Start .\elasticsearch.bat on windows

Last month I installed V8.3.2 on windows 2022, everything was ok, but today I stop and deleted V8.3.2, and downloaded 8.4.2 from the official website, use the same config, the system reported an error and could not start, the error is:

PS D:\Elastic\elasticsearch-01\bin> .\elasticsearch.bat
Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/cli/ProcessInfo
        at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:52)
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.cli.ProcessInfo
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 1 more

how should I solve it? Is it because I deleted the old version?

Try to go up 1 directory and run

.\bin\elasticsearch.bat

thank for your reply, but still same error:

PS D:\Elastic\elasticsearch-01> .\bin\elasticsearch.bat
Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/cli/ProcessInfo
        at org.elasticsearch.launcher.CliToolLauncher.main(CliToolLauncher.java:52)
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.cli.ProcessInfo
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 1 more

Did you just unzip or do the installer?

Did you follow this?

Did you completely clean up or are you trying to upgrade?

Are trying to set your own JDK?

Are there environment variable set?

Is ES_JAVA_HOME still set somewhere? If you want to use the included JDK make sure that is not set.

Oh and @miawu8 Welcome to the community!

Thanks for your suggestion!
I re-checked all the steps and I found the zip file 'elasticsearch-8.4.2-windows-x86_64' use 'sha512' check fail :scream:, I guess should be an error in the download process, after re-downloading and decompressing everything is ok.
I made a low-level mistake and wasting your time, I'm so sory :sweat_smile: .
Thanks again.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.