0

Following this suggest: Hazelcast access using CLI I tried to run Hazelcast console in the following way:

1) Downloaded file hazelcast-client-X.Y.Z.jar

2) Run

/path/to/java -cp "/path/to/hazelcast-client-X.Y.Z.jar"  com.hazelcast.client.console.ClientConsoleApp

and I got

Error: Could not find or load main class com.hazelcast.client.console.ClientConsoleApp

Any suggest?

Thanks

pacionet
  • 183
  • 4
  • 15

2 Answers2

0

ClientConsoleApp is not included in hazelcast-client.jar. Use hazelcast-all.jar instead. I just checked the latest version and ClientConsoleApp works fine.

$ java -cp hazelcast-all-3.12.jar  com.hazelcast.client.console.ClientConsoleApp
Apr 12, 2019 9:02:15 AM com.hazelcast.config.AbstractConfigLocator
INFO: Loading 'hazelcast-client-default.xml' from the classpath.
Apr 12, 2019 9:02:18 AM com.hazelcast.client.HazelcastClient
...
Rafał Leszko
  • 4,939
  • 10
  • 19
0

I wrote a simple shell script to automate the process of:

  1. Downloading the correct version of hazelcast-all-<version>.jar (containing the ClientConsoleApp class),
  2. Creating the appropriate hazelcast-client.xml file for connecting to the cluster: https://github.com/YongJieYongJie/hazelcast-cli, and
  3. Running the appropriate java command actually connect to the cluster.

Hope this proves helpful.

(Note: This is based on discussion over at this question: Hazelcast access using CLI)

yongjieyongjie
  • 813
  • 10
  • 18