You are not logged in.

#1 2024-01-03 18:27:46

Inatrox
Member
Registered: 2023-09-11
Posts: 26

jshell not found [SOLVED]

Hello,

i have installed jdk17-openjdk and jre17-openjdk. Now i want to use jshell, but when i try to write jshell in the termin the command can not found.

bash: jshell: Command not found.

Can maybe someohne help me with that? Im new into the Jarva world and dont know what to do there.

Thanks!

Last edited by Inatrox (2024-01-04 13:38:31)

Offline

#2 2024-01-03 18:31:55

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: jshell not found [SOLVED]

What does `archlinux-java status` show? I'm guessing you've got a runtime-only set as default.

Online

#3 2024-01-03 18:33:18

Inatrox
Member
Registered: 2023-09-11
Posts: 26

Re: jshell not found [SOLVED]

Available Java environments:
  java-11-openjdk
  java-17-openjdk (default)
  java-21-openjdk

Offline

#4 2024-01-03 18:58:32

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: jshell not found [SOLVED]

So that's fine. How about `echo $PATH`?

Online

#5 2024-01-03 19:04:07

Inatrox
Member
Registered: 2023-09-11
Posts: 26

Re: jshell not found [SOLVED]

/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

Offline

#6 2024-01-03 19:17:27

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: jshell not found [SOLVED]

That's really odd, no problem there. Can you verify that /usr/lib/jvm/default/bin/jshell exists?

Last edited by Scimmia (2024-01-03 19:17:55)

Online

#7 2024-01-04 07:25:50

Inatrox
Member
Registered: 2023-09-11
Posts: 26

Re: jshell not found [SOLVED]

Doesnt exist there. Only this things are in there:

java  jfr  jrunscript  keytool  rmiregistry

Offline

#8 2024-01-04 07:37:07

just4arch
Member
Registered: 2023-01-07
Posts: 126

Re: jshell not found [SOLVED]

What's the output of

realpath /usr/lib/jvm/default/bin/

Offline

#9 2024-01-04 07:47:29

Inatrox
Member
Registered: 2023-09-11
Posts: 26

Re: jshell not found [SOLVED]

/usr/lib/jvm/java-17-openjdk/bin

In this folder are the same files:

java  jfr  jrunscript  keytool  rmiregistry

Offline

#10 2024-01-04 13:13:36

astralc
Member
Registered: 2022-09-17
Posts: 127

Re: jshell not found [SOLVED]

are you sure you have `jdk17-openjdk` installed? it look like you only have jre.

Offline

#11 2024-01-04 13:38:16

Inatrox
Member
Registered: 2023-09-11
Posts: 26

Re: jshell not found [SOLVED]

Now i deinstalled all java packages and reinstalled them. Now it seems to work. Is it maybe possible, that an jre install after an jdk overides the jdk package?

Thanks for the help smile

Offline

Board footer

Powered by FluxBB