From mik3hall at gmail.com Sat Dec 1 03:27:48 2012 From: mik3hall at gmail.com (Michael Hall) Date: Sat, 1 Dec 2012 05:27:48 -0600 Subject: macosx-port-dev Digest, Vol 23, Issue 27 In-Reply-To: <895A131A-012C-46F4-86BF-7B72E6E1BEB9@rochester.rr.com> References: <895A131A-012C-46F4-86BF-7B72E6E1BEB9@rochester.rr.com> Message-ID: On Nov 30, 2012, at 10:52 PM, Jeff Palmer wrote: > FYI, My O'Reilly book, Java Foundation Classes, is really old. I did see for the java.awt.datatransfer.Clipboard class that "Untrusted applet code is not allowed to access the system clipboard, so untrusted applets cannot participate in inter application cut-and-paste". > > I am not sure if this is the issue, but if so it is not a bug. No sign, just intra application cut-and-paste. Sorry, my previous post didn't make it clear that signed is what I was talking about following up on Joshua Smith's suggestion. I had seen things like this suggesting it should work? 4902837 : In a signed applet default cut/copy/paste using cntrl-x/cntrl-c/cntrl-v broken http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4902837 But thought maybe that had changed sometime since it didn't seem to work at all on OS X. When it was posted that it should work and then I found that it did work on Windows I figured this must be a OS X bug and did the bug report. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter From tobi at ultramixer.com Mon Dec 3 03:55:52 2012 From: tobi at ultramixer.com (Tobias Bley) Date: Mon, 3 Dec 2012 12:55:52 +0100 Subject: Comit code to AppBundler Message-ID: <35D28665-62BD-4E18-BF99-27A45EFB05AB@ultramixer.com> Hi, I would like to contribute to AppBundler project?I contributed code already to the JarBundler project? Tobi From cosmicvoyager at gmail.com Mon Dec 3 07:30:55 2012 From: cosmicvoyager at gmail.com (Chucky Chuck Charles) Date: Mon, 3 Dec 2012 09:30:55 -0600 Subject: Error compiling Java Message-ID: I got an error after using make ALLOW_DOWNLOADS=true SA_APPLE_BOOT_JAVA=true ALWAYS_PASS_TEST_GAMMA=true ALT_BOOTDIR=`/usr/libexec/java_home -v 1.6` HOTSPOT_BUILD_JOBS=`sysctl -n hw.ncpu` I am running Mac OS X 10.6.8 XCode 3.2.6 java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) The error /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: 'JNFRunLoopDidStartNotification' undeclared (first use in this function) /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: (Each undeclared identifier is reported only once /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: for each function it appears in.) /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m: In function '-[NSApplicationAWT registerWithProcessManager]': /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: 'JNFRunLoop' may not respond to '+performOnMainThreadWaiting:withBlock:' /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: (Messages without a matching method signature /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: will be assumed to return 'id' and accept /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: '...' as arguments.) make[5]: *** [/Users/Chuck/jdk7u-dev/jdk7u-dev/build/macosx-x86_64/tmp/sun/osxapp/obj64/NSApplicationAWT.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [library_parallel_compile] Error 2 make[3]: *** [all] Error 1 make[2]: *** [all] Error 1 make[1]: *** [jdk-build] Error 2 make: *** [build_product_image] Error 2 From scott.kovatch at oracle.com Mon Dec 3 08:54:23 2012 From: scott.kovatch at oracle.com (Scott Kovatch) Date: Mon, 3 Dec 2012 08:54:23 -0800 Subject: Comit code to AppBundler In-Reply-To: <35D28665-62BD-4E18-BF99-27A45EFB05AB@ultramixer.com> References: <35D28665-62BD-4E18-BF99-27A45EFB05AB@ultramixer.com> Message-ID: On Dec 3, 2012, at 3:55 AM, Tobias Bley wrote: > Hi, > > I would like to contribute to AppBundler project?I contributed code already to the JarBundler project? > > Tobi The first step is to create an issue in the AppBundler project's JIRA: http://java.net/jira/browse/APPBUNDLER Then attach the patch. Greg Brown should follow up from there, but I may have to do it. -- Scott ---------------------------------------- Scott Kovatch scott.kovatch at oracle.com Santa Clara/Pleasanton, CA From cosmicvoyager at gmail.com Mon Dec 3 09:41:32 2012 From: cosmicvoyager at gmail.com (Chucky Chuck Charles) Date: Mon, 3 Dec 2012 11:41:32 -0600 Subject: Fwd: Error compiling Java References: Message-ID: Updated: Now using Xcode 4.2 I got an error after using make ALLOW_DOWNLOADS=true SA_APPLE_BOOT_JAVA=true ALWAYS_PASS_TEST_GAMMA=true ALT_BOOTDIR=`/usr/libexec/java_home -v 1.6` HOTSPOT_BUILD_JOBS=`sysctl -n hw.ncpu` I am running Mac OS X 10.6.8 XCode 4.2 java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) The error ld: in /System/Library/Frameworks//Kerberos.framework/Kerberos, file too small for architecture x86_64 collect2: ld returned 1 exit status make[5]: *** [/Users/Chuck/jdk7u-dev/build/macosx-x86_64/lib/libosxkrb5.dylib] Error 1 make[4]: *** [all] Error 1 make[3]: *** [all] Error 1 make[2]: *** [all] Error 1 make[1]: *** [jdk-build] Error 2 make: *** [build_product_image] Error 2 Also, how do i do this step? What do I type in terminal? Set the LANG environment variable if it isn't set: $ export LANG=C # bash, ksh, etc. % setenv LANG C # csh and friends Begin forwarded message: > From: Chucky Chuck Charles > Date: December 3, 2012 9:30:55 AM CST > To: macosx-port-dev at openjdk.java.net > Subject: Error compiling Java > > I got an error after using > > make ALLOW_DOWNLOADS=true SA_APPLE_BOOT_JAVA=true ALWAYS_PASS_TEST_GAMMA=true ALT_BOOTDIR=`/usr/libexec/java_home -v 1.6` HOTSPOT_BUILD_JOBS=`sysctl -n hw.ncpu` > > > I am running > > Mac OS X 10.6.8 > XCode 3.2.6 > java version "1.6.0_37" > Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) > Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) > > > The error > > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: 'JNFRunLoopDidStartNotification' undeclared (first use in this function) > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: (Each undeclared identifier is reported only once > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: for each function it appears in.) > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m: In function '-[NSApplicationAWT registerWithProcessManager]': > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: 'JNFRunLoop' may not respond to '+performOnMainThreadWaiting:withBlock:' > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: (Messages without a matching method signature > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: will be assumed to return 'id' and accept > /Users/Chuck/jdk7u-dev/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: '...' as arguments.) > make[5]: *** [/Users/Chuck/jdk7u-dev/jdk7u-dev/build/macosx-x86_64/tmp/sun/osxapp/obj64/NSApplicationAWT.o] Error 1 > make[5]: *** Waiting for unfinished jobs.... > make[4]: *** [library_parallel_compile] Error 2 > make[3]: *** [all] Error 1 > make[2]: *** [all] Error 1 > make[1]: *** [jdk-build] Error 2 > make: *** [build_product_image] Error 2 From Sergey.Bylokhov at oracle.com Tue Dec 4 03:54:05 2012 From: Sergey.Bylokhov at oracle.com (Sergey Bylokhov) Date: Tue, 04 Dec 2012 15:54:05 +0400 Subject: [7u12] Review request for 2223196 : [macosx] Situation when KeyEventDispatcher doesn't work on AWT but does on Swing In-Reply-To: <7AB66D3D-E82D-45CC-98FE-7017A548D2F4@oracle.com> References: <7AB66D3D-E82D-45CC-98FE-7017A548D2F4@oracle.com> Message-ID: <50BDE45D.7020009@oracle.com> Hi, Leonid. Fix looks good. 29.11.2012 1:19, Leonid Romanov wrote: > Hi, > Please review a fix for 2223196 : [macosx] Situation when KeyEventDispatcher doesn't work on AWT but does on Swing. In JDK 8 this bug was fixed by the Anton Tarasov fix for 6981400 (*). This fix is a OS X specific subset of the Anton's fix. > > Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2223196 > Wbrev: http://cr.openjdk.java.net/~leonidr/2223196/webrev.00/ > > > * http://cr.openjdk.java.net/~ant/6981400/webrev.7/ > > Thanks, > Leonid. > > -- Best regards, Sergey. From nmrview at me.com Tue Dec 4 10:09:17 2012 From: nmrview at me.com (Bruce Johnson) Date: Tue, 04 Dec 2012 13:09:17 -0500 Subject: Status of Application.setDefaultMenuBar Message-ID: <522D32ED-0F0A-42CC-95FF-755972E9BF00@me.com> I can't readily release my application for Java 1.7 on the Mac without support for Application.setDefaultMenuBar. This seems pretty important for anyone that wants their application to look like a native Mac application and the lack of it is a big step backwards relative to Java 1.6. Is there any hope that this will be supported in the "near future"? Or do we need to go back to the crazy old days of creating an identical, hidden, menubar for every window? Also, does anyone know if there is an actual bug filed for the lack of setDefaultMenuBar. I can't find anything in bugs.sun.com, though there was an item in the old Jira system: http://java.net/jira/browse/MACOSX_PORT-775. I thought all those bugs had been migrated to bugs.sun.com. Thanks for any info, Bruce From anthony.petrov at oracle.com Wed Dec 5 02:21:00 2012 From: anthony.petrov at oracle.com (Anthony Petrov) Date: Wed, 05 Dec 2012 14:21:00 +0400 Subject: Status of Application.setDefaultMenuBar In-Reply-To: <522D32ED-0F0A-42CC-95FF-755972E9BF00@me.com> References: <522D32ED-0F0A-42CC-95FF-755972E9BF00@me.com> Message-ID: <50BF200C.3050204@oracle.com> Hi Bruce, So, did you file a bug at bugs.sun.com about this issue yet? If not, you should do so. There's really nothing wrong with filing a bug even if it exists already - it will just be closed as a duplicate. A general rule: when in doubt - file a bug. PS. The JIRA instance you're referring to is no longer used to track JDK issues on the Mac. It might happen that the bug was filed after the migration had been completed, and thus it didn't make it to the real bug database. This is our fault that the JIRA project hasn't been made read-only after the migration. Sorry about that. -- best regards, Anthony On 12/4/2012 10:09 PM, Bruce Johnson wrote: > I can't readily release my application for Java 1.7 on the Mac without support for Application.setDefaultMenuBar. This seems pretty important for anyone that wants their application to look like a native Mac application and the lack of it is a big step backwards relative to Java 1.6. > > Is there any hope that this will be supported in the "near future"? Or do we need to go back to the crazy old days of creating an identical, hidden, menubar for every window? > > Also, does anyone know if there is an actual bug filed for the lack of setDefaultMenuBar. I can't find anything in bugs.sun.com, though there was an item in the old Jira system: http://java.net/jira/browse/MACOSX_PORT-775. I thought all those bugs had been migrated to bugs.sun.com. > > > Thanks for any info, > > Bruce From nmrview at me.com Wed Dec 5 10:16:29 2012 From: nmrview at me.com (Bruce Johnson) Date: Wed, 05 Dec 2012 13:16:29 -0500 Subject: Status of Application.setDefaultMenuBar In-Reply-To: <50BF200C.3050204@oracle.com> References: <522D32ED-0F0A-42CC-95FF-755972E9BF00@me.com> <50BF200C.3050204@oracle.com> Message-ID: <8B6006C8-903A-4080-B6EC-6249C3F6B2F4@me.com> I've filed a bug. The internal review code is: 2396618 cheers, Bruce On Dec 5, 2012, at 5:21 AM, Anthony Petrov wrote: > Hi Bruce, > > So, did you file a bug at bugs.sun.com about this issue yet? If not, you should do so. There's really nothing wrong with filing a bug even if it exists already - it will just be closed as a duplicate. > > A general rule: when in doubt - file a bug. > > PS. The JIRA instance you're referring to is no longer used to track JDK issues on the Mac. It might happen that the bug was filed after the migration had been completed, and thus it didn't make it to the real bug database. This is our fault that the JIRA project hasn't been made read-only after the migration. Sorry about that. > > -- > best regards, > Anthony > > On 12/4/2012 10:09 PM, Bruce Johnson wrote: >> I can't readily release my application for Java 1.7 on the Mac without support for Application.setDefaultMenuBar. This seems pretty important for anyone that wants their application to look like a native Mac application and the lack of it is a big step backwards relative to Java 1.6. >> Is there any hope that this will be supported in the "near future"? Or do we need to go back to the crazy old days of creating an identical, hidden, menubar for every window? >> Also, does anyone know if there is an actual bug filed for the lack of setDefaultMenuBar. I can't find anything in bugs.sun.com, though there was an item in the old Jira system: http://java.net/jira/browse/MACOSX_PORT-775. I thought all those bugs had been migrated to bugs.sun.com. >> Thanks for any info, >> Bruce From java at waldenpond.com Fri Dec 7 07:27:54 2012 From: java at waldenpond.com (Alan Bomberger) Date: Fri, 7 Dec 2012 08:27:54 -0700 Subject: Bundling JRE for a Luddite Message-ID: I have an application that I developed using Netbeans. I have kept it up to date by dropping a new jar file into the application bundle (built so long ago I don't remember how -- jarbundler?) Besides me there is one other user. I recently had to update the javaapplicationstub. I don't really want to re-learn java development and I have quite a lot of data in this proprietary format (www.waldenpond.com/thinker). When the javapplicationstub stops working, this application is dead. Is there a generic JRE bundled application into which I can drop my jar file (replacing the application) and tweak the plist without having to start over with xcode/ant/etc. I just want to keep using this application as I am no longer interested in development. I would do this for java 6 and possibly java 7. Mike directed me to this list for help. Thanks -- It is seldom that liberty of any kind is lost all at once. - David Hume Hypertext editor for creative people. From cosmicvoyager at gmail.com Sat Dec 8 08:24:41 2012 From: cosmicvoyager at gmail.com (Chucky Chuck Charles) Date: Sat, 8 Dec 2012 10:24:41 -0600 Subject: Errors building Java 7 for Snow Leopard Message-ID: Greetings, I got errors building Java 7 for Snow Leopard. Please tell me what info you need to help. Thanks Mac OS X 10.6.8 XCode 4.1 java version "1.6.0_37" Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m: In function '-[NSApplicationAWT finishLaunching]': /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: 'JNFRunLoopDidStartNotification' undeclared (first use in this function) /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: (Each undeclared identifier is reported only once /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: for each function it appears in.) /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m: In function '-[NSApplicationAWT registerWithProcessManager]': /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: 'JNFRunLoop' may not respond to '+performOnMainThreadWaiting:withBlock:' /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: (Messages without a matching method signature /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: will be assumed to return 'id' and accept /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: '...' as arguments.) make[5]: *** [/Users/Chuck/jdk7u-dev/build/macosx-x86_64/tmp/sun/osxapp/obj64/NSApplicationAWT.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [library_parallel_compile] Error 2 make[3]: *** [all] Error 1 make[2]: *** [all] Error 1 make[1]: *** [jdk-build] Error 2 make: *** [build_product_image] Error 2 From anthony.petrov at oracle.com Mon Dec 10 06:21:47 2012 From: anthony.petrov at oracle.com (Anthony Petrov) Date: Mon, 10 Dec 2012 18:21:47 +0400 Subject: Errors building Java 7 for Snow Leopard In-Reply-To: References: Message-ID: <50C5EFFB.5010603@oracle.com> Hi, According to http://hg.openjdk.java.net/jdk7u/jdk7u-dev/raw-file/tip/README-builds.html#macosx the minimum version of OS X to build OpenJDK 7 on the Mac is 10.7.3. -- best regards, Anthony On 12/08/12 20:24, Chucky Chuck Charles wrote: > Greetings, > > I got errors building Java 7 for Snow Leopard. Please tell me what info you need to help. > > Thanks > > > Mac OS X 10.6.8 > XCode 4.1 > java version "1.6.0_37" > Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-10M3909) > Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode) > > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m: In function '-[NSApplicationAWT finishLaunching]': > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: 'JNFRunLoopDidStartNotification' undeclared (first use in this function) > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: (Each undeclared identifier is reported only once > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:130: error: for each function it appears in.) > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m: In function '-[NSApplicationAWT registerWithProcessManager]': > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: 'JNFRunLoop' may not respond to '+performOnMainThreadWaiting:withBlock:' > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: (Messages without a matching method signature > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: will be assumed to return 'id' and accept > /Users/Chuck/jdk7u-dev/jdk/src/macosx/native/sun/osxapp/NSApplicationAWT.m:241: warning: '...' as arguments.) > make[5]: *** [/Users/Chuck/jdk7u-dev/build/macosx-x86_64/tmp/sun/osxapp/obj64/NSApplicationAWT.o] Error 1 > make[5]: *** Waiting for unfinished jobs.... > make[4]: *** [library_parallel_compile] Error 2 > make[3]: *** [all] Error 1 > make[2]: *** [all] Error 1 > make[1]: *** [jdk-build] Error 2 > make: *** [build_product_image] Error 2 From anton.tarasov at oracle.com Tue Dec 11 03:24:57 2012 From: anton.tarasov at oracle.com (Anton V. Tarasov) Date: Tue, 11 Dec 2012 15:24:57 +0400 Subject: [7u12] Review request for 2223196 : [macosx] Situation when KeyEventDispatcher doesn't work on AWT but does on Swing In-Reply-To: <7AB66D3D-E82D-45CC-98FE-7017A548D2F4@oracle.com> References: <7AB66D3D-E82D-45CC-98FE-7017A548D2F4@oracle.com> Message-ID: <50C71809.5050203@oracle.com> Hi Leonid, The problem with lost key events is fixed with the only change in the LWWindowPeer.dispatchKeyEvent method. Did you have any specific need to backport the rest of the changes? I'm not against backporting it, but just would like to understand the reason. Thanks, Anton. On 29.11.2012 1:19, Leonid Romanov wrote: > Hi, > Please review a fix for 2223196 : [macosx] Situation when KeyEventDispatcher doesn't work on AWT > but does on Swing. In JDK 8 this bug was fixed by the Anton Tarasov fix for 6981400 (*). This fix > is a OS X specific subset of the Anton's fix. > > Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2223196 > Wbrev: http://cr.openjdk.java.net/~leonidr/2223196/webrev.00/ > > > > * http://cr.openjdk.java.net/~ant/6981400/webrev.7/ > > > Thanks, > Leonid. > > From mik3hall at gmail.com Wed Dec 12 17:51:58 2012 From: mik3hall at gmail.com (Michael Hall) Date: Wed, 12 Dec 2012 19:51:58 -0600 Subject: JTextComponent paste exception Message-ID: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> I have an application that runs off the jdk for tools access. If I try pasting text into a JTextComponent from an email message I get the following exception. IOException:java.io.FileNotFoundException: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties (No such file or directory) while loading default flavormap.properties file:/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties java.io.IOException: cannot transfer non-text data as Reader at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1215) at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131) at sun.lwawt.macosx.CClipboard.setContentsNative(CClipboard.java:76) at sun.awt.datatransfer.SunClipboard.setContents(SunClipboard.java:110) at javax.swing.TransferHandler.exportToClipboard(TransferHandler.java:787) at javax.swing.TransferHandler$TransferAction.actionPerformedImpl(TransferHandler.java:1745) at javax.swing.TransferHandler$TransferAction.access$700(TransferHandler.java:1684) at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1707) at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1705) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1722) at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1720) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:1719) at javax.swing.text.JTextComponent.invokeAction(JTextComponent.java:1513) at javax.swing.text.JTextComponent.copy(JTextComponent.java:1474) As near as I can tell the email message is plain text. Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit To be expected when running with the jdk? Or, not to be expected and bug report? Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter From roger.lewis at oracle.com Wed Dec 12 18:40:19 2012 From: roger.lewis at oracle.com (Roger Lewis) Date: Wed, 12 Dec 2012 18:40:19 -0800 Subject: JTextComponent paste exception In-Reply-To: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> References: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> Message-ID: <50C94013.20503@oracle.com> Hi Michael, Can you first try with 7u10? DataTransferer.java handles of some encoding and there were a number of bugs fixed since 7u7 that could resolve the issue being seen. For example: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193966 For convince: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html -Roger On 12/12/12 5:51 PM, Michael Hall wrote: > I have an application that runs off the jdk for tools access. > If I try pasting text into a JTextComponent from an email message I get the following exception. > > IOException:java.io.FileNotFoundException: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties (No such file or directory) while loading default flavormap.properties file:/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties > java.io.IOException: cannot transfer non-text data as Reader > at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1215) > at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131) > at sun.lwawt.macosx.CClipboard.setContentsNative(CClipboard.java:76) > at sun.awt.datatransfer.SunClipboard.setContents(SunClipboard.java:110) > at javax.swing.TransferHandler.exportToClipboard(TransferHandler.java:787) > at javax.swing.TransferHandler$TransferAction.actionPerformedImpl(TransferHandler.java:1745) > at javax.swing.TransferHandler$TransferAction.access$700(TransferHandler.java:1684) > at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1707) > at javax.swing.TransferHandler$TransferAction$1.run(TransferHandler.java:1705) > at java.security.AccessController.doPrivileged(Native Method) > at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) > at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) > at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1722) > at javax.swing.TransferHandler$TransferAction$2.run(TransferHandler.java:1720) > at java.security.AccessController.doPrivileged(Native Method) > at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) > at javax.swing.TransferHandler$TransferAction.actionPerformed(TransferHandler.java:1719) > at javax.swing.text.JTextComponent.invokeAction(JTextComponent.java:1513) > at javax.swing.text.JTextComponent.copy(JTextComponent.java:1474) > > As near as I can tell the email message is plain text. > > Content-Type: text/plain; > charset=UTF-8 > Content-Transfer-Encoding: 7bit > > To be expected when running with the jdk? Or, not to be expected and bug report? > > Michael Hall > > trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz > > HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe > > AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter > > > > From mik3hall at gmail.com Thu Dec 13 02:29:14 2012 From: mik3hall at gmail.com (Michael Hall) Date: Thu, 13 Dec 2012 04:29:14 -0600 Subject: JTextComponent paste exception In-Reply-To: <50C94013.20503@oracle.com> References: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> <50C94013.20503@oracle.com> Message-ID: On Dec 12, 2012, at 8:40 PM, Roger Lewis wrote: > Hi Michael, > > Can you first try with 7u10? DataTransferer.java handles of some encoding and there were a number of bugs fixed since 7u7 that could resolve the issue being seen. > For example: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193966 > > For convince: > http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Roger, I was just going to file the bug report. The problem appears to be an incorrect path to the jdk flavormap.properties file Exception /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties locate flavormap.properties 'shared' jre /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/flavormap.properties ok jdk /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre/lib/flavormap.properties off by the /jre I don't see that in the bug report you indicate but I'll get current with jdk 7u10 and see if it makes a difference when I get a chance. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter From mik3hall at gmail.com Thu Dec 13 03:04:52 2012 From: mik3hall at gmail.com (Michael Hall) Date: Thu, 13 Dec 2012 05:04:52 -0600 Subject: JTextComponent paste exception In-Reply-To: <50C94013.20503@oracle.com> References: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> <50C94013.20503@oracle.com> Message-ID: <69CC7752-7DE0-40FC-9869-ECF399F5A09E@gmail.com> On Dec 12, 2012, at 8:40 PM, Roger Lewis wrote: > Hi Michael, > > Can you first try with 7u10? DataTransferer.java handles of some encoding and there were a number of bugs fixed since 7u7 that could resolve the issue being seen. > For example: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193966 > > For convince: > http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Roger, OK, getting current didn't take too long. java version "1.7.0_10" Java(TM) SE Runtime Environment (build 1.7.0_10-b18) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode) The problem appears to persist in 7u10 so I went ahead on the bug report. Your report has been assigned an internal review ID of 2401628. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter On Dec 12, 2012, at 8:40 PM, Roger Lewis wrote: > Hi Michael, > > Can you first try with 7u10? DataTransferer.java handles of some encoding and there were a number of bugs fixed since 7u7 that could resolve the issue being seen. > For example: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193966 > > For convince: > http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html From jesmith at kaon.com Fri Dec 14 05:50:48 2012 From: jesmith at kaon.com (Joshua Smith) Date: Fri, 14 Dec 2012 08:50:48 -0500 Subject: What's the status of JOGL on Mac on JDK 1.7? Message-ID: <30647492-4581-4E3D-8C89-1F992D2D1EC4@kaon.com> My app is currently using JOGL 1.1.1 on Apple's JDK 6. I'm looking at migrating to JDK 7, and this isn't working because of a dependency on apple.awt.componentmodel Can someone point me at a roadmap for getting past this? Do I need to update to a new version of JOGL? -Joshua From Kustaa.Nyholm at planmeca.com Fri Dec 14 06:58:56 2012 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 14 Dec 2012 16:58:56 +0200 Subject: What's the status of JOGL on Mac on JDK 1.7? In-Reply-To: <30647492-4581-4E3D-8C89-1F992D2D1EC4@kaon.com> Message-ID: On 14.12.2012 15.50, "Joshua Smith" wrote: >My app is currently using JOGL 1.1.1 on Apple's JDK 6. > >I'm looking at migrating to JDK 7, and this isn't working because of a >dependency on apple.awt.componentmodel > >Can someone point me at a roadmap for getting past this? Do I need to >update to a new version of JOGL? > >-Joshua I'm not really qualified to comment but I can share my experience. JOGL 1.1.1 seems ancient. The thing is now called jogamp and the latest release is 2.0rc11, I seem to be using: 2.0-b66-20121101 Get the latest stable from here: http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases Some code re-factoring is required and can seem a bit daunting but I was able to get everything I use in about half an hour. The key is to realize that in the past (IIRC!!) most stuff, ie API calls to classic OpenGL was in: javax.media.opengl.GL but now it is in: javax.media.opengl.GL2 and in your opengl event listener stuff you need something like: addGLEventListener(new javax.media.opengl.GLEventListener() { public void display(javax.media.opengl.GLAutoDrawable gldwbl) { callYourDrawCode( (javax.media.opengl.GL2) (gldwbl.getGL()) ); } Note the cast to GL2. IIRC there is also one or two methods in the event listener that need implementing. Works for me both with (Apple) 1.6 and 1.7 (not sure if I've tested with Oracle 1.7 as that is not up to par on MacBook Retina). hope this helps. br Kusti From swpalmer at gmail.com Fri Dec 14 07:28:28 2012 From: swpalmer at gmail.com (Scott Palmer) Date: Fri, 14 Dec 2012 10:28:28 -0500 Subject: What's the status of JOGL on Mac on JDK 1.7? In-Reply-To: References: Message-ID: <7584B8A6-323F-4A7B-848C-5A84FDCD6D3A@gmail.com> On 2012-12-14, at 9:58 AM, Kustaa Nyholm wrote: > > Works for me both with (Apple) 1.6 and 1.7 (not sure if I've tested > with Oracle 1.7 as that is not up to par on MacBook Retina). I'm sure you *have* tested with Oracle 1.7, since as far as I know, there is no such thing as an Apple 1.7. Scott From Kustaa.Nyholm at planmeca.com Fri Dec 14 07:35:31 2012 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Fri, 14 Dec 2012 17:35:31 +0200 Subject: What's the status of JOGL on Mac on JDK 1.7? In-Reply-To: <7584B8A6-323F-4A7B-848C-5A84FDCD6D3A@gmail.com> Message-ID: On 14.12.2012 17.28, "Scott Palmer" wrote: > >On 2012-12-14, at 9:58 AM, Kustaa Nyholm >wrote: >> >> Works for me both with (Apple) 1.6 and 1.7 (not sure if I've tested >> with Oracle 1.7 as that is not up to par on MacBook Retina). > >I'm sure you *have* tested with Oracle 1.7, since as far as I know, there >is no such thing as an Apple 1.7. You are probably right, so many moving parts atm in Java on Mac world that it is difficult to keep track. So, we know we know it [jogl] works with Oracle Java 7! br Kusti From mik3hall at gmail.com Fri Dec 14 13:40:42 2012 From: mik3hall at gmail.com (Michael Hall) Date: Fri, 14 Dec 2012 15:40:42 -0600 Subject: JTextComponent paste exception In-Reply-To: <69CC7752-7DE0-40FC-9869-ECF399F5A09E@gmail.com> References: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> <50C94013.20503@oracle.com> <69CC7752-7DE0-40FC-9869-ECF399F5A09E@gmail.com> Message-ID: <5F648F75-41CE-4225-ACB2-105EE0113D49@gmail.com> On Dec 13, 2012, at 5:04 AM, Michael Hall wrote: > The problem appears to persist in 7u10 so I went ahead on the bug report. > Your report has been assigned an internal review ID of 2401628. Concerning this. I've had a couple bug reports lately. Ending with the above, I receive an email with an 'internal reviewID of #'. And thats it. These have not been Java show stoppers or anything, but I'd be curious about the status. How is this determined? Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter From mik3hall at gmail.com Fri Dec 14 17:50:39 2012 From: mik3hall at gmail.com (Michael Hall) Date: Fri, 14 Dec 2012 19:50:39 -0600 Subject: JTextComponent paste exception In-Reply-To: References: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> <50C94013.20503@oracle.com> Message-ID: <190285AD-1380-4C87-B645-99A222B73C92@gmail.com> On Dec 13, 2012, at 4:29 AM, Michael Hall wrote: > On Dec 12, 2012, at 8:40 PM, Roger Lewis wrote: > >> Hi Michael, >> >> Can you first try with 7u10? DataTransferer.java handles of some encoding and there were a number of bugs fixed since 7u7 that could resolve the issue being seen. >> For example: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193966 >> >> For convince: >> http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html > > Roger, > I was just going to file the bug report. > The problem appears to be an incorrect path to the jdk flavormap.properties file > > Exception > /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties > I looked into this a bit more. As near as I can tell the code determining the location of the flavormap.properties file is in java.awt.datatransfer.SystemFlavorMap in the initSystemFlavorMap() method with? String fileName = System.getProperty("java.home") + File.separator + "lib" + File.separator + "flavormap.properties"; Another possibility for this would be something like? public class FlavorFinder { public static void main(String[] args) { new FlavorFinder(); } public FlavorFinder() { String rtpath = getClass().getClassLoader().getResource("java/lang/Object.class").getPath(); String filePath = rtpath.substring(5,rtpath.indexOf("lib")+4) + "flavormap.properties"; System.out.println(filePath); } } getting java FlavorFinder /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/lib/flavormap.properties correct I believe for the jdk. Obviously a lot more inefficient than simply pasting together the string but my understanding of this class is that this is only done once so the performance hit wouldn't be a major concern. This hit would also probably not be at startup when performance might be more of a concern but later when clipboard access would be in use. I may not be correct in my understanding here but I would think that any application run with the jdk would not correctly locate this file and then would not correctly handle cut and paste? I'd think jdk using applications like ide's might be impacted? My understanding might be wrong because my use is actually running from the jre with temporary OS X access to the jdk with? static { if (javaHome == null) { javaHome = rtexec(System.out,new String[] {"/usr/libexec/java_home","-v","1.7"}).trim(); if (javaHome.equals("-")) javaHome = null; else { System.setProperty("java.home",javaHome); } } } I could run the app jdk embedded to see if the problem is always there for the jdk runtime but have not. I just wondered what problems there might be in determining the path based off of current runtime instead of trying to place it relative to java.home? Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter From mik3hall at gmail.com Fri Dec 14 19:27:08 2012 From: mik3hall at gmail.com (Michael Hall) Date: Fri, 14 Dec 2012 21:27:08 -0600 Subject: JTextComponent paste exception In-Reply-To: <190285AD-1380-4C87-B645-99A222B73C92@gmail.com> References: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> <50C94013.20503@oracle.com> <190285AD-1380-4C87-B645-99A222B73C92@gmail.com> Message-ID: On Dec 14, 2012, at 7:50 PM, Michael Hall wrote: > On Dec 13, 2012, at 4:29 AM, Michael Hall wrote: > >> On Dec 12, 2012, at 8:40 PM, Roger Lewis wrote: >> >>> Hi Michael, >>> >>> Can you first try with 7u10? DataTransferer.java handles of some encoding and there were a number of bugs fixed since 7u7 that could resolve the issue being seen. >>> For example: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193966 >>> >>> For convince: >>> http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html >> >> Roger, >> I was just going to file the bug report. >> The problem appears to be an incorrect path to the jdk flavormap.properties file >> >> Exception >> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties >> > > I looked into this a bit more. I looked into it still a bit more. Adding this? String javaHome = System.getProperty("java.home"); System.out.println("default java.home " + javaHome + " includes jre is " + (javaHome.contains("jre"))); gets? default java.home /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre includes jre is true including the SystemFlavorMap necessary /jre so this is fine with the default. My own code setting this to the result of the OS X command java_home is what is absent the /jre. It works anyhow for my use, nice robustness, but doesn't work for SystemFlavorMap not quite the robustness. Changing mine to javaHome = rtexec(System.out,new String[] {"/usr/libexec/java_home","-v","1.7"}).trim() + "/jre"; works for my purpose, access to the compiler tool, and it works for SystemFlavorMap access to flavormap.properties for cut and paste. So, never mind, my change would still work as well but probably isn't worth the overhead to handle what is basically an incorrectly set java.home property. if I find a subsequent bug, I can status it. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter > As near as I can tell the code determining the location of the flavormap.properties file is in > java.awt.datatransfer.SystemFlavorMap in the initSystemFlavorMap() method with? > > String fileName = > System.getProperty("java.home") + > File.separator + > "lib" + > File.separator + > "flavormap.properties"; > > Another possibility for this would be something like? > > public class FlavorFinder { > > public static void main(String[] args) { > new FlavorFinder(); > } > > public FlavorFinder() { > String rtpath = getClass().getClassLoader().getResource("java/lang/Object.class").getPath(); > String filePath = rtpath.substring(5,rtpath.indexOf("lib")+4) + "flavormap.properties"; > System.out.println(filePath); > } > > } > > getting > java FlavorFinder > /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/lib/flavormap.properties > correct I believe for the jdk. > Obviously a lot more inefficient than simply pasting together the string but my understanding of this class is that this is only done once so the performance hit wouldn't be a major concern. This hit would also probably not be at startup when performance might be more of a concern but later when clipboard access would be in use. > > I may not be correct in my understanding here but I would think that any application run with the jdk would not correctly locate this file and then would not correctly handle cut and paste? I'd think jdk using applications like ide's might be impacted? > My understanding might be wrong because my use is actually running from the jre with temporary OS X access to the jdk with? > > static { > if (javaHome == null) { > javaHome = rtexec(System.out,new String[] {"/usr/libexec/java_home","-v","1.7"}).trim(); > if (javaHome.equals("-")) javaHome = null; > else { > System.setProperty("java.home",javaHome); > } > } > } > > I could run the app jdk embedded to see if the problem is always there for the jdk runtime but have not. > > I just wondered what problems there might be in determining the path based off of current runtime instead of trying to place it relative to java.home? > > Michael Hall > > trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz > > HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe > > AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter > From jonathan.gibbons at oracle.com Fri Dec 14 20:02:13 2012 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Fri, 14 Dec 2012 20:02:13 -0800 Subject: JTextComponent paste exception In-Reply-To: References: <3099CD58-857E-4377-A61B-B9FAA0F4CFE9@gmail.com> <50C94013.20503@oracle.com> <190285AD-1380-4C87-B645-99A222B73C92@gmail.com> Message-ID: <50CBF645.8050609@oracle.com> I don't have all the context here, but I do note that it is common to see code that processes java.home remove the trailing /jre if it exists and is not wanted, or add it if it does not exist and is wanted. Normally, java.home points to the JRE, even when invoked from a JDK, so typically has the extra /jre component in this case. You can simplify the string bashing as follows: File java_home = new File(System.getProperty("java.home")); if (java_home.getName().equals("jre")) java_home = javaHome.getParentFile(); Hope that helps, -- Jon On 12/14/2012 07:27 PM, Michael Hall wrote: > On Dec 14, 2012, at 7:50 PM, Michael Hall wrote: > >> On Dec 13, 2012, at 4:29 AM, Michael Hall wrote: >> >>> On Dec 12, 2012, at 8:40 PM, Roger Lewis wrote: >>> >>>> Hi Michael, >>>> >>>> Can you first try with 7u10? DataTransferer.java handles of some encoding and there were a number of bugs fixed since 7u7 that could resolve the issue being seen. >>>> For example: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7193966 >>>> >>>> For convince: >>>> http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html >>> Roger, >>> I was just going to file the bug report. >>> The problem appears to be an incorrect path to the jdk flavormap.properties file >>> >>> Exception >>> /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/lib/flavormap.properties >>> >> I looked into this a bit more. > I looked into it still a bit more. Adding this? > String javaHome = System.getProperty("java.home"); > System.out.println("default java.home " + javaHome + " includes jre is " + (javaHome.contains("jre"))); > gets? > default java.home /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre includes jre is true > > including the SystemFlavorMap necessary /jre > so this is fine with the default. My own code setting this to the result of the OS X command java_home is what is absent the /jre. > It works anyhow for my use, nice robustness, but doesn't work for SystemFlavorMap not quite the robustness. > > Changing mine to > javaHome = rtexec(System.out,new String[] {"/usr/libexec/java_home","-v","1.7"}).trim() + "/jre"; > works for my purpose, access to the compiler tool, and it works for SystemFlavorMap access to flavormap.properties for cut and paste. > > So, never mind, my change would still work as well but probably isn't worth the overhead to handle what is basically an incorrectly set java.home property. if I find a subsequent bug, I can status it. > > > > Michael Hall > > trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz > > HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe > > AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter > > > > > >> As near as I can tell the code determining the location of the flavormap.properties file is in >> java.awt.datatransfer.SystemFlavorMap in the initSystemFlavorMap() method with? >> >> String fileName = >> System.getProperty("java.home") + >> File.separator + >> "lib" + >> File.separator + >> "flavormap.properties"; >> >> Another possibility for this would be something like? >> >> public class FlavorFinder { >> >> public static void main(String[] args) { >> new FlavorFinder(); >> } >> >> public FlavorFinder() { >> String rtpath = getClass().getClassLoader().getResource("java/lang/Object.class").getPath(); >> String filePath = rtpath.substring(5,rtpath.indexOf("lib")+4) + "flavormap.properties"; >> System.out.println(filePath); >> } >> >> } >> >> getting >> java FlavorFinder >> /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/lib/flavormap.properties >> correct I believe for the jdk. >> Obviously a lot more inefficient than simply pasting together the string but my understanding of this class is that this is only done once so the performance hit wouldn't be a major concern. This hit would also probably not be at startup when performance might be more of a concern but later when clipboard access would be in use. >> >> I may not be correct in my understanding here but I would think that any application run with the jdk would not correctly locate this file and then would not correctly handle cut and paste? I'd think jdk using applications like ide's might be impacted? >> My understanding might be wrong because my use is actually running from the jre with temporary OS X access to the jdk with? >> >> static { >> if (javaHome == null) { >> javaHome = rtexec(System.out,new String[] {"/usr/libexec/java_home","-v","1.7"}).trim(); >> if (javaHome.equals("-")) javaHome = null; >> else { >> System.setProperty("java.home",javaHome); >> } >> } >> } >> >> I could run the app jdk embedded to see if the problem is always there for the jdk runtime but have not. >> >> I just wondered what problems there might be in determining the path based off of current runtime instead of trying to place it relative to java.home? >> >> Michael Hall >> >> trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz >> >> HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe >> >> AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter >> From jcpalmer at rochester.rr.com Sat Dec 15 14:08:57 2012 From: jcpalmer at rochester.rr.com (Jeff Palmer) Date: Sat, 15 Dec 2012 17:08:57 -0500 Subject: rt.jar put on a Proguard diet losses 26 MB Message-ID: <2558A584-BDFC-4872-81A2-A67702DB1C39@rochester.rr.com> I just did a production JWS implementation, and am now just doing a little alternative exploration for the future. I did a series experiments. One which actually worked, had a really big impact. On windows, I ran this build.xml file with proguard 4.8 against the latest jre, release 10: see effects of proguard on rt.jar -injars ${java-lib}/original-rt.jar -outjars new-rt.jar -verbose -dontoptimize -dontshrink -dontobfuscate -ignorewarnings -target 7 -renamesourcefileattribute Line -keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod rt.jar went from 50,469 KB to 24,207 KB. That's a 52% reduction! Copied new-rt.jar over rt.jar in java-lib, and my apps still work. Anyone know why rt.jar is so big? Alignment or compression level maybe? I looked at both jars using this jd-gui.exe program I got from somewhere, and my spot checks show identical decompiled source. If this process was run for each library jar needed, then either the mac or windows jre embedding would be a lot smaller. I made a copy of rt.jar to original-rt.jar before I started, but that was just because I was experimenting. I still have a strong need for coordinated server-desktop-android updates, and having applications that are not self-updateable are crap. If there is not something which ruins this, I could refactor an internal process for a SSL android stub - impl setup to work for desktop too. The stub application brings down new implementation code at launch if needed,. Are there any known downsides to doing whatever I did to library jars? If not, maybe Oracle should think about just doing "this" to their distributions to begin with, unless they get bandwidth for free. Thanks, Jeff Palmer WhatIf Squared LLC From Alan.Bateman at oracle.com Sat Dec 15 14:22:52 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Sat, 15 Dec 2012 22:22:52 +0000 Subject: rt.jar put on a Proguard diet losses 26 MB In-Reply-To: <2558A584-BDFC-4872-81A2-A67702DB1C39@rochester.rr.com> References: <2558A584-BDFC-4872-81A2-A67702DB1C39@rochester.rr.com> Message-ID: <50CCF83C.7060408@oracle.com> On 15/12/2012 22:08, Jeff Palmer wrote: > : > > > rt.jar went from 50,469 KB to 24,207 KB. That's a 52% reduction! Copied new-rt.jar over rt.jar in java-lib, and my apps still work. Anyone know why rt.jar is so big? Alignment or compression level maybe? rt.jar is not compressed by default. -Alan. From mik3hall at gmail.com Sat Dec 15 19:16:45 2012 From: mik3hall at gmail.com (Michael Hall) Date: Sat, 15 Dec 2012 21:16:45 -0600 Subject: rt.jar put on a Proguard diet losses 26 MB In-Reply-To: <2558A584-BDFC-4872-81A2-A67702DB1C39@rochester.rr.com> References: <2558A584-BDFC-4872-81A2-A67702DB1C39@rochester.rr.com> Message-ID: On Dec 15, 2012, at 4:08 PM, Jeff Palmer wrote: > rt.jar went from 50,469 KB to 24,207 KB The following would probably tell you if ProGuard is compressing on you despite the settings > -dontshrink > -dontobfuscate If it doesn't compress and doesn't obfuscate I don't see how the decrease is possible. import java.io.IOException; import java.util.Date; import java.util.Enumeration; import java.util.jar.JarEntry; import java.util.jar.JarFile; public class JarList { public static void main(String[] args) throws IOException { int count = -1; JarFile jf = new JarFile(args[0]); if (args.length > 1) count = new Integer(args[1]).intValue(); Enumeration e = jf.entries(); int curr = 0; while (e.hasMoreElements()) { if (count != -1) { if (curr > count) break; curr++; } JarEntry je = (JarEntry) e.nextElement(); String name = je.getName(); Date lastModified = new Date(je.getTime()); long uncompressedSize = je.getSize(); long compressedSize = je.getCompressedSize(); System.out.println("(" + uncompressedSize + "/" + compressedSize + ")\t" + lastModified + "\t" + name); } } } getting for example? java JarList /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/lib/rt.jar 10 (0/0) Wed Nov 28 08:06:30 CST 2012 META-INF/ (2332/2332) Wed Nov 28 08:06:30 CST 2012 META-INF/MANIFEST.MF (199/199) Wed Nov 28 08:00:00 CST 2012 WrapperGenerator$1.class (7717/7717) Wed Nov 28 08:00:00 CST 2012 WrapperGenerator$AtomicType.class (651/651) Wed Nov 28 08:00:00 CST 2012 WrapperGenerator$BaseType.class (1695/1695) Wed Nov 28 08:00:00 CST 2012 WrapperGenerator$FunctionType.class (3371/3371) Wed Nov 28 08:00:00 CST 2012 WrapperGenerator$StructType.class (22150/22150) Wed Nov 28 08:00:00 CST 2012 WrapperGenerator.class (6406/6406) Wed Nov 28 08:02:28 CST 2012 apple/applescript/AppleScriptEngine.class (898/898) Wed Nov 28 08:02:28 CST 2012 apple/applescript/AppleScriptEngineFactory$1.class (3495/3495) Wed Nov 28 08:02:28 CST 2012 apple/applescript/AppleScriptEngineFactory.class Mine isn't compressed and isn't showing name obfuscation, which if you were real clever might get you what amounted to compression by just shortening the names as part of the obfuscation. I've never used ProGuard but from what I've seen of zip files I don't know of any other fat you could trim for that kind of savings. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter From jcpalmer at rochester.rr.com Sun Dec 16 14:16:51 2012 From: jcpalmer at rochester.rr.com (Jeff Palmer) Date: Sun, 16 Dec 2012 17:16:51 -0500 Subject: rt.jar put on a Proguard diet losses 26 MB In-Reply-To: <50CCF83C.7060408@oracle.com> References: <2558A584-BDFC-4872-81A2-A67702DB1C39@rochester.rr.com> <50CCF83C.7060408@oracle.com> Message-ID: <66D9E7C1-50EC-45EA-B046-E87A78DA0C43@rochester.rr.com> On Dec 15, 2012, at 5:22 PM, Alan Bateman wrote: > On 15/12/2012 22:08, Jeff Palmer wrote: >> : >> >> >> rt.jar went from 50,469 KB to 24,207 KB. That's a 52% reduction! Copied new-rt.jar over rt.jar in java-lib, and my apps still work. Anyone know why rt.jar is so big? Alignment or compression level maybe? > rt.jar is not compressed by default. > > -Alan. Thanks, excellent! This does mean I need to switch tools from Proguard to just Ant. Proguard is good for shrink wrapping an application, but if I wish to build a stub application with embedded Java and application level libraries, it is a little too suffocating. Plus, licensing issues seem un-avoidable. If in Ant, you unjar rt. jar into a temp directory, you can then carve it like a turkey & jar it back. In the build.xml below, I got the un-compressed size to 24,383 KB, which goes down to 12,382 KB at compression level 9. The application did seem a little sluggish to start. Maybe just stick with no compression, then rely on whatever rt. jar is delivered inside of (dmg ?) to do the compression. After delivered, unpacked where space is unlimited with faster media. You can easily get diminishing returns if you delete some tiny thing, then decide to reference in later in an update to the implementation jar. Everyone may have different needs, so this exact recipe might be wrong for some. If you are not using SQL, then there is a bunch of stuff not listed here to get rid of. The more I think about this hybrid fixed jre install with just in time impl.jar, the more I like it. Java Webstart is too complicated, fragile, & dependent on an installed jre. Too bad release 10 on Mac is still not really good enough yet. I'll just put this on ice till a good one comes along, and use JWS till then. Michael Hall - PKZIP files can have 9 level of compression, or none. If Oracle builds the library jars with no compression, then my earlier experiment which does not look like it should do anything just compressed the output at whatever level Proguard uses. Jeff Palmer WhatIf Squared LLC - - - - - - - - - - - - - - - - - - - - - - Dis-assemble and repackage rt.jar for embedded stub application From mik3hall at gmail.com Sun Dec 16 14:52:58 2012 From: mik3hall at gmail.com (Michael Hall) Date: Sun, 16 Dec 2012 16:52:58 -0600 Subject: rt.jar put on a Proguard diet losses 26 MB In-Reply-To: <66D9E7C1-50EC-45EA-B046-E87A78DA0C43@rochester.rr.com> References: <2558A584-BDFC-4872-81A2-A67702DB1C39@rochester.rr.com> <50CCF83C.7060408@oracle.com> <66D9E7C1-50EC-45EA-B046-E87A78DA0C43@rochester.rr.com> Message-ID: On Dec 16, 2012, at 4:16 PM, Jeff Palmer wrote: > Michael Hall - PKZIP files can have 9 level of compression, or none. If Oracle builds the library jars with no compression, then my earlier experiment which does not look like it should do anything just compressed the output at whatever level Proguard uses. What I sent showed uncompressed and compressed zip entry sizes so you should be able to run it against the post-ProGuard jar and see if theres any difference. It sounds like your space savings is from removing contents? Thats what the Jigsaw project is all about isn't it? Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter From jcpalmer at rochester.rr.com Sun Dec 16 15:33:33 2012 From: jcpalmer at rochester.rr.com (Jeff Palmer) Date: Sun, 16 Dec 2012 18:33:33 -0500 Subject: rt.jar put on a Proguard diet losses 26 MB In-Reply-To: References: Message-ID: <1D199FE9-D615-4FA1-92E8-AB887AD8BB46@rochester.rr.com> Michael, Sorry, I did not fully read your reply. Knowing that Oracle does not compress from Alan was all I needed, cause I know Proguard compresses, just not to what level. As far as what you said: > Mine isn't compressed and isn't showing name obfuscation, which if you were real clever might get you what amounted to compression by just shortening the names as part of the obfuscation. Shrink wrapping rt. jar right into the app would be incredibly small, but find all the dynamic reflection calls & making sure those class name do not change get changed would be difficult. Avian seems to say they are doing it though. This is worthless for Java Webstart replacement purposes though. You could also get a similar effect, but write it out as separate jars, one for your app & rt. jar. Both of these would not allow the user of your application to replace the library & have it still work. Licensing issue if someone wants to make a scene. You can use settings documented for processing libraries though. I tried them and got a 4000 KB reduction. What happened was all the big private variables names were shrunk down to a single letter. If did not work though, a couple of class names in the invoke package still got obfuscated. It was fatal. FYI, The biggest bang for the buck is repackaging everything down so a single char package like '_'. The package path is bigger than the class names so shrink is very large, & for obfuscation purposes it is a complete incomprehensible mess. Jeff Palmer WhatIf Squared LLC From mik3hall at gmail.com Sun Dec 16 16:09:42 2012 From: mik3hall at gmail.com (Michael Hall) Date: Sun, 16 Dec 2012 18:09:42 -0600 Subject: rt.jar put on a Proguard diet losses 26 MB In-Reply-To: <1D199FE9-D615-4FA1-92E8-AB887AD8BB46@rochester.rr.com> References: <1D199FE9-D615-4FA1-92E8-AB887AD8BB46@rochester.rr.com> Message-ID: <8EFB6996-8E94-49C8-896F-565C7679B71E@gmail.com> On Dec 16, 2012, at 5:33 PM, Jeff Palmer wrote: > > > You could also get a similar effect, but write it out as separate jars, one for your app & rt. jar. Both of these would not allow the user of your application to replace the library & have it still work. Licensing issue if someone wants to make a scene. JWS on OS X is supposed to use the Internet Plugin 'shared' JRE as far as I know with no options for embedding or pointing to your own. I'm not sure what shortcuts do. If they create a more or less standalone application bundle you could maybe embed your own JRE there. But I'm just not sure this would work real easily the way JWS is set up on OS X. > > FYI, The biggest bang for the buck is repackaging everything down so a single char package like '_'. The package path is bigger than the class names so shrink is very large, & for obfuscation purposes it is a complete incomprehensible mess. Yeah, this was what I was thinking you might be able to do for full class file names if you were clever. Have some sort of dictionary for the package part that would have a short key where you could look up the full package path when needed. But only need to have the full package path once. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter > > Jeff Palmer > WhatIf Squared LLC From Kustaa.Nyholm at planmeca.com Sun Dec 16 20:34:59 2012 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Mon, 17 Dec 2012 06:34:59 +0200 Subject: rt.jar put on a Proguard diet losses 26 MB In-Reply-To: <8EFB6996-8E94-49C8-896F-565C7679B71E@gmail.com> Message-ID: On 17.12.2012 2.09, "Michael Hall" wrote: >On Dec 16, 2012, at 5:33 PM, Jeff Palmer wrote: >> Both of these would not allow the user of your application to replace >>the library >> & have it still work. Licensing issue if someone wants to make a scene. Just a small aside, if above refers to LGPL license, IANAL but, I think that to satisfy the library replacement requirement in the license, it is enough to offer the application in an 'unlinked' form *in addition to*, say, the kind you described above. br Kusti From paul_t100 at fastmail.fm Mon Dec 17 02:46:53 2012 From: paul_t100 at fastmail.fm (Paul Taylor) Date: Mon, 17 Dec 2012 10:46:53 +0000 Subject: Where has brushed metal effect gone in final release of 1.7.0_10 of jdk? Message-ID: <50CEF81D.5030801@fastmail.fm> Hi, I was building my application against 1.7.0_10-ea 23.6-b03 and using AppBundler with