Discussions

News: Opinion: All I want from Java and .NET

  1. Opinion: All I want from Java and .NET (25 messages)

    There have been many articles, and blog entries written about the Sun-Microsoft settlement. This is fair, as it is a huge topic. Cedric skipped the legal, and got right to the technology when he discussed what HE wants out of Java on the Windows platform.
    The Sun-Microsoft settlement seems to mean a lot of different things to a lot of different people, but I realize that my needs are very simple: I want to be able to write Java code for the .Net platform.

    I don't mean writing Java on a Windows platform (I do that every day and it's working very well), but being able to access the native Win32/.Net API's from Java. Right now, if I want to write an add-in for Outlook, I need to switch to C#. Not a huge deal in itself, and it's actually a fairly pleasant experience, but I was promised "Java everywhere" and I'm still waiting.
    I think there are a lot of people that feel the same way. I know of a few projects that migrated to something like Python just because they could use the wx* modules. What are your thoughts?

    Read Cedric Beust in Java and .Net

    Threaded Messages (25)

  2. now, if I want to write an add-in for Outlook, I need to switch to C#."
    J# can do the job. Not Java, but close enough.
  3. my thoughts the same...[ Go to top ]

    I really really want to be able to write an Outlook / Excel / MS project / Access plugin in java to be more valuable to my company.

    As a Developer. there are two ways I contrbute to my company
    1. Primary task : Writing and building applications. the environment is mainly java
    2. Secondary task : doing small small improvements in process (mainly automation) . the environment is mainly MS Project / Excel / outlook. examples improvements in reporting / budgeting process etc.

    Every time I want to do activities in task 2. I run into issues:
    1. Learning curve : C# , whatever
    2. Licensing. No Open source community in MS world to get your hands wet.
  4. my thoughts the same...[ Go to top ]

    "2. Licensing. No Open source community in MS world to get your hands wet. "
    You actually might be surprised how much opensource is going on in MS technology since .Net is around. A lot of ports have been done from Java OS libs (Nant, Nunit, CC.Net, log4net ...) and lots of communities (like gotdotnet, codehaus...) bring up new OS libs quite frequently. For a java developer who has worked with Java and those OS libraries, it is fairly simple and easy to pick up C# and the .Net counterparts of those libs.

    As for the article itself, I cannot agree more: Writing a addin for Outlook in Java would be rad.
  5. There are available now that support close Java-.NET integration. JNBridgePro (www.jnbridge.com) is one such product.
  6. You have a few options[ Go to top ]

    1) Use J++: accessing native Win32/COM libraries is exactly the parts of the Java API the language extended. Of course you are stuck with JDK 1.1.4 (plus JDK 1.2 Collections). However, this will only allow you to access COM-exposed .NET APIs via COM Interop.

    2) Use Remoting Interop: a few options here, but they are nicely laid out in Simon Guest's J2EE Interoperability Toolkit (http://www.simonguest.com) or the Application Integration: J2EE and .NET Patterns and Practice Guide available from MSFT (http://www.microsoft.com/resources/practice).

    Personally, I think it would be nice to see wire-level interop between Java RMI and .NET Remoting without having to go the XML Web Service route or a proprietary implementation.
  7. P&P[ Go to top ]

    I goofed my link: http://www.microsoft.com/resources/practices/
  8. Java and .Net[ Go to top ]

    I know there are a few possibilities (Mono+ikvm, etc...) but I think the only realistic way to solve this problem is to revive J++, but without the extra keywords and bytecode.

    In short, I want a modern Java compiler (at least 1.4, ideally 1.5) and one of the following:

    - Native wrappers around .Net and Win32 API so I can access them directly from Java (or tools to generate these wrappers)
    - A Java compiler that generates IL and .Net assemblies

    --
    Cedric
  9. Canvas[ Go to top ]

    Hi Cedrik,

    Cedrik: A Java compiler that generates IL and .Net assemblies

    That would be incredible useful. Everything ever written for Java directly usable from .NET!

    BTW I have converted your Canvas application to C#. Do you want it? :)

    Regards
    Rolf Tollerud
  10. Canvas[ Go to top ]

    Hi Cedrik,Cedrik: A Java compiler that generates IL and .Net assembliesThat would be incredible useful. Everything ever written for Java directly usable from .NET!BTW I have converted your Canvas application to C#. Do you want it? :)RegardsRolf Tollerud
    So is that shared source or open source? (evil grin)
  11. Canvas[ Go to top ]

    Hi Cedrik,Cedrik: A Java compiler that generates IL and .Net assembliesThat would be incredible useful. Everything ever written for Java directly usable from .NET!BTW I have converted your Canvas application to C#. Do you want it? :)RegardsRolf Tollerud
    Microsoft distributes this kind of tool, does not it ?
  12. Canvas[ Go to top ]

    Juozas: Microsoft distributes this kind of tool, does not it?

    Do you mean the Java Conversion Assistant? Come on, it was easy but not that easy. Remember you can not use Groovy from C#!
  13. Canvas[ Go to top ]

    Juozas: Microsoft distributes this kind of tool, does not it?Do you mean the Java Conversion Assistant? Come on, it was easy but not that easy. Remember you can not use Groovy from C#!
    There are a lot of languages for .NET and they are better integrated than scripting languages for java, I do not think Jython or Groovy can add more value to .NET than JScript or VBScript.
  14. Canvas[ Go to top ]

    Hi Cedrik,Cedrik:
    My name is Cedric. Just Cedric. And with a final "c".

    <blockqote>
     A Java compiler that generates IL and .Net assembliesThat would be incredible useful. Everything ever written for Java directly usable from .NET!BTW I have converted your Canvas application to C#. Do you want it? :)RegardsRolf TollerudI don't have any use for it right now, but I'm glad to hear this. So the templating language is C# and it's written in C#, correct?

    --
    Cedric
  15. King Solomon's mines[ Go to top ]

    Hi Cedric, (sorry I misspelled your name)

    The scripting languages is JScript.NET

    I put it up at
    http://www11.brinkster.com/monoasp/canvas.net.zip

    I tried first dynamically executing C# code but there was many problems with it the main that once loaded you can not unload the class. So the solution is to use a combination of C# and JScript.NET.

    To program in C# and but learn from Java is a very rewarding position. The Java treasure chest is like King Solomon's mines! :)

    Regards
    Rolf Tollerud
  16. Java and .Net[ Go to top ]

    There are a lot of tools JAVA -> ActiveX and ActiveX -> JAVA

    Probaly this can be interesting for Windows developers:
    http://java.sun.com/products/javabeans/software/
  17. You have a few options[ Go to top ]

    1) Use J++: accessing native Win32/COM libraries is exactly the parts of the Java API the language extended. Of course you are stuck with JDK 1.1.4 (plus JDK 1.2 Collections).
    Dead Tool
    However, this will only allow you to access COM-exposed .NET APIs via COM Interop.2)
    Nightmare.

    I am looking at this same sort of thing trying to come up with a way to test "web apps" via IE. There is a tool (http://sourceforge.net/projects/webunitproj/) but it is a unsupported project and needs a little work to make if fully useful (radio buttons and Javascript0. I definitely don't want to do it in J++
  18. You have a few options[ Go to top ]

    1) Use J++: accessing native Win32/COM libraries is exactly the parts of the Java API the language extended. Of course you are stuck with JDK 1.1.4 (plus JDK 1.2 Collections).
    Dead Tool


    Right, but that's exactly what we need. Only updated to 1.4 or ideally 1.5.

    And updated to .Net, of course, although COM would already make me quite happy.

    When it was alive and supported, J++ was very cool and it enabled me to finally take control of my Windows desktop in a language and a platform familiar to me. Writing add-ins for tool you use on a daily basis is a very rewarding thing since you reap the benefits right away.

    --
    Cedric
  19. You have a few options[ Go to top ]

    Right, but that's exactly what we need. Only updated to 1.4 or ideally 1.5.And updated to .Net, of course, although COM would already make me quite happy.
    True. But COM is "dead" too. Have you tried COM interop with .Net? A nightmare. Sometimes it is fine - many times it isn't. And one gets the usual fantastic error messages (ie. didn't work) when things don't work. For sake of those who must do [MS].Net, I hope .Net versions of all MS products come soon (Exchange, SQL Server, Windows, COM+, MSMQ, ...).
  20. You have a few options[ Go to top ]

    True. But COM is "dead" too.
    The rumors of COM's death are greatly exaggerated :-)

    COM is alive and kicking and inside pretty 99% of the applications you use daily on your Windows desktop. It's not going to disappear any time soon.
     Have you tried COM interop with .Net? A nightmare.
    I have, and I think "nightmare" is an exaggeration. You can either invoke COM directly or generate COM wrappers that will materialize in the .Net world. Either processes are fairly straightforward (and even familiar, to Win32 developers).
    Sometimes it is fine - many times it isn't. And one gets the usual fantastic error messages (ie. didn't work) when things don't work. For sake of those who must do [MS].Net, I hope .Net versions of all MS products come soon (Exchange, SQL Server, Windows, COM+, MSMQ, ...).
    Yes, no arguments there, COM errors can be very cryptic. Hence my plea for a friendlier language to program it.

    I developed COM in C and C++ and I even today, I fall asleep at the sound of my own screaming reminiscing about it (to quote Butters :-)).

    COM became suddenly much more pleasant to use with J++, and now with C#, so I am hoping Java will be next.

    --
    Cedric
  21. You have a few options[ Go to top ]

    I have, and I think "nightmare" is an exaggeration. You can either invoke COM directly or generate COM wrappers that will materialize in the .Net world.
    Maybe I have been unlucky or have been doing things the "average" (not saying you are - "what is being done, not what can one do") developer doesn't do. That is usually where I run into problems. Of course Microsoft "fix packs" don't help either. I sometimes forget were the pain originated.

    For example:
    I generate COM wrappers then it calls a different version of a DLL.
    I can't get MSMQ to trigger a C# object (running under COM+).
    Trying to manipulate/work with Exchange.

    But I will agree that I have had success with other COM objects. Oddly, not from Microsoft.
  22. You have a few options[ Go to top ]

    1) Use J++: accessing native Win32/COM libraries is exactly the parts of the Java API the language extended. Of course you are stuck with JDK 1.1.4 (plus JDK 1.2 Collections).
    Dead Tool
    Right, but that's exactly what we need. Only updated to 1.4 or ideally 1.5.And updated to .Net, of course, although COM would already make me quite happy.When it was alive and supported, J++ was very cool and it enabled me to finally take control of my Windows desktop in a language and a platform familiar to me. Writing add-ins for tool you use on a daily basis is a very rewarding thing since you reap the benefits right away.-- Cedric
    J++ was a beautiful thing: the power of COM with the simplicity of the Java language and platform. It's no accident that some of the features of the .NET platform stemmed from Microsoft's work here.

    J# is a less beautiful thing, owing to its legal restrictions imposed on it by the original Microsoft/Sun announcement. Whether J# will be brought up-to-date with the latest Java language features is something that only Bryan Keller (PM of the J# team) really knows (and maybe he doesn't, either), but certainly thanks to the agreement there's one less restriction on an open-source Java-to-IL compiler. ;-)

    Believe it or not, this is much more approachable than you might think. The larger question would be whether said tool should or could be able to take advantage of the features coming in Whidbey (such as generics, which are done in a very different manner than Java's generics). If anybody's interested in starting up said tool, I'd jump in; you know where to find me....
  23. Ted: "J++ was a beautiful thing: the power of COM with the simplicity of the Java language and platform. It's no accident that some of the features of the .NET platform stemmed from Microsoft's work here"

    Agree. With Java (J++) COM was easy in fact it was the best way to make COM objects in the MS world. Also it worked very well with old fashion ASP you could call Java COM objects directly from your ASP code. To work with a script language but being able to use Java for anything more serious was very was very productive. A nice "this is how it should be" feeling.

    And to think how people hollowered and yellered in satisfaction when all this was destroyed and teared down!

    It is almost as if you loose faith in the human race :).

    Regards
    Rolf Tollerud
  24. Great Tool[ Go to top ]

    JNIWrapper (www.jniwrapper.com). It's a great way to access the windows api from Java in a very painless way. And it is priced to sell. ;-)
  25. Great Tool[ Go to top ]

    This appears to be an excellent tool. Good find, I'd rather use this, than have Java run under .NET IMO.
  26. Just to write Java for *Mozilla* would be a big improvement. Yeah to access Outlook .net functions in Java though would really rock.