You are not logged in.

#1 2021-07-13 03:30:51

lyhokia
Member
Registered: 2021-01-07
Posts: 20

[SOLVED] jshell not found after install package jdk-openjdk

I'm trying to run jshell, so I try the following:

```
paru -S jdk-openjdk 
```

And then I add this to fish:

```
set     JAVA_HOME           /usr/lib/jvm/default
```

I restart the shell and try to invoke jshell, and it replies:

```
jshell may be found in the following packages:
  extra/jdk-openjdk 15.0.2.u7-1       /usr/lib/jvm/java-15-openjdk/bin/jshell
  extra/jdk11-openjdk 11.0.11.u9-1    /usr/lib/jvm/java-11-openjdk/bin/jshell
```

I've installed openjdk 16, here's the version information:

```
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9)
OpenJDK 64-Bit Server VM (build 16.0.1+9, mixed mode)
```

So I don't know why this happens. I'll be appreciated if you could help me.

Thanks a lot!

Last edited by lyhokia (2021-07-13 03:54:13)

Offline

#2 2021-07-13 03:39:40

loqs
Member
Registered: 2014-03-06
Posts: 19,009

Re: [SOLVED] jshell not found after install package jdk-openjdk

What happens if you execute /usr/lib/jvm/java-16-openjdk/bin/jshell ?

Offline

#3 2021-07-13 03:53:05

lyhokia
Member
Registered: 2021-01-07
Posts: 20

Re: [SOLVED] jshell not found after install package jdk-openjdk

Yeah, that seems to be the problem. I added that to path then it works, thanks a lot!

Offline

Board footer

Powered by FluxBB