... when I type ./bin/logstash-plugin list
I get in response:
Cannot find class org/jruby/Main.
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jruby/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.findBootstrapClass(Native Method)
etc, etc.
My version of java is 1.8.0_151
I need to install the output exec plugin and this kind of error is preventing it
Set the environment variable DEBUG. Run bin/logstash-plugin and you should get something like
Using GEM_HOME=/usr/share/logstash/vendor/bundle/jruby/2.5.0
Using GEM_PATH=/usr/share/logstash/vendor/bundle/jruby/2.5.0
DEBUG: exec /usr/share/logstash/vendor/jruby/bin/jruby /usr/share/logstash/lib/pluginmanager/main.rb list
[...]
Then edit the file that is exec'd in the DEBUG line and (around line 129) uncomment
$JAVACMD -version
Then run bin/logstash-plugin again and see what version of java it found.
I am not a Java programmer. I am trying to set user environment varibles. What should the value of a new variable named DEBUG be. I need to give it a value.
On Windows if JAVA_HOME is set in the environment it will use that, otherwise it looks in the path. If you create a .bat file containing the following and run it which java does it find?
if defined JAVA_HOME (
set JAVA="%JAVA_HOME%\bin\java.exe"
) else (
for %%I in (java.exe) do set JAVA="%%~$PATH:I"
)
echo %JAVA%
There was no JAVA_HOME environment variable set. However there was a CS_JAVA_HOME environment variable which was pointing to ...\jre1.8.0_45. I changed this variable:
I then ran the .bat file you sent:
if defined JAVA_HOME (
set JAVA="%JAVA_HOME%\bin\java.exe"
) else (
for %%I in (java.exe) do set JAVA="%%~$PATH:I"
)
echo %JAVA%
I then ran a modified version:
if defined CS_JAVA_HOME (
set JAVA="%CS_JAVA_HOME%\bin\java.exe"
) else (
for %%I in (java.exe) do set JAVA="%%~$PATH:I"
)
echo %JAVA%
This was actually a non-issue. All I had to do was:
1) Do a clean install (64 Bit [important]) of Java - latest version, while removing older versions.
2) Set JAVA_HOME environment variable properly.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.