FAQ | Forum | Tracker | Code

How to compile UMS with Java 7 SDK on OSX ?

For help and support with Mac OS X-specific issues
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply

How to compile UMS with Java 7 SDK on OSX ?

Postby sebos » Wed Feb 06, 2013 7:28 am

HI all,
I just want to open a new topic on this subject... as I try to compile UMS with Java 7 JDK without any issues (and too much "transformations")...
but one issue remains: the usage of the old JavaStub application launcher that only support Java 6 (this launcher had been designed/deployed by Apple on the Java 6 installed on OSX FROM apple...).

So, the question is: what need to be changed on the current build to use the Java 7 virtual machine available on OSX ? (fore sure based on the fact that you must have Java 7 setup on your OSX Lion/Montain Lion).

Here is an interesting article (I thing) about how Java 7 is setup on OSX (a little different from the current old Java 6 VM): http://java.dzone.com/articles/juggling ... e-versions

On my side, build UMS with JDK 7u13 is fine, all jar are correctly generated using the latest SDK and everything is fine... anyway, I'm not (as I do not know how) run in Terminal UMS. if anyone has any clues/tips ?
Regards.
sebos
Last edited by sebos on Tue Feb 12, 2013 5:21 am, edited 1 time in total.
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
sebos
 
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Re: How to compile UMS with Java 7 SDK on OSX

Postby sebos » Thu Feb 07, 2013 9:26 pm

Hi all,
I begin to answer to myself: in fact I want to try to launch UMS directly using the command line without using the JavaApplicationStub included in the UMS.app.
So, something like that:
/usr/libexec/java_home -v1.6+ --request --exec java ${VM_OPTIONS} " -jar "$JAVAROOT/repo/xxxxx" "$@"
(I'm trying to use info.plist content to do that...)

To prepare the next step: use Java 7 JRE...

If someone can provide me any help, I will appreciate.
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
sebos
 
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Re: How to compile UMS with Java 7 SDK on OSX

Postby sebos » Thu Feb 07, 2013 11:38 pm

I continue to investigate.

The issue during compilation is that maven is using old method ( through osxappbundle-maven plugin call). it copies the JavaApplicationStub available in OSX, inside Java 6. (http://mojo.codehaus.org/osxappbundle-maven-plugin/)
Even jarbuilder (http://informagen.com/JarBundler/) is not designed to handle Java 7 on OSX.

Again, the solution could come from http://java.net/projects/appbundler but, it means that for OSX, a JRE 7 needs to be included completly(or nearly) inside the OSX package ?!

I continue to find a way...
Please Subjunk or anyone: do you have any clue ?
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
sebos
 
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Re: How to compile UMS with Java 7 SDK on OSX

Postby sebos » Fri Feb 08, 2013 3:02 am

Good news, I'm now able to run UMS on Java 7 u13 on OSX... from command line (with some errors for sure).
Attachments
Capture d’écran 2013-02-07 à 16.01.44.png
Capture d’écran 2013-02-07 à 16.01.44.png (368.67 KiB) Viewed 1181 times
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
sebos
 
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Re: How to compile UMS with Java 7 SDK on OSX ?

Postby sebos » Fri Mar 15, 2013 5:56 am

Hi all,
hello...?

There is someone that can help me (us) to run successfully UMS on Mac with Java 7 ?
because compiling is fine... the packaging with a correct runtime launcher is not "plug and play"...
perhaps only a shell script to run "java +classpath, etc.." ?

Thanks in advance for your support/contribution/idea.
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
sebos
 
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Re: How to compile UMS with Java 7 SDK on OSX ?

Postby Optimus_prime » Fri Mar 15, 2013 7:29 am

Sebos,
Whilst you seem to be doing this alone i've been trying to get a build up for OS-X with java 7 but have been unsuccessful so far.
Your info here is somewhat more than i've got as you have actually got UMS to run on your mac. If you come up with a solution i will get you to upload the version to me so at least we can get it up on one of our mirrors as a beta build. Like you said, i can get it to compile but i just can't get the app to launch. keep up the good work and post all the details for us to try and find a fix
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum
User avatar
Optimus_prime
Moderator
 
Posts: 543
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: How to compile UMS with Java 7 SDK on OSX ?

Postby Optimus_prime » Fri Mar 15, 2013 11:18 pm

Also i think we may have to appbundle jre 7 with ums to make it work. It's a waste but i think it may be the only way.
Opinions?
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum
User avatar
Optimus_prime
Moderator
 
Posts: 543
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: How to compile UMS with Java 7 SDK on OSX ?

Postby sebos » Sat Mar 16, 2013 3:25 am

Optimus_prime wrote:Also i think we may have to appbundle jre 7 with ums to make it work. It's a waste but i think it may be the only way.
Opinions?


Yes Optimus. it seems to be the only available solution on OSX... or use the appbundler.

In fact, yes, you're right, here is the process: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html
Not so easy... but step by step, I'm sure we will find the solution.
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
sebos
 
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Re: How to compile UMS with Java 7 SDK on OSX ?

Postby Optimus_prime » Sat Mar 16, 2013 10:33 am

Cheers for that, but i've been looking at that stuff for a bit now.
any luck doing it though, i'm busy and i just won't get the time to look at this until mid next week. I want to continue to try and get a build process for mac, with out forking ums and re-writing for java 6 :?
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum
User avatar
Optimus_prime
Moderator
 
Posts: 543
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: How to compile UMS with Java 7 SDK on OSX ?

Postby sebos » Sat Mar 16, 2013 8:21 pm

Optimus_prime wrote:Cheers for that, but i've been looking at that stuff for a bit now.
any luck doing it though, i'm busy and i just won't get the time to look at this until mid next week. I want to continue to try and get a build process for mac, with out forking ums and re-writing for java 6 :?


Hi,
I'm now able to compile with SDK7 without any issue... except for medialib that I need to copy by hand.
The result is in "ums-2.5.2-distribution.tar.gz".. it is NOT a victory, it's the usual process !
So, when you extract the content somewhere, and you double-click on UMS.jar.... UMS is succefully running in Java 7 without any issue: this will use your locak Java environnement when you setup JAVA7 sdk.

(I'm not able to add the picture today in the forum... but here is the trace result)
Code: Select all
03-16 09:20:54  Starting Universal Media Server 2.5.2
03-16 09:20:54  Based on PS3 Media Server by shagrath, copyright 2008-2013
03-16 09:20:54  http://www.universalmediaserver.com
03-16 09:20:54 
03-16 09:20:54  Build: b2582111a (2013-03-15)
03-16 09:20:54  Java: 1.7.0_17-Oracle Corporation
03-16 09:20:54  OS: Mac OS X 64-bit 10.8.2
03-16 09:20:54  Encoding: US-ASCII
03-16 09:20:54  Memory: 1136 Mo
03-16 09:20:54 
03-16 09:20:54  Working directory: /Users/sebos/Downloads/test/ums-2.5.2
03-16 09:20:54  Temp directory: /var/folders/41/3hykrb8942z2m7z_kcy3sjrw0000gn/T/universalmediaserver
03-16 09:20:54  Logging config file: /Users/sebos/Downloads/test/ums-2.5.2/logback.xml
03-16 09:20:54  debug.log: /Users/sebos/Downloads/test/ums-2.5.2/debug.log
03-16 09:20:54 
03-16 09:20:54  Profile directory: /Users/sebos/Library/Application Support/UMS
03-16 09:20:54  Profile path: /Users/sebos/Library/Application Support/UMS/UMS.conf
03-16 09:20:54  Profile permissions: rw
03-16 09:20:54  Profile name: MacMini-de-seb.local
03-16 09:20:54 
03-16 09:20:54  Loading MediaInfo library
03-16 09:20:54  Loaded MediaInfoLib - v0.7.58
03-16 09:20:54  Loading renderer configurations from /Users/sebos/Downloads/test/ums-2.5.2/renderers
03-16 09:20:54  Loading configuration file: AirPlayer.conf
03-16 09:20:54  Loading configuration file: Android.conf
03-16 09:20:54  Loading configuration file: BlackBerryPlayBook-KalemSoftMP.conf
03-16 09:20:54  Loading configuration file: Bravia4500.conf
03-16 09:20:54  Loading configuration file: Bravia5500.conf
03-16 09:20:54  Loading configuration file: BraviaEX.conf
03-16 09:20:54  Loading configuration file: BraviaEX620.conf
03-16 09:20:54  Loading configuration file: BraviaHX.conf
03-16 09:20:54  Loading configuration file: DirecTVHR.conf
03-16 09:20:54  Loading configuration file: DLinkDSM510.conf
03-16 09:20:54  Loading configuration file: FreeboxHD.conf
03-16 09:20:54  Loading configuration file: FreecomMusicPal.conf
03-16 09:20:54  Loading configuration file: iPad-iPhone.conf
03-16 09:20:54  Loading configuration file: Kuro.conf
03-16 09:20:54  Loading configuration file: LG-BP.conf
03-16 09:20:54  Loading configuration file: LGST600.conf
03-16 09:20:54  Loading configuration file: N900.conf
03-16 09:20:54  Loading configuration file: NetgearNeoTV.conf
03-16 09:20:54  Loading configuration file: OnkyoTX-NR717.conf
03-16 09:20:54  Loading configuration file: OPPOBDP83.conf
03-16 09:20:54  Loading configuration file: OPPOBDP93.conf
03-16 09:20:54  Loading configuration file: Panasonic.conf
03-16 09:20:54  Loading configuration file: Philips.conf
03-16 09:20:54  Loading configuration file: PhilipsPFL.conf
03-16 09:20:54  Loading configuration file: PopcornHour.conf
03-16 09:20:54  Loading configuration file: PS3.conf
03-16 09:20:54  Loading configuration file: Realtek.conf
03-16 09:20:54  Loading configuration file: Samsung-SMT-G7400.conf
03-16 09:20:54  Loading configuration file: SamsungAllShare.conf
03-16 09:20:54  Loading configuration file: SamsungWiseLink.conf
03-16 09:20:54  Loading configuration file: SharpAquos.conf
03-16 09:20:54  Loading configuration file: Showtime3.conf
03-16 09:20:54  Loading configuration file: Showtime4.conf
03-16 09:20:54  Loading configuration file: SMP-N100.conf
03-16 09:20:54  Loading configuration file: SonyBluray.conf
03-16 09:20:54  Loading configuration file: SonyHomeTheatreSystem.conf
03-16 09:20:54  Loading configuration file: Streamium.conf
03-16 09:20:54  Loading configuration file: TelstraTbox.conf
03-16 09:20:54  Loading configuration file: VideoWebTV.conf
03-16 09:20:54  Loading configuration file: WDTVLive.conf
03-16 09:20:54  Loading configuration file: WMP.conf
03-16 09:20:54  Loading configuration file: XBMC.conf
03-16 09:20:54  Loading configuration file: XBOX360.conf
03-16 09:20:54  Loading configuration file: YamahaRXA1010.conf
03-16 09:20:54  Loading configuration file: YamahaRXV3900.conf
03-16 09:20:54  Loading configuration file: YamahaRXV671.conf
03-16 09:20:54  Please wait while we check the MPlayer font cache, this can take a minute or so.
03-16 09:20:54  Cannot launch MPlayer. Check the presence of osx/mplayer
java.io.IOException: Cannot run program "osx/mplayer": error=2, No such file or directory
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ~[na:1.7.0_17]
   at net.pms.PMS.checkProcessExistence(PMS.java:217) [ums.jar:2.5.2]
   at net.pms.PMS.init(PMS.java:403) [ums.jar:2.5.2]
   at net.pms.PMS.createInstance(PMS.java:839) [ums.jar:2.5.2]
   at net.pms.PMS.main(PMS.java:926) [ums.jar:2.5.2]
Caused by: java.io.IOException: error=2, No such file or directory
   at java.lang.UNIXProcess.forkAndExec(Native Method) ~[na:1.7.0_17]
   at java.lang.UNIXProcess.<init>(UNIXProcess.java:135) ~[na:1.7.0_17]
   at java.lang.ProcessImpl.start(ProcessImpl.java:130) ~[na:1.7.0_17]
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021) ~[na:1.7.0_17]
   ... 4 common frames omitted
03-16 09:20:54  Finished checking the MPlayer font cache.
03-16 09:20:54  Searching for plugins in /Users/sebos/Downloads/test/ums-2.5.2/plugins
03-16 09:20:54  No plugins found
03-16 09:20:54  Registering transcoding engine: FFmpeg Audio
03-16 09:20:54  Registering transcoding engine: MEncoder
03-16 09:20:54  Registering transcoding engine: FFmpeg
03-16 09:20:54  Registering transcoding engine: MPlayer Audio
03-16 09:20:54  Registering transcoding engine: FFmpeg Web Video
03-16 09:20:54  Registering transcoding engine: MEncoder Web
03-16 09:20:54  Registering transcoding engine: MPlayer Video Dump
03-16 09:20:54  Registering transcoding engine: MPlayer Web
03-16 09:20:54  Registering transcoding engine: tsMuxeR
03-16 09:20:54  Registering transcoding engine: Audio High Fidelity
03-16 09:20:54  Registering transcoding engine: VLC Audio Streaming
03-16 09:20:54  Registering transcoding engine: VLC Video Streaming
03-16 09:20:54  Registering transcoding engine: dcraw Thumbnailer
03-16 09:20:54  Using address /192.168.0.10 found on network interface: name:en0 (en0)
03-16 09:20:54  Created socket: /192.168.0.10:5001
03-16 09:20:54  Checking shared folder: /Users/sebos/Documents/Video
03-16 09:20:54  Using the following UUID configured in UMS.conf: 19db2b5d-befd-4775-a742-e6d6ddad5b57
03-16 09:20:59  The server is now available for renderers to find


And now, as you said optimus, we need to design the package.
I propose 2 steps:
-1- design an .APP that will only run a script that call UMS.jar... this means that the users need to have JAVA7 SDK (or JRE...) setup on their Mac. pros: this will generate a very litte (in size) package and it's really easy to compile/automate.
-2- include a light JRE7 in the package with all needed libraries, perhaps with ANT (and Maven tips) it will be possible ?
what do you think ?
======================================
(freebox v5, LG Blu-ray BP420, Sony Bravia)
sebos
 
Posts: 11
Joined: Wed Feb 06, 2013 5:04 am

Next

Return to Mac OS X-specific Support

Who is online

Users browsing this forum: No registered users and 1 guest