Well this is possible - see example here.
It seems this have very good potential in current Web 2.0 wave.
Here is some info from their home page:
Interested?! See Build AJAX and JavaME apps in the c# 3.0 language @ Sourceforge
» What is jsc?
jsc is a decompiler or
a cross compiler if you will.
It is not a source-code parser nor an IDE.
It is a command line utility like any other compiler.
» How does it work?
the ScriptAttribute. It selects the target language and emits the source.
Each assembly defines which namespaces will be filtered in. Each class in these namespaces mustScriptAttribute, to be opt-in for jsc compilation.
Therefore, previously built assamblies will not define be processed.
» What is the current status?
Currently, the jsc project is
unsupported and experimental
, but free to use :)
If any of you manage to create something others would like to see with this, be it
java games or ajax apps, post a comment on the blog.
» Who would like to use it?
- java developers
- asp.net developers
» What are the limitations? (Will be adressed when the Orcas reaches beta)
- operator ?? is not supported.
- lock is not supported.
- yield is not supported.
- switch is not supported.
- goto is not supported.
- return within try catch finally is not supported.
- try handler filter is not supported.
- ref out is not supported.