Kafka on RHEL gives me "Classpath Is Empty" - linux

I'm trying to install Kafka 2.6.0 on a Red Hat VM. When I try to start Zookeeper, I get:
"Classpath is empty. Please build the project first..."
I have the following Java Version, which is Java 8 as far as I understand:
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
Is there something I need to do to set a "Classpath" environment variable?

I updated .bashrc for my users and the Classpath error went away.
Source: https://computingforgeeks.com/how-to-set-java_home-on-centos-fedora-rhel

Related

GraphDB free does not run on Windows 10

I have tried to install GraphDB free 9.0.0 on a Windows 10 laptop (x64). The installation finishes succesfully but when I double click GraphDB it does not run. What should I check in order to fiind out why it does not run?
Thank you
I install GDB regularly on Windows 10 using the installer (eg GraphDB_Free-9.3.0.exe). It comes bundled with Java. Here's the version:
cd C:\Users\vladimir.alexiev.000\AppData\Local\GraphDB Free\runtime\bin
java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
It's convenient because after starting, it opens Workbench in your browser, and a small control panel where you can see the log etc, and a tray icon.
If you use one of the other distributions, check your Java version.

Logstash cannot run

I cannot run logstash on my windows-10 machine. What I have done so far:
Unzipped logastash-oss-7.2.0.zip
Verified that I have java installed and on path via java -version:
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
openjdk version "1.8.0_212"
OpenJDK Runtime Environment Corretto-8.212.04.2 (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM Corretto-8.212.04.2 (build 25.212-b04, mixed mode)
When I run in unzipped ./bin directory logstash --version
"warning: ignoring JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS"
warning: ignoring JAVA_OPTS=-Dfile.encoding=UTF-8; pass JVM parameters via LS_JAVA_OPTS
There is nothing in logs. What I am doing wrong, why there is no output ?
Another java programs runs fine and I have also set LS_JAVA_OPTS, but this does not helped.

How do I fix JavaFX runtime components are missing?

I have the following installed on Ubuntu 18.04.1 LTS:
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)
javafx.runtime.version=8.0.161
javafx.runtime.build=b00
However I try to run the sample java application that uses javafx I get the following error:
$ java -jar Untitled.jar
Error: JavaFX runtime components are missing, and are required to run this application
I have tried to run it in Eclipse, Intelli, and in the terminal with the same error.
I have set the classpath
:~$ echo $CLASSPATH
/usr/share/java/openjfx/jre/lib/ext/jfxrt.jar:.
I have copied all of the javafx files to the current directory.
I have tried everything I can find on the internet.
Does anyone know how to fix this?
On Ubuntu 18.04 with openjdk-11-jre and openjfx installed you could use:
% java --module-path /usr/share/openjfx/lib --add-modules ALL-MODULE-PATH \
-jar Untitled.jar
There is more information on how to run JavaFX programs at the openjfx.io site.

OpenJDK 9 IntelliJ IDEA (Ubuntu) "Can't resolve Symbol"

I recently installed openJDK 9 under Ubuntu 17.10 and it seems like IntelliJ IDEA has trouble with it.
Whenever I create a new project IntelliJ can find the JDK, but it seems like it's not configuring it the right way. Here is how it looks like
when I create a HelloWorld.java example it looks like this
and it says 'Can't resolve symbol 'String''.
Everything works fine when I compile via terminal and even with Eclipse.
When I type 'java --version' it says
openjdk 9-Ubuntu
OpenJDK Runtime Environment (build 9-Ubuntu+0-9b181-4)
OpenJDK 64-Bit Server VM (build 9-Ubuntu+0-9b181-4, mixed mode)
Is there a way to fix this problem?
The problem is related to Debian packaging of openjdk-9 in the lib/jrt-fs.jar file. This file is compiled incorrectly.
This bug is reported here and there is a more complete Answer here.
If you insist to make use of openjdk you might wait for the new versions or try to build it from the source using the recommended options on the launchpad.

Why can not I run Intellij on Linux Mint for Java version error?

When I try to run intellij, it shows the following message-
Can not start under java 1.7.0_51-b13:Java 1.8 or later is required!
But when I checked the version of the Java in the machine-
java -version
I get-
java version "1.8.0_60" Java(TM) SE Runtime Environment (build
1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
What could be the reason for not working this?
Newer versions of IntelliJ IDEA explicitly require Java 8 to run.
Some things that can be done:
Uninstall older versions of Java
Ensure that which java points to the correct version of Java
Ensure that Java 8 is selected via update-alternatives --config java
Check the variables IDEA_JDK, JDK_HOME, and JAVA_HOME, and be sure they don't point to Java 7. If all else fails, IDEA defaults to whichever java is on the path, so unsetting those variables may be a viable option.
Can you check if you have a JAVA_HOME env variable set ? If yes, it might use this version instead of the java binary available in your path.

Resources