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.
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.