tag:blogger.com,1999:blog-1367102802658603789.post2279439699666831039..comments2024-01-29T04:29:03.583-08:00Comments on David Clunie's Blog: Keeping up with Mac Java - Bundling into Executable AppsDavid Cluniehttp://www.blogger.com/profile/17331067317921452126noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-1367102802658603789.post-12193916052875689622015-10-07T16:11:16.733-07:002015-10-07T16:11:16.733-07:00Apple removed the utilities Jar Bundler, icon Comp...Apple removed the utilities Jar Bundler, icon Composer, and PacakgeMaker, and it's been a royal pain trying to figure out the correct path forward. The awesome research in the post answered a ton of questions for me.<br /><br />It looks like <b>javapackager</b> is the way forward, and it's actually not that complicated to use. I put an example at <a href="http://centerkey.com/mac/java/" rel="nofollow">centerkey.com/mac/java</a>. For better or worse, <b>javapackager</b> bundles the JRE (for bandwidth reasons, I now host the resulting <b>.dmg</b> installer files on GitHub).<br />Dem Pilafianhttps://www.blogger.com/profile/16877729223914159583noreply@blogger.comtag:blogger.com,1999:blog-1367102802658603789.post-28366428309395767612015-06-22T00:56:47.094-07:002015-06-22T00:56:47.094-07:00+1 for universaleJavaApplicationStub
I spent many...+1 for universaleJavaApplicationStub<br /><br />I spent many hours trying to get an application launcher to set my application's working directory at Java 7/8 run-time startup. I was [reluctantly] about to start writing a script when I found your blog. Once I replaced JavaAppLauncher with uJAS in Oracle's AppBundler package I haven't had any problems.<br />James Stanhopenoreply@blogger.comtag:blogger.com,1999:blog-1367102802658603789.post-29728494534713835872015-06-05T00:15:50.875-07:002015-06-05T00:15:50.875-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/05376379849891905963noreply@blogger.comtag:blogger.com,1999:blog-1367102802658603789.post-68234413538339398392015-06-05T00:15:30.749-07:002015-06-05T00:15:30.749-07:00It's very usefull information. Thank you guys,...It's very usefull information. Thank you guys, but I got one problem: <br />if I launch my application from command line as "open .app/Contents/MacOS/JavaAppLauncher" it works well, but if I just duble clicked on .app icon, I saw error message - "The application can't be opened -10810". Can you give piece of advice how to fix this problem?Anonymoushttps://www.blogger.com/profile/05376379849891905963noreply@blogger.comtag:blogger.com,1999:blog-1367102802658603789.post-10689601713202474602015-02-19T11:52:00.408-08:002015-02-19T11:52:00.408-08:00The project for which I'm one of the lead deve...The project for which I'm one of the lead developers has found the universaleJavaApplicationStub [when renamed to JavaApplicationStub] to be the best solution for full support all around. We have our ant build script creating our .app files manually instead of using either Apple or Oracle bundlers. We are however using the Apple plist format, and I've opened a couple bug/feature enhancements with the uJAS script author with changes that we made to make it work perfect for us.Anonymoushttps://www.blogger.com/profile/02357808047604895625noreply@blogger.comtag:blogger.com,1999:blog-1367102802658603789.post-85177382576620063882014-10-27T06:57:13.313-07:002014-10-27T06:57:13.313-07:00I got feedback from Ben Staveley-Taylor and Michae...I got feedback from Ben Staveley-Taylor and Michael Hall about where to find an "official" JavaAppLauncher version.<br /><br />Based on their suggestions, I tried:<br /><br /> https://java.net/projects/appbundler/<br /><br />compiled it after changing the build.xml to point to give the "-isysroot" arg to gcc as point to MacOSX10.8.sdk (rather than MacOSX10.7.sdk, which got removed in some XCode update), and the compiled JavaAppLauncher works after copying it into the Contents/MacOS folder of the Package Contents.<br /><br />I also tried:<br /><br /> https://bitbucket.org/infinitekind/appbundler<br /><br />but its compiled JavaAppLauncher presented a "JRELoadError" when I tried it; I guess its findDylib() logic did not find a JRE.<br /><br />Looking at its source code, there is a check there that restricts it to Java 7 or Java 8, and I also have a Java 9 installed, so it found nothing:<br /><br /> {<br /> NSTask *task = [[NSTask alloc] init];<br /> [task setLaunchPath:@"/usr/libexec/java_home"];<br /><br /> NSArray *args = [NSArray arrayWithObjects: @"-v", @"1.7+", nil];<br /> [task setArguments:args];<br /> ...<br /> if ( [outRead rangeOfString:@"jdk1.7"].location != NSNotFound<br /> || [outRead rangeOfString:@"jdk1.8"].location != NSNotFound)<br /> {<br /> ... do good stuff<br /> }<br /><br />Sticking in a a check for "jdk1.9" makes it work, for now.<br /><br />This is an unfortunate design, since any apps bundled with infinitekind's appbundler will fail when folks get Java 9. It presumably should check for >= 1.7, not specific versions.<br /><br />David<br /><br />On 10/27/14 3:44 AM, Michael Hall wrote:<br />> On Oct 26, 2014, at 2:59 PM, Ben Staveley-Taylor wrote:<br />><br />>> Try:<br />>><br />>> https://java.net/projects/appbundler<br />><br />> https://bitbucket.org/infinitekind/appbundler<br />><br />> might be more actively supported.<br />><br />> Michael HallDavid Cluniehttps://www.blogger.com/profile/17331067317921452126noreply@blogger.com