#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)
by , 11 years ago
Attachment: | Change_Mac_OS_X_application_bundle_creation_to_app_bundler.patch added |
---|
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Description: | modified (diff) |
---|
comment:3 by , 11 years ago
comment:4 by , 11 years ago
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 by , 11 years ago
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 by , 11 years ago
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 by , 11 years ago
Cc: | added |
---|
comment:11 by , 11 years ago
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 by , 11 years ago
Owner: | changed from | to
---|
by , 11 years ago
Attachment: | 8654_draft.patch added |
---|
comment:13 by , 11 years ago
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 by , 11 years ago
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 by , 11 years ago
Cc: | added |
---|
comment:18 by , 11 years ago
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 by , 11 years ago
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/
follow-up: 23 comment:20 by , 11 years ago
It runs, but as a regression, the keyboard shortcuts all seem to be in QWERTY.
comment:21 by , 11 years ago
Also, the Java 7 build seems to take up a lot of CPU when compared to the Java 6 build.
comment:23 by , 11 years ago
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 by , 11 years ago
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 by , 11 years ago
@Stereo: Java 7u40 has been released, can you please give it a try ? Thanks.
comment:27 by , 11 years ago
Cc: | added |
---|
comment:28 by , 11 years ago
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 by , 11 years ago
Tested on two different systems running 10.9. Worked fine on both - thanks!
comment:30 by , 11 years ago
@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 by , 11 years ago
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 by , 11 years ago
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.
follow-up: 36 comment:34 by , 11 years ago
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 by , 11 years ago
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
follow-up: 38 comment:37 by , 11 years ago
QWERTY ? Then what is your problem ? We're talking about shortcuts treated as QWERTY on non-QWERTY keyboards :)
comment:38 by , 11 years ago
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 by , 11 years ago
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 by , 11 years ago
Milestone: | → 14.02 |
---|
comment:41 by , 11 years ago
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 by , 11 years ago
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 by , 10 years ago
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 by , 10 years ago
Keywords: | javabug added |
---|
comment:47 by , 10 years ago
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)