Kodi Community Forum

Full Version: TMM will not work with OpenJDK
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
TMM 2.9.14_096b083 and TMM 3.0-SNAPSHOT on Windows 10 x64
Will not run with OpenJDK (AdoptOpenJDK 1.8 with HotSpot JRE 1.8)
Error message is that it requires JRE 1.7 or above.
I have JAVA_HOME set in variables and Path
Quote:PS Z:\> java -version
openjdk version "1.8.0_202"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.202-b08, mixed mode)
I'm guessing it's probably looking for the old registry values?
EXE is built by launch4j, so i have never checked, how they did it Wink

To get more info:
Open a CMD shell inside TMM directory
do a SET Launch4j=debug-all
and then start via commandline: tinyMediaManager.exe

This will result in a special launch4j.log logfile where we might see what's going on...
Quote:64-bit search:    SOFTWARE\JavaSoft\Java Runtime Environment...
32-bit search:    SOFTWARE\JavaSoft\Java Runtime Environment...
64-bit search:    SOFTWARE\JavaSoft\Java Development Kit...
32-bit search:    SOFTWARE\JavaSoft\Java Development Kit...
64-bit search:    SOFTWARE\JavaSoft\JRE...
32-bit search:    SOFTWARE\JavaSoft\JRE...
64-bit search:    SOFTWARE\JavaSoft\JDK...
32-bit search:    SOFTWARE\JavaSoft\JDK...
64-bit search:    SOFTWARE\IBM\Java Runtime Environment...
32-bit search:    SOFTWARE\IBM\Java Runtime Environment...
64-bit search:    SOFTWARE\IBM\Java Development Kit...
32-bit search:    SOFTWARE\IBM\Java Development Kit...
64-bit search:    SOFTWARE\IBM\Java2 Runtime Environment...
32-bit search:    SOFTWARE\IBM\Java2 Runtime Environment...
64-bit search:    SOFTWARE\IBM\Java Development Kit...
32-bit search:    SOFTWARE\IBM\Java Development Kit...
Error msg:    This application requires a Java Runtime Environment 1.8 or higher 1.8.0
Launch4J doesn't use the JAVA_HOME option, which is now the recommended use because people are having to move to OpenJDK which uses a zip file and does not create registry entries.
https://sourceforge.net/p/launch4j/bugs/197/
https://sourceforge.net/p/launch4j/featu...uests/127/

Any way to work around this through command line option or possibly a config file until Launch4J is updated?
sure there is; you basically only need to do the same as in https://gitlab.com/tinyMediaManager/tiny...Manager.sh
tbh - I do not know how to translate this shellscript into a windows batch file Big Grin
OK took a little tinkering to get it right but here's the workaround:
Windows Batch File Version - save as TMM.BAT in your TMM folder and make a shortcut to Desktop
(easiest version as long as Microsoft doesn't start removing CMD.EXE)
Quote:set JPATH="jvmarg = -Djava.library.path = %JAVA_HOME%"
java -jar getdown.jar . %JPATH%
Powershell Script Version - Save as TMM.PS1
(You either have to right-click to execute or have Powershell.exe in your PATH variable so it will execute instead of opening in Notepad)
Quote:$JPATH="jvmarg = -Djava.library.path = $env:JAVA_HOME"
java -jar getdown.jar . $JPATH
Hopefully they'll update Launch4j soon so it will properly use JAVA_HOME rather than registry values.
BTW 3.0 looks nice! Thanks guys!
can you try following EXE?
...removed...
Need some other source for it please. ZippyShare lit my computer up like a slot machine with warnings and malware attempts
i'm sorry. Didn't happen on my side
http://s000.tinyupload.com/index.php?fil...8505317597
Worked Perfectly!
Yea weird about ZippyShare. Has a good rep online but in FF and Edge it went insane opening popups and I had to kill the processes in Task Manager.
Something happens after you run this the first time.
Next time you open it the original error pops back up.
The EXE is re-writing itself?
I don't see any size or file modification attribute change, but I have to copy the new EXE back into the folder to run it again each time.
Ah, damnit.
Yes, you're right.
Since it is not yet released/in prerel, we need to do some additional changes.

Please delete *.new files from TMM directory.
These are the EXE files renamed, which will be always copied over after startup.
(Else we couldn't update ourself, b/c EXE already loaded / in use)
That's what I figured. No biggie I'll work around until it makes it into release.
(2019-01-26, 20:02)UniCav Wrote: [ -> ]That's what I figured. No biggie I'll work around until it makes it into release.

Any update on the ability to use OpenJDK without a batch file?  Thread posted back in January mentions something about being updated in a future version.  Thanks.
it works fine with openjdk and has been fixed back in january; just make sure you have the JAVA_HOME environment variable set