BT

Java 8 Starting to Find Its Way into .Net/Mono

by Jonathan Allen on Mar 19, 2013 |

In last week’s development snapshot, IKVM added experimental support for static methods in interfaces and default interfaces methods. These Java 8 features are primarily to support the internal workings of Java libraries. Jeroen Frijters isn’t expecting to have a good interopt story when it comes to mixing these features with other .NET languages.

Static methods in interfaces are just what they sound like, fully implemented static methods stored within an interface’s namespace instead of a class. They were proposed as part of Project Coin.

Default interfaces methods allow Java developers to treat abstract interfaces as if they were abstract base classes. The default methods are overridable like other interface methods, but can be added without a causing breaking change to the interface. Unlike extension methods, which are a purely language concept, default interface methods require runtime support.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

IKVM rocks! by peter lin

I've been using it for over 6 years now and it's been a god send in the past.

Methods on interfaces by Reg Whitton

Default interfaces methods allow Java developers to treat abstract interfaces as if they were abstract base classes.


Oh crap.

Re: IKVM rocks! by Mark N

Peter - "it"?

Re: IKVM rocks! by peter lin

it meaning IKVM. I've used it to use java's concurrent collections before .Net released 4.0. I've also used it to run various Java stuff in .Net.

Re: IKVM rocks! by Faisal Waris

indeed IKVM is very impressive even mind blowing that you can take very complex java code and run it as-is in .Net. A few years ago I used the Stanford NLP parser, which is written in Java, as part of .Net code, without issue.

Re: IKVM rocks! by Mark N

Thx. Cool. Just wanted to make sure. :)

Re: IKVM rocks! by peter lin

I've even used IKVM to port Hector to .Net. Most of the .Net cassandra drivers aren't mature, so IKVM came to the rescue! You can run some very complex Java applications in IKVM.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

7 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT