Click to See Complete Forum and Search --> : Using both C# and Java


laptop545
August 22nd, 2009, 09:57 AM
Hi Guys....Can any1 tell me how we can use both C# and Java in a single application....for example i want to add two numbers ...is it possible to do like.....create front end(GUI) using C# and then do back end in Java (adding both the numbers) .....and then displaying it back on the screen...can any1 please help me on this.....

nuzzle
August 22nd, 2009, 07:05 PM
Hi Guys....Can any1 tell me how we can use both C# and Java in a single application....for example i want to add two numbers ...is it possible to do like.....create front end(GUI) using C# and then do back end in Java (adding both the numbers) .....and then displaying it back on the screen...can any1 please help me on this.....

Unfortunately Java isn't a .NET language anymore. It once was (called J#) but it's been retired. So the approach you're suggesting isn't that easy.

Question is why do you need to mix C# and Java really?

If you have code in Java and now want to discard it in favour of C# it shouldn't be too hard to just port it.

David Anton
August 23rd, 2009, 07:46 PM
Unfortunately Java isn't a .NET language anymore. It once was (called J#) but it's been retired.

Java was never a .NET language.
Microsoft put out a .NET version called J# based on an outdated Java standard in the early 2000's, but it was not very successful. This was the follow-up to an earlier version called J++ in the late 90's based on an earlier outdated Java standard - also not very successful.

If you're thinking of porting one way or the other, your biggest challenge is event handling - the .NET model and the indirect Java approach are worlds apart. No converter will handle this aspect.

nuzzle
August 31st, 2009, 05:40 PM
Java was never a .NET language.


Sorry David Anton, but you're dead wrong. At least according to Wikipedia,

http://en.wikipedia.org/wiki/Microsoft_.NET_Languages

If you look in the list of "common .CLI languages" you'll find J# for sure (and it's been discontinued as I claimed).

David Anton
August 31st, 2009, 06:58 PM
J# was an obscure (and inferior) .NET implementation of an outdated Java standard - this does not exactly render the statement that "Java is a .NET language" as truth.

Ask 999 out of 1000 of your fellow Java developers and they'll say Java is not, and never was, a .NET language. Wikipedia isn't exactly the most credible source for everything, as you probably realize.

So, to not be misleading, you could say "There was once an inferior .NET implementation based on an outdated (even at the time) Java standard called J#", but certainly not "Java is a .NET language".

nuzzle
August 31st, 2009, 07:57 PM
J# was an obscure (and inferior) .NET implementation of an outdated Java standard - this does not exactly render the statement that "Java is a .NET language" as truth.

Ask 999 out of 1000 of your fellow Java developers and they'll say Java is not, and never was, a .NET language. Wikipedia isn't exactly the most credible source for everything, as you probably realize.

So, to not be misleading, you could say "There was once an inferior .NET implementation based on an outdated (even at the time) Java standard called J#", but certainly not "Java is a .NET language".

Congratulations! You now belong to a very select group of stupid people who just cannot admit they're wrong. :)

David Anton
August 31st, 2009, 08:04 PM
No need to get into insults.

Java is bigger than .NET and existed long before .NET.

Java proper has never run on .NET - it always has had its own unique libraries.
Even the syntax of J# was not compliant with any Java standard.

How about a poll? "Was Java ever a .NET language?".

nuzzle
August 31st, 2009, 08:38 PM
How about a poll? "Was Java ever a .NET language?".

Is this something you learn at school today? 1+1 is 2 only maybe. Maybe it's 3 or even 13? Let's have a poll to figure.

Cut the crap for heaven's sake and get down to the fact that you've been shown wrong. Counter with some tangible evidence like a reference or something.

David Anton
August 31st, 2009, 09:45 PM
Sure - you win.

Java was a .NET language. This must be obvious from the fact that about .1% of Java-like code was written in J# for a couple of years until even Microsoft gave up on it. Of course I was being argumentative by assuming that Java wasn't a .NET language because 99.9% of Java code was written in 'Java', not J#.

You could also go on the C++ forums and claim that C++ is currently a .NET language simply because there is a .NET implementation of C++ (C++/CLI), having roughly the same popularity that J# did. Of course, you won't find any C++ programmers agreeing with that.

dlorde
September 1st, 2009, 06:25 AM
David, you were right about J# - it was a .NET language using Java-like syntax, but it wasn't Java.

The Java language is more than just Java syntax, as anyone who has read chapters 12 and 13 of the Java Language Specification will know.

So, according to the Java Language Specification, J# wasn't an implementation of Java, though it did use Java-like syntax.

It is a bad plan that admits of no modification...
P. Syrus