"…mais ce serait peut-être l'une des plus grandes opportunités manquées de notre époque si le logiciel libre ne libérait rien d'autre que du code…"

Connexion entre composants Java et DotNet: Ikvm, boo, java, .NET, ironpython

Posted by patrick sur décembre 15, 2007

Source: http://ironpython-urls.blogspot.com/2007/11/boo-java-net-and-ironpython.html

————————————————-<————————————

Thursday, November 15, 2007

Boo, Java, .NET and IronPython

A blogger called Tomo wondered about which .NET language to choose Boo (a mighty fine language) or IronPython. He came down in favour of Boo, and an interesting discussion ensued in the comments:

The very next thing he tried was taking the Java class library for SWT (the user interface library) and compiled them into a .NET dll with IKVM. He then used them from Boo and IronPython, which worked!

This is an interesting coincidence, as a few days ago Rodrigo announced on the Boo blog about boojay – a compiler that emits Java bytecode from Boo:

————————————————-8<———————————————

Source: http://blogs.codehaus.org/people/bamboo/archives/001623_introducing_boojay.html
(« A boo application using the SWT java GUI library. Thanks to IKVM that’s not only possible but very simple as well. So what’s the news? Well, Friday morning I was chatting with Klaus and he said to me « if you get boo to emit java bytecodes I’ll do all my stuff in boo ». How’s that for a challenge?🙂 Thanks again to IKVM, ObjectWeb ASM and the extensible boo pipeline architecture boojay was born after a weekend of relaxed hacking « )

http://boo-extensions.googlecode.com/svn/trunk/boojay/ (« boojay is an attempt at getting the boo compiler to emit java bytecode. Architecture
Thanks to the amazing IKVM project it is possible to use the great ObjectWeb ASM library from boo running on mono/ms.net to emit native java bytecodes that can be executed by any compliant java virtual machine
« )

http://koans.tomo-online.com/2007/11/15/langage-frenzy/ (« Although I should be doing something else, Boo, IronPython and .NET kept occupying my mind. So I made a small coding experiment. First, I downloaded IKVM. Then – SWT. I compiled SWT jar to a dll. No problems here. Then I wrote a SWT hello world in IronPython. To be honest – I took a Java one from SWT website and rewrote line by line. I was surprised that my hello world ran without a glich! Next, I copied a HelloWorldSWT.py into HelloWorldSWT.boo and changed the import statement. Compiled (”By golly! No problems? No warnings?”) and run. And no problems again?? It started to look suspicious… Java run on .NET, calls from Java to native library, two different languages… and everything without a single warning? So I decided to take it to foreign territory… Ubuntu! I fired up a VMWare image with Ubuntu 6.10 (the linux vm I have handy), downloaded Linux SWT, compiled it to dll, copied HelloWorldSWT.exe from Windows along with some ikvm dlls and… no problems again! I’m really, really surprised how smooth the experiment was. Thumbs up! « )

http://en.wikipedia.org/wiki/IKVM (« IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework. IKVM is free software, distributed under a permissive free software licence. IKVM includes the following components: for

  • A Java Virtual Machine implemented in .NET
  • A .NET implementation of the Java class libraries
  • Tools that enable Java and .NET interoperability

With IKVM you can run compiled Java code (bytecode) directly on Microsoft .NET or Mono. The bytecode is converted on the fly to CIL and executed. Jeroen Frijters is the main contributor to IKVM.NET. He is Technical Director of Sumatra Software, based in The Netherlands. As of June 2007, the machine supports Java 1.6 with the exception of AWT and Swing. IKVM uses OpenJDK as its class library. »)

http://www.ikvm.net/ (« ..The following projects are related to IKVM.NET in some way:

http://www.eclipse.org/swt/ (« SWT is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.« )

http://www.gnu.org/software/classpath/classpath.html (« GNU Classpath, Essential Libraries for Java, is a GNU project to create free core class libraries for use with virtual machines and compilers for the java programming language. Classpath is still a work in progress. The first public release will be version 1.0. There have been no public releases; however, pre-release source code is available via GNU’s anonymous CVS server , and snapshots of the Classpath tree have been released and are available from ftp://ftp.gnu.org/gnu/classpath/« )

http://en.wikipedia.org/wiki/GNU_Classpath (« GNU Classpath is a project aiming to create a free software implementation of the standard class libraryJava programming language. Despite the massive size of the library to be created, the majority of the task is already done, including Swing, CORBA, and other major parts. The Classpath developers have implemented almost all of the classes from J2SE 1.4 and 5.0. Classpath can thus be used to run popular Java-based software such as Azureus and Eclipse. It is a part of the Free Software Foundation‘s GNU project and was launched so that computer users could use Java programs without giving up the freedoms which the free software movement works to secure. GNU Classpath was originally developed in parallel with libgcj due to license incompatibilities, but later merged...Since version 0.95, Java 1.5 additions like generics have been fully integrated into the main branch. The branch allows GCJ to use Eclipse compiler, ecj, to compile Java 1.5 source code to bytecode, which is then changed into native code by GCJ itself« )

http://en.wikipedia.org/wiki/Boo_programming_language (« Boo is an object oriented, statically typed programming language developed starting in 2003, which seeks to make use of the Common Language Infrastructure support for Unicode, internationalization and web style applications, while using a Python-inspired syntax and a special focus on language and compiler extensibility. Some features of note include type inference, generators, multimethods, optional duck typing, macros, true closures, currying, and first class functions. Boo is open sourcelicensed under an MIT/BSD style license.Boo can be used with Microsoft .NET or Mono. »)

https://pvergain.wordpress.com/2007/08/17/grasshopper-faire-tourner-des-applications-aspnet-sur-des-serveurs-j2ee/
(« Grasshopper 2.0 enables you to produce .NET Web and server applications that run on Linux & other Java-enabled platforms using ASP.NET 2.0 controls, role-based security, and C# generics. Check out our developer blogs, interop forums, code samples, and how-to articles to learn how« )

– http://blog.mainsoft.com/blog/net-java-interop-8-links-to-get-you-started/(« 

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s

 
%d blogueurs aiment cette page :