Compiled
I've compiled the java code, but I'm not able to run it. I compiled the code with the following:
javac -cp "streamer-client-java.jar:kafka-clients-3.4.0.jar:snappy-java-1.1.10.0.jar:lz4-java-1.8.0.jar:slf4j-api-2.0.7.jar:." EnduserCredentialExample.java
Currently, I'm getting this output:
Note: EnduserCredentialExample.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Tried running the compiled class
I also tried running with another approach:
java -cp "streamer-client-java.jar:kafka-clients-3.4.0.jar:snappy-java-1.1.10.0.jar:lz4-java-1.8.0.jar:slf4j-api-2.0.7.jar:." EnduserCredentialExample
Which, unfortunately, produces the following error:
Error: Could not find or load main class EnduserCredentialExample Caused by: java.lang.NoClassDefFoundError: com/quotemedia/streamer/client/example/EnduserCredentialExample (wrong name: EnduserCredentialExample)
And then I also tried running the code using .java (I added .java to it):
java -cp "streamer-client-java.jar:kafka-clients-3.4.0.jar:snappy-java-1.1.10.0.jar:lz4-java-1.8.0.jar:slf4j-api-2.0.7.jar:." EnduserCredentialExample.java
But this worked when running the normal java code but when I tried running the compiled class, I got this error:
Error: Could not find or load main class EnduserCredentialExample Caused by: java.lang.NoClassDefFoundError: com/quotemedia/streamer/client/example/EnduserCredentialExample (wrong name: EnduserCredentialExample)