Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache MINA sshd | When I added the dependency and import it in the class I get "the type org.apache.sshd.client.SshClient is not accessible" error

I use Java 11 with JavaFX. When I added Apache MINA as a Maven dependency and then perform an import statement in the java class I get the following error message:

"The type org.apache.sshd.client.SshClient is not accessible"

I have added the dependency:

<dependency>
        <groupId>org.apache.sshd</groupId>
        <artifactId>sshd-core</artifactId>
        <version>2.8.0</version>
</dependency>

Then I import into class:

import org.apache.sshd.client.SshClient;

But it doesn't work. I get the above error. What am I doing wrong? Please help.

like image 615
sm-a Avatar asked Oct 15 '25 06:10

sm-a


1 Answers

The Mina library 2.8.0 isn’t modular as far as I can tell, so it will probably be easier to access and use it if you have no module info.

Create a non modular app without a module info.java file. Place your application code and the Mina libraries and dependencies on the class path. Add JavaFX modules through command line switches as those need to be accessed via the module path, not the class path.

Refer to the relevant documentation on non-modular applications at openjfx.io getting started.

like image 140
jewelsea Avatar answered Oct 17 '25 21:10

jewelsea



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!