View Single Post
Old 25th October 2020, 11:30   #22  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,469
Thanks foir your detailed description of the problem. I don't know AdoptOpenJDK, but I will try it and investigate the problem. Can you confirm that it is fully compatible with the programs developed for the Oracle version ? Also, I suppose that the version most users have currently is OpenJDK 11 HotSpot. Correct ?

The way BD3D2MK3D detects java is somewhat complex, because Oracke has a strange installation method. Therefore, BD3D2MK3D uses several different methods, one after each other :
  1. First, it tries to use the java path stored in the BD3D2MK3D configuration file. It's only when the path has changed due to a new installation that the whole procedure is started over.
  2. It tries to execute the command "where java" in the command prompt. That command is supposed to return the path of java.exe if it is in the PATH environment variable and afaik it has always worked (except of course if java.exe is not in the %PATH%).
  3. Then, it builds its own list of directories where the programs are usually installed. It uses the environment variables ProgramFiles and ProgramFiles(x86) (if they exist) to discover the paths of those folders. It appends "Java" to those directories, and then it checks in all sub-directories if java.exe exists. Therefore, it should be able to discover for example "C:\Program Files (x86)\Java\jre1.8.0_271\bin\java.exe".
  4. Finally, it gives up and tries to use just "java.exe", without path.
  5. The final test, always executed, consists in trying to execute the command "path/to/java.exe -version". In the output of that command, it searches for "java version", and assumes that the version is just after that words, on the same line.
  6. If the version string has not been found and is therefore empty, it issues the warning telling that java is not properly installed. However, it returns the path anyway.
I guess that it's the last step that doesn't work, as "where java" should work, even if java is not installed in the usual Program Files directory.

Note that the function that checks for java can return the path or the version string. Normally, BD3D2MK3D doesn't check the version, as it assumes that any version should be OK. It uses the version string only to display it when the menu Help -> Java Version is called, as well as in the log when the Java version of BDSup2Sub is executed, for example to convert the subtitles to 3D.

I will try to locate the problem. In the meantime, try to edit the file BD3D2MK3D.cfg. Locate the line beginning with set ::config(javapath), and insert the path to your version of java.exe. The directory separator character must be linux-like (/), or two backslashes (\\), and the whole string must be enclosed between accolades, like this:
Code:
set ::config(javapath)         {C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath\\java.exe}
Please let me know if that trick works. Unfortunately, it may trigger an error when the version is printed, but I'm not sure.

Anyway, that bug will be fixed in the next version. Thanks again for your report.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote