#8654 closed enhancement (fixed)
Create Mac OS X application bundle which uses Java 1.7 on 10.8
Reported by: | mark0815 | Owned by: | team |
---|---|---|---|
Priority: | critical | Milestone: | 14.03 |
Component: | Installer MacOS | Version: | |
Keywords: | java7 javabug | Cc: | Stereo, elchtreiber@…, cquest, malcolmh |
Description (last modified by )
The current version of JOSM displays a deprecation warning after startup saying that Java 1.6 is deprecated though Java 1.7 is installed too.
Attached is a patch utilising an enhanced version of the oracle java app builder to build the JOSM application bundle instead of using the JOSM.app-template. Additionally the Runtime is copied into the application bundle to run JOSM without having Java installed.
Due to my lack of knowledge how to create a patch which contains binary data :-) some changes have to made manually:
- Place appbundler-1.0ea.jar in tools
- Move macosx/JOSM.app/Contents/Resources/JOSM.icns to macosx/JOSM.icns
- Delete macosx/JOSM.app
Attachments (2)
Change History (50)
Changed 11 years ago by
Attachment: | Change_Mac_OS_X_application_bundle_creation_to_app_bundler.patch added |
---|
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 11 years ago by
comment:4 Changed 11 years ago by
Keywords: | java7 added |
---|
This one ?
- https://java.net/projects/appbundler/pages/Home
- http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html
We should however wait for Java 7 switch before applying this patch.
comment:5 Changed 11 years ago by
This one:
https://bitbucket.org/infinitekind/appbundler
It's a fork of the app bundler mentioned above which adds some enhancements to the original version.
comment:6 Changed 11 years ago by
Following perl code creates the mac installer, not the ant task:
print "New mac installer $rev.\n"; system "rm -rfv $imac 2>/dev/null"; mkdir $imac; chdir $imac; cpr("$core/CONTRIBUTION","$core/README","$core/LICENSE","$core/macosx/JOSM.app","."); my $plist=`/bin/cat $core/macosx/JOSM.app/Contents/Info.plist`; $plist =~ s/\@SVNVersion\@/$rev/; $plist =~ s/josm-custom\.jar/$jar/; open FILE,">","JOSM.app/Contents/Info.plist" or die; print FILE $plist; close FILE; cpr($pjar,"JOSM.app/Contents/Resources/Java/"); system 'find -name "*.svn" -printf "rm -rf %p\n"|sh'; system "zip -9qr $mac *"; mv $mac,$macpath; ln $mac,$pmacln; chdir $home; system "rm -rfv $imac 2>/dev/null";
comment:10 Changed 10 years ago by
Cc: | Stereo added |
---|
comment:11 Changed 10 years ago by
Summary: | Create Mac OS X application bundle which uses Java 1.7 on 10.8 → [patch] Create Mac OS X application bundle which uses Java 1.7 on 10.8 |
---|
In fact we need to implement this if we want Mac users to switch for Java 7 before we switch JOSM itself (see #9035: I did not understand that our current package cannot be used with Java 7 !)
comment:12 Changed 10 years ago by
Owner: | changed from Radfahrer to team |
---|
Changed 10 years ago by
Attachment: | 8654_draft.patch added |
---|
comment:13 Changed 10 years ago by
I'm trying to implement this (see patch and updated jar) but always face NPE, can someone help me ?
BUILD FAILED build.xml:130: java.lang.NullPointerException at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:392) at org.apache.tools.ant.Target.performTasks(Target.java:413) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424) at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138) Caused by: java.lang.NullPointerException at com.oracle.appbundler.AppBundlerTask.copy(AppBundlerTask.java:709) at com.oracle.appbundler.AppBundlerTask.execute(AppBundlerTask.java:333) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) ... 10 more
comment:15 Changed 10 years ago by
Summary: | [patch] Create Mac OS X application bundle which uses Java 1.7 on 10.8 → Create Mac OS X application bundle which uses Java 1.7 on 10.8 |
---|
comment:17 Changed 10 years ago by
Cc: | elchtreiber@… cquest added |
---|
comment:18 Changed 10 years ago by
Hi guys, could you please test this package:
http://donvip.fr/jenkins/job/JOSM/lastSuccessfulBuild/artifact/dist/josm-custom-macosx-java7.zip
And tell us:
- if it works :)
- if it uses Oracle Java 7 (as shown in status report)
Thanks
comment:19 Changed 10 years ago by
It works :)
Java 7 is indeed used (no report about switching to Java 7 in the welcome text), confirmed in the "About JOSM" dialog.
\o/
comment:20 follow-up: 23 Changed 10 years ago by
It runs, but as a regression, the keyboard shortcuts all seem to be in QWERTY.
comment:21 Changed 10 years ago by
Also, the Java 7 build seems to take up a lot of CPU when compared to the Java 6 build.
comment:23 Changed 10 years ago by
Replying to anonymous:
It runs, but as a regression, the keyboard shortcuts all seem to be in QWERTY.
Thanks for the test. Can you please:
- test this new build: http://donvip.fr/jenkins/job/JOSM/110/artifact/dist/josm-custom-macosx-java7.zip
- give me your status report (help -> status report)
comment:24 Changed 10 years ago by
Can you please check you're running latest version of Java 7 (7u25) and post here your status report ?
7u40-ea might be worth a try too:
https://jdk7.java.net/download.html
comment:25 Changed 10 years ago by
@Stereo: Java 7u40 has been released, can you please give it a try ? Thanks.
comment:27 Changed 10 years ago by
Cc: | malcolmh added |
---|
comment:28 Changed 10 years ago by
Up to all users running Mac OS X 10.8/10.9: can you please install latest version of Java 7 (7u45 right now), test this package and report your feedback:
http://donvip.fr/jenkins/job/JOSM/lastSuccessfulBuild/artifact/dist/josm-custom-macosx-java7.zip
If it works fine we will provide it officially.
comment:29 Changed 10 years ago by
Tested on two different systems running 10.9. Worked fine on both - thanks!
comment:30 Changed 10 years ago by
@Don-vip I'm still getting the ctrl-something shortcuts in qwerty.
Here's my status report:
Build-Date: 2013-10-23 20:16:44 Revision: 6321 Is-Local-Build: true Identification: JOSM/1.5 (6321 SVN en_GB) Mac OS X 10.9 Memory Usage: 260 MB / 455 MB (147 MB allocated, but free) Java version: 1.7.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM VM arguments: [-Djava.library.path=/Applications/JOSM.app/Contents/MacOS, -DLibraryDirectory=/Users/stereo/Library, -DDocumentsDirectory=/Users/stereo/Documents, -DApplicationSupportDirectory=/Users/stereo/Library/Application Support, -DCachesDirectory=/Users/stereo/Library/Caches, -DSandboxEnabled=false, -Xmx512m, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true] Dataset consistency test: No problems found Plugin: AddrInterpolation (29854) Plugin: CommandLine (29854) Plugin: DirectDownload (29854) Plugin: DirectUpload (30017) Plugin: FixAddresses (29971) Plugin: HouseNumberTaggingTool (29854) Plugin: OpeningHoursEditor (29854) Plugin: PicLayer (29854) Plugin: RoadSigns (29854) Plugin: buildings_tools (30010) Plugin: cadastre-fr (29934) Plugin: conflation (0.1.6) Plugin: contourmerge (1009) Plugin: dataimport (29854) Plugin: download_along (30017) Plugin: geotools (29767) Plugin: importvec (29854) Plugin: jts (29854) Plugin: livegps (29854) Plugin: mapdust (29854) Plugin: merge-overlap (29854) Plugin: namemanager (29930) Plugin: opendata (30017) Plugin: openstreetbugs (30004) Plugin: pdfimport (29913) Plugin: public_transport (29862) Plugin: reverter (30017) Plugin: scripting (30560) Plugin: surveyor (29854) Plugin: tageditor (29854) Plugin: terracer (29854) Plugin: todo (29155) Plugin: turnlanes (29854) Plugin: turnrestrictions (29854) Plugin: undelete (29854) Plugin: utilsplugin2 (30017) Plugin: wayselector (29854)
comment:31 Changed 10 years ago by
With the previous Java7 bundle don-vip sent me (I'll check with the last one asap), keyboard modifiers (control, option, command, shift) are not handled properly meaning that most shortcuts do not work as expected or do not work at all.
comment:33 Changed 10 years ago by
Priority: | normal → critical |
---|
Priority increased as it currently blocks any plan to switch to Java 7.
We made some tests with cquest today. Here the results:
- Standard input: OK (French keyboard layout AZERTY is respected. Typing an A gives an A :)
- One-letter shortcuts: OK (Q)
- Ctrl-letter: Bug (Ctrl-Z triggers Ctrl-W. The keyboard layout appears to be QWERTY)
- Alt-letter: Bug (Alt-Q triggers Alt-A)
- Shift-letter: OK (Shift-A)
- Ctrl-Shift-letter seems OK
- Alt-Shift-letter: Bug
- Ctrl-Alt-Shift-letter: Bug
It's very weird I don't understand right now.
comment:34 follow-up: 36 Changed 10 years ago by
I have found a similar bug in JavaFX but not (yet ?) in JDK: https://javafx-jira.kenai.com/browse/RT-30669
@malcolmh: are you using an AZERTY keyboard too ?
comment:36 Changed 10 years ago by
Replying to Don-vip:
I have found a similar bug in JavaFX but not (yet ?) in JDK: https://javafx-jira.kenai.com/browse/RT-30669
@malcolmh: are you using an AZERTY keyboard too ?
No - mine is a UK QWERTY
comment:37 follow-up: 38 Changed 10 years ago by
QWERTY ? Then what is your problem ? We're talking about shortcuts treated as QWERTY on non-QWERTY keyboards :)
comment:38 Changed 10 years ago by
Replying to Don-vip:
QWERTY ? Then what is your problem ? We're talking about shortcuts treated as QWERTY on non-QWERTY keyboards :)
OK, so maybe I don't have a problem. I did not notice that Alt-F had changed to Cmd-M since 6238.
comment:39 Changed 10 years ago by
As I really don't see how to implement a workaround and the two bugs I have listed are targeted to Java 9, I have filed a new bug (https://bugs.openjdk.java.net/browse/JI-9008003), I hope this one will be backported to the next JDK7 update...
comment:40 Changed 10 years ago by
Milestone: | → 14.02 |
---|
comment:41 Changed 10 years ago by
Milestone: | 14.02 → 14.03 |
---|
There are still too much Mac OSX bugs in Java 7 to propose this new bundle as default. I prefer to wait for release of Java 8 in March.
comment:42 Changed 10 years ago by
I tried josm on OS X 10.9 today, under the Java 7 7u51 JRE.
Contrary to: http://wiki.openstreetmap.org/wiki/JOSM/Mac
it worked.
However: paste into JOSM was not functional,
and the DELETE key and other keybindings don't work.
comment:44 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The next Mac OS X package will use Java 7. A legacy Java 6 package will still be produced until we switch to Java 7 only.
comment:46 Changed 9 years ago by
Keywords: | javabug added |
---|
comment:47 Changed 9 years ago by
Hi Don-vip,
I've upgraded to 7u60, and can't see any difference for our issues.
Thanks for the patch. Could you just tell us where does this application bundle come from ? (so we can update later if necessary)