Bug 431950 - Export to Mac .app bundle doesn't work with Mavericks (10.9)
Summary: Export to Mac .app bundle doesn't work with Mavericks (10.9)
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.4   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on: 441274
Blocks:
  Show dependency tree
 
Reported: 2014-04-03 13:55 EDT by Markus Keller CLA
Modified: 2019-07-02 23:45 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2014-04-03 13:55:57 EDT
On the Mac, we have an "Export > Mac OS X application bundle" wizard that should create a runnable *.app from an existing launch configuration.

The produced *.app doesn't launch any more on Mavericks (10.9) with Oracle JDK 7. It immediately quits with exit code 1. Maybe already broken on Mac OS X 10.8.

The problem seems to be that the /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/MacOS/JavaApplicationStub that the wizard copies into the *.app doesn't work any more.

The implementation is in http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/tree/org.eclipse.jdt.launching.ui.macosx/src/org/eclipse/jdt/internal/ui/macbundler

The exporter probably has to implement http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html now. The appbundler seems to be GPL2, which is problematic for inclusion in Eclipse.

http://prod.lists.apple.com/archives/java-dev/2014/Apr/msg00004.html has some recent discussion about how to bundle a Java App on the Mac.

Since there doesn't seem to be a good solution that works on all versions, I guess we should just leave the pre-1.7 implementation as is and implement the "new way" for 1.7 and 1.8.
Comment 1 Markus Keller CLA 2014-05-26 10:38:42 EDT
Maybe the Mac app exporter could also use a shell script as launcher, see http://www.eclipse.org/swt/macosx/ .
Comment 2 Michael Rennie CLA 2014-05-26 11:10:02 EDT
(In reply to Markus Keller from comment #1)
> Maybe the Mac app exporter could also use a shell script as launcher, see
> http://www.eclipse.org/swt/macosx/ .

Or the other option is to get rid of the completely broken exporter altogether ;)

See also bug 282050.

Here is the commit for the exporter: http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=0bc6d15f67f4e9767873a2d0e312a90279c0f547

could not find any specific request for this support.
Comment 3 Rodolfo M. Raya CLA 2014-09-26 07:33:54 EDT
The exporter relies on Java 6 from Apple, which uses JavaApplicationStub,  but you are trying to run something coded with Java 7 from Oracle that does not use JavaApplicationStub to launch a Java-based application.

You have to manually craft a launcher that embeds the JRE and uses a shelscript to launch the program. This has the advantage of being able to pass parameters to your program. Downside: if you have an SWT-based program it will not show the menu on start.

Notice that Java 6 has already reached end of life.
Comment 4 Markus Keller CLA 2014-09-26 08:44:55 EDT
The current plan is to provide a wizard for the new Java Packager APIs from JDK 8u20, see bug 441274.

Keeping this bug to get rid of the defunct export wizard.
Comment 5 Eclipse Genie CLA 2019-07-02 08:40:23 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 6 Sarika Sinha CLA 2019-07-02 23:45:54 EDT
@Lakshmi,
Do you still see this as a problem?