From behrangsa at gmail.com Fri Jun 14 01:26:37 2013 From: behrangsa at gmail.com (Behrang Saeedzadeh) Date: Fri, 14 Jun 2013 11:26:37 +1000 Subject: Dynamic (i.e responding to methodNotFound) classes in Java Message-ID: Hi, A couple of years ago I downloaded an experimental build of JDK with invokedynamic support and it contained a class (DynamicObject?) that any method could be invoked on its subclasses without any compile time errors. Does this class still exist? I can't find it anymore in the API docs. Cheers, Behrang Saeedzadeh http://www.behrang.org From john.r.rose at oracle.com Fri Jun 14 02:05:48 2013 From: john.r.rose at oracle.com (John Rose) Date: Thu, 13 Jun 2013 19:05:48 -0700 Subject: Dynamic (i.e responding to methodNotFound) classes in Java In-Reply-To: References: Message-ID: On Jun 13, 2013, at 6:26 PM, Behrang Saeedzadeh wrote: > Hi, > > A couple of years ago I downloaded an experimental build of JDK with > invokedynamic support and it contained a class (DynamicObject?) that any > method could be invoked on its subclasses without any compile time errors. > > Does this class still exist? I can't find it anymore in the API docs. No. There were partial prototypes in this direction as part of JSR 292, but they were abandoned in 2009. Here is a proposal from that time frame: https://wiki.openjdk.java.net/display/mlvm/DynamicJava Nothing like this exists or was built in any usable way. Untyped or "duck typed" invocation of objects can be done easily enough with third-party libraries, or with reflection, or using a dynamic language like JavaScript or JRuby or ${your_favorite_jvm_language}. In my opinion, Java the language is unlikely to support such a thing in the near future, since there are many reasonable alternatives. ? John From behrangsa at gmail.com Fri Jun 14 04:16:41 2013 From: behrangsa at gmail.com (Behrang Saeedzadeh) Date: Fri, 14 Jun 2013 14:16:41 +1000 Subject: Dynamic (i.e responding to methodNotFound) classes in Java In-Reply-To: References: Message-ID: Thanks for the clarification John. I also believe this was inconsistent with Java's philosophy, but I was just wondering what happened to that stuff. Cheers, Behrang Saeedzadeh http://www.behrang.org On Fri, Jun 14, 2013 at 12:05 PM, John Rose wrote: > On Jun 13, 2013, at 6:26 PM, Behrang Saeedzadeh > wrote: > > > Hi, > > > > A couple of years ago I downloaded an experimental build of JDK with > > invokedynamic support and it contained a class (DynamicObject?) that any > > method could be invoked on its subclasses without any compile time > errors. > > > > Does this class still exist? I can't find it anymore in the API docs. > > No. There were partial prototypes in this direction as part of JSR 292, > but they were abandoned in 2009. Here is a proposal from that time frame: > https://wiki.openjdk.java.net/display/mlvm/DynamicJava > > Nothing like this exists or was built in any usable way. > > Untyped or "duck typed" invocation of objects can be done easily enough > with third-party libraries, or with reflection, or using a dynamic language > like JavaScript or JRuby or ${your_favorite_jvm_language}. > > In my opinion, Java the language is unlikely to support such a thing in > the near future, since there are many reasonable alternatives. > > ? John From curoli at gmail.com Fri Jun 14 10:17:09 2013 From: curoli at gmail.com (Oliver Ruebenacker) Date: Fri, 14 Jun 2013 06:17:09 -0400 Subject: Dynamic (i.e responding to methodNotFound) classes in Java In-Reply-To: References: Message-ID: Hello, On Thu, Jun 13, 2013 at 10:05 PM, John Rose wrote: > > Untyped or "duck typed" invocation of objects can be done easily enough > with third-party libraries, or with reflection, or using a dynamic language > like JavaScript or JRuby or ${your_favorite_jvm_language}. > Can JavaScript be compiled to Java bytecode? Take care Oliver -- Head of Systems Biology Task Force at PanGenX (http://www.pangenx.com) Any sufficiently advanced technology is indistinguishable from magic. From forax at univ-mlv.fr Fri Jun 14 10:31:59 2013 From: forax at univ-mlv.fr (Remi Forax) Date: Fri, 14 Jun 2013 12:31:59 +0200 Subject: Dynamic (i.e responding to methodNotFound) classes in Java In-Reply-To: References: Message-ID: <51BAF11F.1000502@univ-mlv.fr> On 06/14/2013 12:17 PM, Oliver Ruebenacker wrote: > Hello, > > On Thu, Jun 13, 2013 at 10:05 PM, John Rose wrote: > >> Untyped or "duck typed" invocation of objects can be done easily enough >> with third-party libraries, or with reflection, or using a dynamic language >> like JavaScript or JRuby or ${your_favorite_jvm_language}. >> > Can JavaScript be compiled to Java bytecode? yes, take a look to OpenJDK project named Nashorn. > > Take care > Oliver > R?mi From frans at meruvian.org Sat Jun 15 06:00:50 2013 From: frans at meruvian.org (Frans Thamura) Date: Sat, 15 Jun 2013 13:00:50 +0700 Subject: OpenJDK and Android Studio Message-ID: An interesting news in I/O is Android Studio, run on JetBrain's platform. I try to run in Ubuntu, and got this message. and will jetbrain lead the graphics in OpenJDK backed by Google ? OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-0ubuntu1~12.04.1) OpenJDK Server VM (build 20.0-b12, mixed mode) WARNING: You are launching the IDE using OpenJDK Java runtime. ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES! SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS! NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed please validate either STUDIO_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation. See http://ow.ly/6TuKQ for more info on switching default JDK. Press Enter to continue. From martijnverburg at gmail.com Sat Jun 15 08:01:55 2013 From: martijnverburg at gmail.com (Martijn Verburg) Date: Sat, 15 Jun 2013 09:01:55 +0100 Subject: [jug-leaders] OpenJDK and Android Studio In-Reply-To: References: Message-ID: Hi Frans, I believe this warning by Jetbrains is now no longer warranted. In particular, the latest version of OpenJDK 7 has no major performance issues (that I'm aware of) as compared to the Oracle binary. Cheers, Martijn On 15 June 2013 07:00, Frans Thamura wrote: > An interesting news in I/O is Android Studio, run on JetBrain's platform. > > I try to run in Ubuntu, and got this message. and will jetbrain lead > the graphics in OpenJDK backed by Google ? > > > OpenJDK Runtime Environment (IcedTea6 1.12.3) > (6b27-1.12.3-0ubuntu1~12.04.1) > OpenJDK Server VM (build 20.0-b12, mixed mode) > WARNING: You are launching the IDE using OpenJDK Java runtime. > > ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES! > SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS! > > NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed > please validate either STUDIO_JDK, JDK_HOME, or JAVA_HOME > environment variable points to valid Oracle (Sun) JDK installation. > See http://ow.ly/6TuKQ for more info on switching default JDK. > > Press Enter to continue. > From neugens.limasoftware at gmail.com Sat Jun 15 08:08:26 2013 From: neugens.limasoftware at gmail.com (Mario Torre) Date: Sat, 15 Jun 2013 10:08:26 +0200 Subject: OpenJDK and Android Studio In-Reply-To: References: Message-ID: Did they ever say what exactly those problems are? Would be nice to have at least a bug report from them rather than just scaring messages. I think this is probably a good reason to use a different IDE though. Mario Il giorno 15/giu/2013 08:10, "Frans Thamura" ha scritto: > An interesting news in I/O is Android Studio, run on JetBrain's platform. > > I try to run in Ubuntu, and got this message. and will jetbrain lead > the graphics in OpenJDK backed by Google ? > > > OpenJDK Runtime Environment (IcedTea6 1.12.3) > (6b27-1.12.3-0ubuntu1~12.04.1) > OpenJDK Server VM (build 20.0-b12, mixed mode) > WARNING: You are launching the IDE using OpenJDK Java runtime. > > ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES! > SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS! > > NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed > please validate either STUDIO_JDK, JDK_HOME, or JAVA_HOME > environment variable points to valid Oracle (Sun) JDK installation. > See http://ow.ly/6TuKQ for more info on switching default JDK. > > Press Enter to continue. > From lists at selckin.be Mon Jun 17 07:55:37 2013 From: lists at selckin.be (Thomas Matthijs) Date: Mon, 17 Jun 2013 09:55:37 +0200 Subject: OpenJDK and Android Studio In-Reply-To: References: Message-ID: On Sat, Jun 15, 2013 at 8:00 AM, Frans Thamura wrote: > An interesting news in I/O is Android Studio, run on JetBrain's platform. > > I try to run in Ubuntu, and got this message. and will jetbrain lead > the graphics in OpenJDK backed by Google ? > > > OpenJDK Runtime Environment (IcedTea6 1.12.3) > (6b27-1.12.3-0ubuntu1~12.04.1) > OpenJDK Server VM (build 20.0-b12, mixed mode) > WARNING: You are launching the IDE using OpenJDK Java runtime. > > ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES! > SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS! > > NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed > please validate either STUDIO_JDK, JDK_HOME, or JAVA_HOME > environment variable points to valid Oracle (Sun) JDK installation. > See http://ow.ly/6TuKQ for more info on switching default JDK. > > Press Enter to continue. > openjdk 6 has many blocking issues/problems, i don't think you'll find many people that recommend using it in production environments. Using openjdk 7+ should be mostly fine From alex.buckley at oracle.com Mon Jun 17 17:39:30 2013 From: alex.buckley at oracle.com (Alex Buckley) Date: Mon, 17 Jun 2013 10:39:30 -0700 Subject: Dynamic (i.e responding to methodNotFound) classes in Java In-Reply-To: References: Message-ID: <51BF49D2.1030508@oracle.com> While dynamic typing and dynamic method invocation did not make it into the Java language in SE 7, the concept of signature polymorphic methods did [1]. This allows a plain old virtual method invocation in the Java language to effect invocation of a dynamically typed method, via the java.lang.invoke.MethodHandle API and an upgraded invokevirtual instruction [2]. Alex [1] http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.3 [2] http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#jvms-6.5.invokevirtual On 6/13/2013 9:16 PM, Behrang Saeedzadeh wrote: > Thanks for the clarification John. I also believe this was inconsistent > with Java's philosophy, but I was just wondering what happened to that > stuff. > > Cheers, > Behrang Saeedzadeh > http://www.behrang.org > > > On Fri, Jun 14, 2013 at 12:05 PM, John Rose wrote: > >> On Jun 13, 2013, at 6:26 PM, Behrang Saeedzadeh >> wrote: >> >>> Hi, >>> >>> A couple of years ago I downloaded an experimental build of JDK with >>> invokedynamic support and it contained a class (DynamicObject?) that any >>> method could be invoked on its subclasses without any compile time >> errors. >>> >>> Does this class still exist? I can't find it anymore in the API docs. >> >> No. There were partial prototypes in this direction as part of JSR 292, >> but they were abandoned in 2009. Here is a proposal from that time frame: >> https://wiki.openjdk.java.net/display/mlvm/DynamicJava >> >> Nothing like this exists or was built in any usable way. >> >> Untyped or "duck typed" invocation of objects can be done easily enough >> with third-party libraries, or with reflection, or using a dynamic language >> like JavaScript or JRuby or ${your_favorite_jvm_language}. >> >> In my opinion, Java the language is unlikely to support such a thing in >> the near future, since there are many reasonable alternatives. >> >> ? John From adomurad at redhat.com Fri Jun 21 18:25:13 2013 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 21 Jun 2013 18:25:13 +0000 (UTC) Subject: Oracle's examples do not work with icedtea-web References: <511AAC93.3090509@oracle.com> Message-ID: Donald Smith writes: > > Good catch. I've sent this to the tutorials pages contact. Hi, any word on this ? Recently, we added a tagsoup based parser to attempt to handle invalid XML in icedtea-web: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a236aa5f729b Unfortunately, some of the examples here continue to not work. I think it would be nice to update these examples to be valid XML, it would save us the trouble of trying to parse yet more invalid XML. Thanks & happy hacking, -Adam From donald.smith at oracle.com Fri Jun 21 18:38:27 2013 From: donald.smith at oracle.com (Donald Smith) Date: Fri, 21 Jun 2013 14:38:27 -0400 Subject: Oracle's examples do not work with icedtea-web In-Reply-To: References: <511AAC93.3090509@oracle.com> Message-ID: <51C49DA3.7080306@oracle.com> Hm, odd - I just pinged the team again. I did get an ACK, so I thought it was done already -- sorry about that. - Don On 21/06/2013 2:25 PM, Adam Domurad wrote: > Donald Smith writes: > >> Good catch. I've sent this to the tutorials pages contact. > Hi, any word on this ? > > Recently, we added a tagsoup based parser to attempt to handle invalid XML > in icedtea-web: > http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a236aa5f729b > > Unfortunately, some of the examples here continue to not work. > I think it would be nice to update these examples to be valid XML, > it would save us the trouble of trying to parse yet more invalid XML. > > Thanks & happy hacking, > -Adam > > From adomurad at redhat.com Fri Jun 21 19:06:55 2013 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 21 Jun 2013 15:06:55 -0400 Subject: Oracle's examples do not work with icedtea-web In-Reply-To: <51C49DA3.7080306@oracle.com> References: <511AAC93.3090509@oracle.com> <51C49DA3.7080306@oracle.com> Message-ID: <51C4A44F.6020407@redhat.com> On 06/21/2013 02:38 PM, Donald Smith wrote: > Hm, odd - I just pinged the team again. I did get an ACK, so I thought > it was done already -- sorry about that. > > - Don > > > On 21/06/2013 2:25 PM, Adam Domurad wrote: >> Donald Smith writes: >> >>> Good catch. I've sent this to the tutorials pages contact. >> Hi, any word on this ? >> >> Recently, we added a tagsoup based parser to attempt to handle invalid >> XML >> in icedtea-web: >> http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a236aa5f729b >> >> >> Unfortunately, some of the examples here continue to not work. >> I think it would be nice to update these examples to be valid XML, >> it would save us the trouble of trying to parse yet more invalid XML. >> >> Thanks & happy hacking, >> -Adam >> >> > Apologies, I had checked not too long ago and they were still not working. They seem to be working now -- thank you! Happy hacking, -Adam From donald.smith at oracle.com Fri Jun 21 19:13:34 2013 From: donald.smith at oracle.com (Donald Smith) Date: Fri, 21 Jun 2013 15:13:34 -0400 Subject: Oracle's examples do not work with icedtea-web In-Reply-To: <51C4A44F.6020407@redhat.com> References: <511AAC93.3090509@oracle.com> <51C49DA3.7080306@oracle.com> <51C4A44F.6020407@redhat.com> Message-ID: <51C4A5DE.7030608@oracle.com> Ok, it was either pushed with 7u25 content update, or maybe just a caching hiccup. Glad it's working! - Don On 21/06/2013 3:06 PM, Adam Domurad wrote: > On 06/21/2013 02:38 PM, Donald Smith wrote: >> Hm, odd - I just pinged the team again. I did get an ACK, so I thought >> it was done already -- sorry about that. >> >> - Don >> >> >> On 21/06/2013 2:25 PM, Adam Domurad wrote: >>> Donald Smith writes: >>> >>>> Good catch. I've sent this to the tutorials pages contact. >>> Hi, any word on this ? >>> >>> Recently, we added a tagsoup based parser to attempt to handle invalid >>> XML >>> in icedtea-web: >>> http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a236aa5f729b >>> >>> >>> >>> Unfortunately, some of the examples here continue to not work. >>> I think it would be nice to update these examples to be valid XML, >>> it would save us the trouble of trying to parse yet more invalid XML. >>> >>> Thanks & happy hacking, >>> -Adam >>> >>> >> > > Apologies, I had checked not too long ago and they were still not > working. They seem to be working now -- thank you! > > Happy hacking, > -Adam From jonathan.gibbons at oracle.com Sat Jun 22 02:24:11 2013 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Fri, 21 Jun 2013 19:24:11 -0700 Subject: New Code Tools repo: friday-stats Message-ID: <51C50ACB.7070701@oracle.com> I am pleased to announce that we have opened up a new repo in the Code Tools project to host small utility programs for analyzing OpenJDK. For more details, see http://openjdk.java.net/projects/code-tools/friday-stats/ -- Jon