By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,820 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,820 IT Pros & Developers. It's quick & easy.

C# vs Java run on every machine?

P: n/a
Hi,

I know that java can run on any machine. And C# is competing with
java. I just came back from book store. I found that none of C# books
state that its application can run everywhere. I am wondering if C# is
OS dependable?

Thanks. -Dale
Jul 22 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a

"dalewz" <da****@yahoo.com> wrote in message
news:d9**************************@posting.google.c om...
Hi,

I know that java can run on any machine. And C# is competing with
java. I just came back from book store. I found that none of C# books
state that its application can run everywhere. I am wondering if C# is
OS dependable?


Wrong group, this group is for C++, not C# or Java.

Try

news:comp.lang.java.programmer

or

news:microsoft.public.dotnet.languages.csharp

john
Jul 22 '05 #2

P: n/a
dalewz wrote:
Hi,

I know that java can run on any machine. And C# is competing with
java. I just came back from book store. I found that none of C# books
state that its application can run everywhere. I am wondering if C# is
OS dependable?


For clarification, Java applications do not run on any machine.

Java apps and .NET apps both run inside a virtual machine - something
that runs on top of your current operating system.

The Java virtual machine has been ported to several mainstream operating
systems. The .NET virtual machine is really only prevalent on MS
operating systems.

..NET is standardized - so currently, there are a few projects porting
the .NET runtime to other platforms.
-Luther

Jul 22 '05 #3

P: n/a
dalewz posted:
Hi,

I know that java can run on any machine. And C# is competing with
java. I just came back from book store. I found that none of C# books
state that its application can run everywhere. I am wondering if C# is
OS dependable?

Thanks. -Dale

Programming languages that depend on a virtual machine are shit.
-JKop
Jul 22 '05 #4

P: n/a
dalewz wrote:
Hi,

I know that java can run on any machine. And C# is competing with
java. I just came back from book store. I found that none of C# books
state that its application can run everywhere. I am wondering if C# is
OS dependable?

Thanks. -Dale


Java can run on any machine that has an implementation of the Java VM.

The equivalen to the Java VM in C# is the CLR, which is part of the .NET
framework. .NET is a standrad by microsoft. The only implementation
outside of Windows that I'm aware of is Mono.

All this rubbish boils down to this.

1. Neither Java nor C# run on any machine.
2. Java is supported in many more platforms than C#.
3. Ask in a Java nesgroup concerning Java, ask in a Microsoft forum for C#.

JLR
Jul 22 '05 #5

P: n/a

"JKop" <NU**@NULL.NULL> wrote in message
news:Qj***************@news.indigo.ie...
dalewz posted:
Hi,

I know that java can run on any machine. And C# is competing with
java. I just came back from book store. I found that none of C# books
state that its application can run everywhere. I am wondering if C# is
OS dependable?

Thanks. -Dale

Programming languages that depend on a virtual machine are shit.
-JKop


Yeah. How much processing time do you add? Double? Triple? .... Go with a
compiled language. Then distribute the source if you want it compiled on any
system.

-- Matt
Jul 22 '05 #6

P: n/a
Jorge Rivera wrote:
.NET is a standrad by microsoft.


I find that typo really amusing, considering Microsoft's track record
with standards. :-)

Alan
Jul 22 '05 #7

P: n/a
Matthew Del Buono wrote:
"JKop" <NU**@NULL.NULL> wrote in message
news:Qj***************@news.indigo.ie... <snip>
Yeah. How much processing time do you add? Double? Triple? .... Go
with a compiled language. Then distribute the source if you want it
compiled on any system.

-- Matt


Well-written C# code runs at 95% of the speed of equivilent well-written C++
code.
C# is a compiled language. The first time C# code is ran, it is compiled
tailored to the specific machine of the user.

- Pete
Jul 22 '05 #8

P: n/a
Petec posted:
Well-written C# code runs at 95% of the speed of equivilent
well-written C++ code.
C# is a compiled language. The first time C# code is ran, it is
compiled tailored to the specific machine of the user.

- Pete

So okay, first of all it's compiled.

==TIME ELAPSES==

Program runs at speed 95% of proper code.
Include the first delay and you're probably looking at 80%.
Starting out in programming, I started with Visual Basic. I was weaned off
that to a real programming language, C++.
If you program in the likes of Visual Basic, Java, C#, .NET, then Yes, you
are a computer programmer, but of the lowest order.
I'll love to see someone program an ATM machine in C#, bagsy not writing the
super cool on-the-fly compiler for it.
-JKop
Jul 22 '05 #9

P: n/a
JKop wrote:
Petec posted:
Well-written C# code runs at 95% of the speed of equivilent
well-written C++ code.
C# is a compiled language. The first time C# code is ran, it is
compiled tailored to the specific machine of the user.

- Pete

So okay, first of all it's compiled.

==TIME ELAPSES==


Hardly any time, it's extremly quick.

Program runs at speed 95% of proper code.

C# code is "proper" code.

Include the first delay and you're probably looking at 80%.

No, the 95% includes JIT compilation.

Starting out in programming, I started with Visual Basic. I was
weaned off that to a real programming language, C++.

While it may not be an "elegant" language, VB is nonetheless a real computer
language.

If you program in the likes of Visual Basic, Java, C#, .NET, then
Yes, you are a computer programmer, but of the lowest order.

Not sure what you have against such languages, but thanks for the
complement.
I must be "just" a middle order programmer, since I pick the best tool for
the job whether it be C++, C#, VB.NET, or Java.

I'll love to see someone program an ATM machine in C#, bagsy not
writing the super cool on-the-fly compiler for it.

Windows CE .Net, a very suitable platform for an ATM machine, comes with the
..Net Compact Framework, a /very/ slightly compacted version of .Net, which
also includes the JIT compiler.

- Pete

-JKop


Jul 22 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.