簡體   English   中英

logstash找不到jdk

[英]logstash can't find jdk

我想開始使用logstash和彈性搜索。 我遵循了Elastic的文檔

https://www.elastic.co/guide/zh-CN/logstash/current/getting-started-with-logstash.html

我想從第一個演示命令開始。我在Windows 10 64位上工作。 因此,我下載了logstash.zip,打開了cmd並移至

C:\\ Program Files \\ Logstash \\ logstash-6.3.1 \\ bin>

夾。 之后我進入

logstash -e'輸入{stdin {}}輸出{stdout {}}'

然后我得到一個錯誤

找不到或加載Files \\ Java \\ jdk1.8.0_144 \\ bin。 (對不起,我用德語開發,但我不知道英語錯誤消息)

我在這台電腦和命令上運行eclipse和Java

Java語言

表演

> 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

Java版本

輸出

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)

所以我想應該沒問題。 誰能幫我為什么logstash找不到它? 我需要設置一些額外的東西嗎? 在Systemvariables中,將jdk和jre設置為“ Path”變量,並在“用戶變量”中創建了JAVA_HOME變量。 提前致謝

看起來您的JAVA_HOME和PATH搞砸了。 一定是這樣的

JAVA_HOME = C:\Program Files\Java\jdk1.7.0_25 
PATH = C:\Program Files\Java\jdk1.7.0_25\bin

要進行交叉檢查,您可以在終端中嘗試

echo %JAVA_HOME%

javac -version

檢查類PATH變量。

您可以參考此鏈接來逐步設置變量。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM