You are not logged in.

#1 2016-01-27 10:03:51

donnut
Member
Registered: 2015-06-12
Posts: 16

[SOLVED] not a valid Java environmet path

Previously I installed java-8 jre from Oracle. I removed that version (by deleting /usr/lib/jvm/* and /usr/bin/java) and installed the official Arch linux version
jdk8-openjdk and jre8-openjdk. During installation of both packaged I got the message:

'/usr/lib/jvm/java-8-openjdk' is not a valid Java environment path

When trying to run

archlinux-java set java-8-openjdk

it echos the same error message.

Running

archlinux-java fix

gives the result: "No valid Java environment found"

I've tryed it with both the JAVA_HOME set and unset

Any thoughs hwo to solve this issue?

Last edited by donnut (2016-01-27 15:47:53)

Offline

#2 2016-01-27 14:52:14

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,542

Re: [SOLVED] not a valid Java environmet path

archlinux-java list?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2016-01-27 14:54:19

donnut
Member
Registered: 2015-06-12
Posts: 16

Re: [SOLVED] not a valid Java environmet path

archlinux-java status gives:

Available Java environments:
  java-8-openjdk
No Java environment set as default

Offline

#4 2016-01-27 14:54:24

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

Re: [SOLVED] not a valid Java environmet path

He means archlinux-java status

Edit, too late. One thing I notice, though, is that it doesn't list the jre with it. Why is that? jre8-openjdk is a dep of jdk8-openjdk.

Edit2, did you log out and log back in after installing them?

Last edited by Scimmia (2016-01-27 14:59:40)

Offline

#5 2016-01-27 15:03:08

donnut
Member
Registered: 2015-06-12
Posts: 16

Re: [SOLVED] not a valid Java environmet path

I did install jre seperately too.  When I run pacman -Qe it says:

...
jdk8-openjdk 8.u72-1
jfsutils 1.1.15-4
jre8-openjdk 8.u72-1
...

Offline

#6 2016-01-27 15:10:16

donnut
Member
Registered: 2015-06-12
Posts: 16

Re: [SOLVED] not a valid Java environmet path

I did logout and back in again, but the result stays the same.

Offline

#7 2016-01-27 15:19:27

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

Re: [SOLVED] not a valid Java environmet path

What do you have in /usr/lib/jvm/, does /usr/lib/jvm/java-8-openjdk/jre/ exist?

Last edited by Scimmia (2016-01-27 15:20:17)

Offline

#8 2016-01-27 15:31:32

donnut
Member
Registered: 2015-06-12
Posts: 16

Re: [SOLVED] not a valid Java environmet path

ls -l /usr/lib/jvm

total 4,0K
drwxr-xr-x 6 root root 4,0K 27 jan 10:34 java-8-openjdk

ls -l /usr/lib/jvm/java-8-openjdk/

drwxr-xr-x 2 root root 4,0K 27 jan 16:08 bin
drwxr-xr-x 3 root root 4,0K 27 jan 16:08 include
drwxr-xr-x 4 root root 4,0K 20 jan 16:30 jre
drwxr-xr-x 3 root root 4,0K 27 jan 16:08 lib

Maybe strange, because no executable:
ls -l /usr/lib/jvm/java-8-openjdk/jre/bin

policytool

Offline

#9 2016-01-27 15:35:34

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

Re: [SOLVED] not a valid Java environmet path

donnut wrote:

Maybe strange, because no executable:
ls -l /usr/lib/jvm/java-8-openjdk/jre/bin

policytool

Yeah, that's a problem. Try reinstalling jre8-openjdk

Offline

#10 2016-01-27 15:39:33

donnut
Member
Registered: 2015-06-12
Posts: 16

Re: [SOLVED] not a valid Java environmet path

I reinstalled jre8-openjdk and got the following log:

resolving dependencies...
looking for conflicting packages...

Packages (1) jre8-openjdk-8.u72-1

Total Installed Size:  0,38 MiB
Net Upgrade Size:      0,00 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                                                     [################################################] 100%
(1/1) checking package integrity                                                   [################################################] 100%
(1/1) loading package files                                                        [################################################] 100%
(1/1) checking for file conflicts                                                  [################################################] 100%
(1/1) checking available disk space                                                [################################################] 100%
(1/1) reinstalling jre8-openjdk                                                    [################################################] 100%
'/usr/lib/jvm/java-8-openjdk/jre' is not a valid Java environment path

The content of /usr/lib/jvm/java-8-openjdk/jre/bin stays unchanged.

Offline

#11 2016-01-27 15:43:09

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

Re: [SOLVED] not a valid Java environmet path

Ah! It's jre8-openjdk-headless that includes the executables. It's a dep of jre8-openjdk

Offline

#12 2016-01-27 15:44:14

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,622
Website

Re: [SOLVED] not a valid Java environmet path

donnut wrote:

I did install jre seperately too.  When I run pacman -Qe it says:

...
jdk8-openjdk 8.u72-1
jfsutils 1.1.15-4
jre8-openjdk 8.u72-1
...

You appear to be missing jre8-openjdk-headless, which includes /usr/lib/jvm/java-8-openjdk/jre/bin/java etc.. I'm not sure how you managed that, as jre8-openjdk depends on it. Do you have anything installed that "provides" jre8-openjdk-headless?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#13 2016-01-27 15:45:00

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] not a valid Java environmet path

Despite the description of  jre8-openjdk, the binaries are all in jre8-openjdk-headless


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#14 2016-01-27 15:47:01

donnut
Member
Registered: 2015-06-12
Posts: 16

Re: [SOLVED] not a valid Java environmet path

Yes, that solves the problem. archlinux-java status now reports:

Available Java environments:
  java-8-openjdk (java-8-openjdk/jre default)

Thank you!

Offline

#15 2016-07-10 19:32:54

SavinShetty
Member
From: Mumbai - India
Registered: 2016-06-27
Posts: 20
Website

Re: [SOLVED] not a valid Java environmet path

donnut wrote:

Yes, that solves the problem. archlinux-java status now reports:

Available Java environments:
  java-8-openjdk (java-8-openjdk/jre default)

Thank you!

Hey may i know how you solved this as i am in similar situation.


Into a learning curve.

Offline

#16 2021-07-29 20:32:07

denizdifiesso
Member
Registered: 2021-07-29
Posts: 3

Re: [SOLVED] not a valid Java environmet path

Example of how i solved about java-11-openjdk

sudo ln -s /usr/lib/java-11-openjdk/jre /usr/lib/default
sudo ln -s /usr/lib/java-11-openjdk/jre /usr/lib/default-runtime

archlinux-java status

James wrote:

Available Java environments:
  java-11-openjdk
  java-16-openjdk
  java-8-openjdk/jre (default)

sudo archlinux-java set java-11-openjdk

No output, successfull set ^

java -jar burploader.jar > Loaded! ^_^

Offline

#17 2021-07-29 20:47:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,310

Re: [SOLVED] not a valid Java environmet path

Please don't necrobump 5 year old solved threads to confirm what has already been mentioned as part of the thread.

Closing.

Offline

Board footer

Powered by FluxBB