Groups | Blog | Home
all groups > vj# > december 2003 >

vj# : Should I choose J# ?


MyName
12/11/2003 2:01:59 AM

I'm wanting to get a way from Delphi.

I'm thinking of J# because I might be able to
transfer the code to Java without much difficulty.
Is this true? How much is J# like Java?
If not an easy recompile of code, are there
translators that can convert J# to Java?

Bruno Jouhier [MVP]
12/11/2003 8:50:02 AM
At the language level, J# is Java, with a few extensions to make it good
citizen in .NET. But you can take vanilla Java source code and recompile it
with the J# compiler. You can also take Java class libraries (jar files) and
convert them to .NET assemblies.

On the other hand, J# is like "old Java" at the JDK level. J# is based on
version 1.1.4 of the JDK (very old, SUN stopped supporting it in July 2001).
So you don't have all the latest goodies of SUN's JDKs and you may
experience some API incompatibilities between J# and standard Java (usually,
classes or methods that have been added to the JDK and that don't exist in
J#). But Microsoft has added some goodies from the latest JDK (collection
classes for example) to close the gap.

Bottom line: You won't run into any trouble with the language syntax, but
you have to be careful and check that the JDK methods that you need are
supported by the J# JDK.

Also, if you don't care about portability between J# and standard Java and
only want to target .NET, you don't need to worry about the JDK issue,
because you will be able to use the full .NET framework from J#.

Bruno.

"MyName" <dkfjiw@argueemimini.net> a écrit dans le message de
news:pan.2003.12.10.20.02.33.705259@argueemimini.net...
[quoted text, click to view]

Jan
12/12/2003 3:51:52 AM
A related questions:=20

Is the present lack of Javscript support in J# the problem=20
of J# or a deficiency of the NET Framework itself ?=20

Will it be possible to write scriptable client side=20
applets using other languages like C# or even managed=20
C++ ? Or is it possible even now ?

Jan

[quoted text, click to view]
Bruno Jouhier [MVP]
12/12/2003 8:24:00 PM
Hi Jan,

I don't understand your first question. What do you mean by Javascript
support in J#? As I said in my post, J# is Java for .NET, so you are
basically asking about Javascript support in Java. What do you mean? Maybe
you are looking for something like JScript rather than for J#.

J# is not a script language, it is a compiled language. You can write
client-side components that execute inside your browser (like applets or
Active-X) but this is not at all my field of expertise (I only did this
exercise with Java and AWT a long time ago, but did not try it with J#) so
I'll let someone else give you more details on what's available in J# and C#
and what's not.

Bruno.

"Jan" <anonymous@discussions.microsoft.com> a écrit dans le message de
news:09be01c3c0a6$5578f380$a301280a@phx.gbl...
A related questions:

Is the present lack of Javscript support in J# the problem
of J# or a deficiency of the NET Framework itself ?

Will it be possible to write scriptable client side
applets using other languages like C# or even managed
C++ ? Or is it possible even now ?

Jan

[quoted text, click to view]

anonymous NO[at]SPAM discussions.microsoft.com
12/13/2003 4:50:37 AM
Hi Bruno

I ment the possibility to access applet properties and
methods from Javascript and the possibility to call
Javascript methods from the apple
(scriptable=TRUE,MAYSCRIPT). This is a normal part of
Java, but not supported with the current version of J#
(hopefully this is going to change in the near future

Michel Gallant
12/13/2003 10:12:27 AM
The next (v 1.2, currently in Alpha) release of J# Browser Control (JBC) will
have support for scripting into applets (as requested by quite a few folks),
including support for the Netscape JavaScript API Package

Not sure about Java -->JScript calls however.
If interested, you should check out JBC info:
http://msdn.microsoft.com/vjsharp/downloads/browsercontrols/

Note that if you plan to deploy a .NET J# application with JBC, your clients
will need all of the following installed:
.NET Framework
J# redistributable
JBC redistributable
so you need to consider your deployment strategy :-)

- Michel Gallant
MVP Security
http://pages.istar.ca/~neutron

[quoted text, click to view]

Jan
12/14/2003 11:08:08 AM
[quoted text, click to view]

OK, one can live with it. But your note leads as back to
the original question: "Is the use of J# and JBC
essential, or do they just ensure the source code
compatibility with Java ?"

It would be nice to write scriptable applets using
plain .NET framework. Some rumors about
System::Windows::Forms::UserControl appeared on the web
but the lack of any official DOCs on this topics looks
conspicuous to me. May be the missing script support is
caused by the framework itself ? Or the lack of applet
support was intentional ?

I now, one could use ActiveX instead of .NET but there is
a very important difference. The consumer of such a
service will have to trust me and my code will be able to
control the whole box hence errors can have disastrous
effect. The .NET/JAVA sandbox helps both parties. The user
knows whom to trust and if the developer still manages to
damage the user's box due to security flaw ? Not my
problem, sandbox should have been programmed better!

rlacas NO[at]SPAM online.microsoft.com
12/16/2003 5:43:38 PM
Here is a link to the quick-start sample on embedded UserControl's in
Internet Explorer. You script these the same as you would other
client-side enbedded controls, such as applets or ActiveX controls.

http://samples.gotdotnet.com/quickstart/winforms/doc/WinFormsIeSourcing.aspx



[quoted text, click to view]

Bob LaCasse
Microsoft Developer Support - Visual J#.NET

This posting is provided AS IS with no warranties, and confers no rights.
AddThis Social Bookmark Button