Solved TMM will not work with OpenJDK
#1
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?
#2
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...
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
#3
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?
#4
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
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#5
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!
#6
can you try following EXE?
...removed...
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
#7
Need some other source for it please. ZippyShare lit my computer up like a slot machine with warnings and malware attempts
#8
i'm sorry. Didn't happen on my side
http://s000.tinyupload.com/index.php?fil...8505317597
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
#9
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.
#10
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.
#11
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)
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
#12
That's what I figured. No biggie I'll work around until it makes it into release.
#13
(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.
#14
it works fine with openjdk and has been fixed back in january; just make sure you have the JAVA_HOME environment variable set
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab

Logout Mark Read Team Forum Stats Members Help
TMM will not work with OpenJDK0