vab icon indicating copy to clipboard operation
vab copied to clipboard

vab can't see jdk version

Open ibinshoid opened this issue 1 year ago • 2 comments

Running vab bring this:

error: No Java JDK install(s) could be detected
details: Please install Java JDK >= 8 or provide a valid path via `JAVA_HOME`

but java is installed and set in JAVA_HOME.

$JAVA_HOME"/bin/java" --version
openjdk 17.0.13 2024-10-15
OpenJDK Runtime Environment (build 17.0.13+11-suse-150400.3.48.2-x8664)
OpenJDK 64-Bit Server VM (build 17.0.13+11-suse-150400.3.48.2-x8664, mixed mode, sharing)

vab doctor can find it, but version is empty.

vab doctor

details:
  SDK API level 33 > highest NDK API level 29.
vab
	Version    0.4.3 11544d4
	Path       "/home/andreas/.vmodules/vab"
	Base files "/home/andreas/.vmodules/vab/platforms/android"
	os.args    ['vab', 'doctor']

Extra
	Commands
		Allowed false
env
	ANDROID_HOME=/home/andreas/Android
	ANDROID_SDK_ROOT=/home/andreas/Android/Sdk
	JAVA_HOME=/usr/lib64/jvm/java-17-openjdk-17
Java
	JDK
		Version 
		Path    "/usr/lib64/jvm/java-17-openjdk-17"
		Keytool "/usr/lib64/jvm/java-17-openjdk-17/bin/keytool"
Android
	ENV
		sdkmanager "/home/andreas/.cache/v/android/sdk/cmdline-tools/tools/bin/sdkmanager"
		sdkmanager.version "4.0.1"
		avdmanager "/home/andreas/.cache/v/android/sdk/cmdline-tools/tools/bin/avdmanager"
		emulator   "/home/andreas/Android/Sdk/emulator/emulator"
		Managable true
	SDK
		Path "/home/andreas/Android/Sdk"
		Writable true
		APIs available ['33', '32', '31', '29', '27', '23', '22', '21', '18', '']
	NDK
		Version 21.1.6352462
		Path "/home/andreas/Android/Sdk/ndk"
		Side-by-side true
		min API level available 16
		max API level available 29
		arm64-v8a   ['29', '28', '27', '26', '24', '23', '22', '21']
		armeabi-v7a ['29', '28', '27', '26', '24', '23', '22', '21', '19', '18', '17', '16']
		x86         ['29', '28', '27', '26', '24', '23', '22', '21', '19', '18', '17', '16']
		x86_64      ['29', '28', '27', '26', '24', '23', '22', '21']
	Build
		API 29
		Build-tools 32.0.0
	Packaging
		Format apk
Product
	Name "V Test App"
	Package ID "io.v.android"
	Output ""
V
	Version 0.4.8 3d5f81b
	Path "/home/andreas/.local/v"

	V full version: V 0.4.8 3223da6.3d5f81b
	OS: linux, Linux version 6.4.0-150600.23.25-default (geeko@buildhost) (gcc (SUSE Linux) 7.5.0, GNU ld (GNU Binutils; SUSE Linux Enterprise 15) 2.43.1.20240828-150100.7.49) #1 SMP PREEMPT_DYNAMIC Tue Oct  1 10:54:01 UTC 2024 (ea7c56d)
	Processor: 4 cpus, 64bit, little endian, AMD Ryzen 3 2200G with Radeon Vega Graphics
	getwd: /home/andreas
	vexe: /home/andreas/.local/v/v
	vexe mtime: 2024-12-15 11:35:23
	vroot: OK, value: /home/andreas/.local/v
	VMODULES: OK, value: /home/andreas/.vmodules
	VTMP: OK, value: /tmp/v_1000
	Git version: git version 2.43.0
	Git vroot status: weekly.2024.50-37-g3d5f81b0
	.git/config present: true
	CC version: cc (SUSE Linux) 7.5.0
	emcc version: N/A
	thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9

ibinshoid avatar Dec 15 '24 11:12 ibinshoid

@ibinshoid can you shed a little more light on how you run vab (what flags and input are passed)? A complete command-line example of how you trigger the error would help greatly

larpon avatar Dec 16 '24 11:12 larpon

It was a problem with the java17 packages from SuSE. when i install java11, vab works fine. tree /usr/lib64/jvm/java-17-openjdk-17/bin is this:

/usr/lib64/jvm/java-17-openjdk-17/bin
├── java
├── jfr
├── keytool
└── rmiregistry

tree /usr/lib64/jvm/java-11-openjdk-11/bin is this:

/usr/lib64/jvm/java-11-openjdk-11/bin
├── jar
├── jarsigner
├── java
├── javac
├── javadoc
├── javap
├── jcmd
├── jconsole
├── jdb
├── jdeprscan
├── jdeps
├── jfr
├── jhsdb
├── jimage
├── jinfo
├── jjs
├── jlink
├── jmap
├── jmod
├── jps
├── jrunscript
├── jshell
├── jstack
├── jstat
├── jstatd
├── keytool
├── pack200
├── rmic
├── rmid
├── rmiregistry
├── serialver
└── unpack200

ibinshoid avatar Dec 16 '24 18:12 ibinshoid