[英]logstash can't find jdk
I want to start using logstash and elastic search. 我想开始使用logstash和弹性搜索。 I followd the documentation from elastic
我遵循了Elastic的文档
https://www.elastic.co/guide/en/logstash/current/getting-started-with-logstash.html
https://www.elastic.co/guide/zh-CN/logstash/current/getting-started-with-logstash.html
and I want to start with this first demo command.I work on windows 10 64 bit. 我想从第一个演示命令开始。我在Windows 10 64位上工作。 So I downloaded the logstash.zip, opened the cmd and moved to the
因此,我下载了logstash.zip,打开了cmd并移至
C:\\Program Files\\Logstash\\logstash-6.3.1\\bin>
C:\\ Program Files \\ Logstash \\ logstash-6.3.1 \\ bin>
folder. 夹。 After that I entered
之后我进入
logstash -e 'input { stdin { } } output { stdout {} }'
logstash -e'输入{stdin {}}输出{stdout {}}'
and then I got an error that 然后我得到一个错误
Files\\Java\\jdk1.8.0_144\\bin can't be found or loaded.
找不到或加载Files \\ Java \\ jdk1.8.0_144 \\ bin。 (Sorry I develop in german and I don't know the english error message)
(对不起,我用德语开发,但我不知道英语错误消息)
I run eclipse and Java on this pc and the command 我在这台电脑和命令上运行eclipse和Java
javac
Java语言
shows 表演
> Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files and annotation processors
-cp <path> Specify where to find user class files and annotation processors
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compilation is done.
-processor <class1>[,<class2>,<class3>...] Names of the annotation processors to run; bypasses default discovery process
-processorpath <path> Specify where to find annotation processors
-parameters Generate metadata for reflection on method parameters
-d <directory> Specify where to place generated class files
-s <directory> Specify where to place generated source files
-h <directory> Specify where to place generated native header files
-implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-profile <profile> Check that API used is available in the specified profile
-version Version information
-help Print a synopsis of standard options
-Akey[=value] Options to pass to annotation processors
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
-Werror Terminate compilation if warnings occur
@<filename> Read options and filenames from file
and 和
java -version
Java版本
outputs 输出
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
so I guess this should be fine. 所以我想应该没问题。 Can anyone help me why logstash can't find it?
谁能帮我为什么logstash找不到它? Do I have to set some extra stuff?
我需要设置一些额外的东西吗? In Systemvariables I set jdk and jre to the "Path" Variable and I made a JAVA_HOME variable in Users Variables.
在Systemvariables中,将jdk和jre设置为“ Path”变量,并在“用户变量”中创建了JAVA_HOME变量。 Thanks in advance
提前致谢
Looks like your JAVA_HOME and PATH is messed up. 看起来您的JAVA_HOME和PATH搞砸了。 It has to be something like this
一定是这样的
JAVA_HOME = C:\Program Files\Java\jdk1.7.0_25
PATH = C:\Program Files\Java\jdk1.7.0_25\bin
To cross check you can try this in terminal 要进行交叉检查,您可以在终端中尝试
echo %JAVA_HOME%
and 和
javac -version
to check class PATH variable. 检查类PATH变量。
You can refer this link for step to step process to set variables. 您可以参考此链接来逐步设置变量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.