Hi. Is it possible to add Java Runtime Environment to OSMC’s App Store? For the purpose of activating the Bluray menu for BD-ISO or BDMV. So it won’t be so hard to install for us who don’t know between a USB cable and an HDMI cable?
This was asked a couple of days ago. There are a few issues:
Licensing
Size: it’s bigger than OSMC. So it would need to be optional. But libbluray and Kodi need to be built with Java at build time; so you can’t make it optional presently and dlopen() these libs on the fly
Further:
With BD-J you’re likely going to be playing an encrypted disc. This is supported, if you install libaacs and ‘acquire’ AACS keys for the title you are going to play.
So quite niche at the moment, but we will continue to monitor things. I’m happy to include this as an option; but don’t want to make it a core part of OSMC at this time
It far more likely that someone would want to play an un-encrypted ISO backup. The only reason I have a Blu-Ray player is that it’s a pain to find the extras on a lot of discs without using the original menu, and there is no free software player that correctly supports BD-J, but supposedly Leia will (if built correctly, as you said).
That might be OK, too, because the App Store is really just a GUI front end for apt-get. The problem is that Kodi distributed with OSMC would have to be compiled to take advantage of it, and that means JRE would be “sold” with every Vero 4K+, and that’s what would cost money.
So, there would have to be two versions of the various “mediacenter” packages…one with JRE support and one without, and the second would be an option, not included with sales. Then, the “App Store” could just change a couple of settings on the system (maybe something like pointing to an alternate repository), and the next update would download the JRE-enabled Kodi and all dependencies. Also, two versions are required because JRE takes up a lot of disk space, and it might not even fit on some Pi installs.
That’s not really the issue; it’s that users would also need to accept JRE usage terms. We’d have to introduce new terms for something we already ship. JRE is also massive. It’s larger than the OSMC image; and I’m not sure how many people would put it to good use. I haven’t tried with OpenJRE – but that’s something worth exploring too.
You’d also need duplicate versions of libbluray too.
The proper approach would be to use JRE if it’s there only.
Can Kodi use JRE that way without changes you would have to make that would take away from much more important work?
Oh, and now I see…Debian used to have a “helper” package available in the repository that would install Oracle JRE by automating the download (but the user still had to accept the terms), but they have discontinued that because apparently Oracle is even more of a PITA company than before.
I don’t think so – libbluray needs to try and load the library dynamically; but I can see that there’s currently a ./configure flag which requires specifying and linking against this library.
From a quick check, we wouldn’t need two builds of Kodi, just libbluray.
That would help, then, as libbluray is small, and you could just make it part of the dependencies. After that, if people want to go for libaacs and the JRE, they can do it on their own. Although it would require the command line, the steps should be pretty easy.
I’ve been testing with OpenJRE on CoreELEC but Kodi doesn’t like it… “DiscSettings - Could not load the java vm”. I guess it needs Oracle JRE.
How easy is it to compile a version of osmc-mediacenter with JRE support? Is it something I could do myself with instruction? Would be good to carry on testing…
Ok, I have libbluray compiled with Java. The problem seems to be that Kodi can’t find/launch JRE. I have set JAVA_HOME to point to the jre folder in environment variables using .profile and checked it with env command. However I am still getting “DiscSettings - Could not load the java vm” error and logs don’t give any more info. Any ideas?
And, although systemd runs Kodi (mediacenter) as user osmc, I don’t think it does any of the other things that would load the various profile/bashrc/whatever files. You might have to add the export command to the /usr/bin/mediacenter script.