Solved

C++ & C and a little on java

Posted on 2001-07-30
44
305 Views
Last Modified: 2010-04-02
is C & C++ platform independent language? why is it so?
"please clearify the YES or the No answer that you are giving me"

i heard that C is not a web application language, is it true?

by the way what is platform independent? i heard that java is platform independent. "Java can run in any OS as long as one has the java Virtual Machine". So with this statement, is java really platform independent?
coz if i have a C++ compiler, no matter what OS i runs on, it will also exe. so what are the difference when you say that java is platform independent while C or C++ is not?
0
Comment
Question by:volca
  • 16
  • 9
  • 8
  • +3
44 Comments
 
LVL 10

Accepted Solution

by:
makerp earned 175 total points
ID: 6333287
>>is C & C++ platform independent language? why is it so?

Yes providing you use standard code, and do not use things that individual compilers have added to the language. the only real problem is when you use OS API calls, these are usually specific to the platorm you are coding for and make the code completley unportable, although you can use pre-processor directives to resolve these problems at copmpile time. also C and C++ are compiled languages therefore once compiled they are only good for the platform they were compiled for. therefore C/C++ source code can be platform independant but executables are not.

i heard that C is not a web application language, is it true?

strictly speaking yes C it can be used to program CGI but it makes life more difficult than needed, C gives you alot or power to do things but web programming does not this power, therefore people tend to go for scripting languages such as VB script, perl etc that are more suited to web programming/CGI. i have done CGI in c and its a pain

java is platform independant and achives this because java is only compiled to byte code, the byte code is then transformed at run-time by the Virtual machine on the host OS. therefore the java VM itself is not platform indenpendant , one needs to be made for each OS but the java language and byte code is.

finally as far as i can see it is imposible to create a platform independant language without having the code interpreted at run-time on the host, fully compiled languages are converted to machine code specific to the target host,

Paul
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6333884
One view (Microsoft's mainly, I think) is that Java (the language) is not platform independant, because Java (as an environment) is a platform, i.e. you cannot really use Java to write Windows programs, you can only use Java write programs that run via the VM on top of windows.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6334014
>>  by the way what is platform independent?
It can mean 1 of two things.   It either means that a program can be made to run on any platform--that is, on any operating system (OS) and hardware (CPU, memory type etc).  This is true of java, where a java program can be copied to any platform and run.   Or it means that the source code can be used to generate a program that runs on any platform.  This is true for C++.  As markerp pointed out, C and C++ programs cannot be copied to different platformsand run, however their source code can be used to geenrate programs for different platforms.   some lanaguages have no portability at all.  Visual Basic for example only creates programs for the Windows platform.

Now in a sense no languages is platform independant.   Java programs can be used on any machine that supports the java virtual machine.   but there are platforms that don't have a java virtual machine.   So java can';t be run on them.  It may be possible to create a vajav virtual machine for them, so in that sense its still portable to them.  But some machines might never be able to support a java virtual machine.   Say an Apple II eith 64 ke of ram and an casette deck for storage!   (But even modern machines may not be able to too, like ones dedacted to performing floating point proccessing.)  C++ programs are not 100% platform independant either.   They can only be run on a platform if there is a C++ compiler or cross-compiler available fo that platform.  Most modern platforms have such a compiler.  If not, one could be written, so like java its prossible to port to most modern platforms.  But again specialty platforms might never be able to run a C++ program.

>> is C & C++ platform independent language?
markerp did a good job explaining it in detail.  In summary, yes, because you can take source code written for one platform and com[pile it for a different platfrorm to produce an expecutable for that platform.

>> i heard that C is not a web application language, is it true?
It depends on what you mean by that.

>>i heard that java is platform independent. "Java can run in
>> any OS as long as one has the java Virtual Machine". So with this statement, is java really platform
>> independent?
As independant as any.  Not trully 100%, but its getting down to splitting hairs.

>> coz if i have a C++ compiler, no matter what OS i runs on, it will also exe. so what are the difference
>> when you say that java is platform independent while C or C++ is not?
Its the same issue.  Except it might be eaiser to write a java virtual machine for a new platform compared to writting a compiler for a new platform.  So if you actually have to write these tools, java might seem more portable.  (maybe, its going to depend on what is avaialble.)

0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6335518
The c and c++ are not platform independent, you cannot run them on Mac or unix platform or write program and compile you need windows for that. Jave (at least in theory) a platform independent,originally created to hook electronic devices in network regardless of their platform but picked up market as web language since it offers nice features like applets and is easy to code than c++ (at least for me).  Platform independent means you can run java program on either windows, mac or unix  OS workstations.  Although not very popular, C++ can be used to write some of the web application and so is C.
for more about java refer to sun's website:
http:\\java.sum.com
--hope it clear things up if you have more question about this comment feel free to ask.
--scientist.
0
 

Expert Comment

by:cpearl_s
ID: 6336612
Nietod and Makerp

Both explanation are are excelent,
Let me share my little knowledge

Platform independent mean, generating    non-machine dependent code.
At the time of execution only the JVM binds the machine depend infomartion.
That we called as byte code. isn't ?.
Any how as every ones agrees java is platform independent me to aggrees with an  question.

As nietod says :
   Java programs can be used on any machine that
supports the java virtual machine.   but there are platforms that don't have a java virtual machine.
  So java can';t be run on them.
---------
If Java programm doesn't work without JVM then,
This is similar to executing a C++ programm in other platform by compiling with respective platform compiler.

We can't say byte code is platform independent. If so i can arguee c++ source code also platform independent.

More over can we execute a java program to create a window in MS Dos (not from windows prompt) Let we boot this from floppy.

X-pert plz dont consider Error and Non-sence  statement i made.,

regards
cpearl




0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6337994
>>That we called as byte code. isn't ?.
The code generated by JVM is not called by code it is called UNICODE that each unicode has about 8 bytes full of instruction since this structures is followed by JDK under any environment makes java platform independent language.

One correction to my last comment:
the website is
http:\\java.sun.com

--scientist
0
 
LVL 22

Expert Comment

by:nietod
ID: 6339961
> The c and c++ are not platform independent, you cannot run
>> them on Mac or unix platform or write program
>>  and compile you need windows for that.
NO.

C and C++ were largely devloped ON UNIX!   years before the word "windows" meant something other than a hole in a wall.    You can also use both on Macintosh (codewarrior os one of several C++ compilers for Mac).   Virtually every major OS in the world has C/C++ compilers.

>> Platform independent mean, generating    non-machine dependent code.
ussually.  It can mean different things to different people or at different times.

>> it is called UNICODE
I dobut that.  UNICODE is the name of a 16 bit character set.  i.e. like ASCII, but larger.
0
 

Expert Comment

by:cpearl_s
ID: 6343304
To Scientist and nietod ,
          As nietod says ,I dont think Unicode and bytecode are same. As i read , In a byte code each instruction have one byte. Compiler can generate code in different ways , 1 bytecode instruction or 2 byte instruction ...(i got this from Compiler Constructio Materials)
What nietod says is correct with unicode , its is 16-bit  char set.
So byte code and unicode are not same

Moreover i dont think JVM genereate unicode to execute java byte code.Why it has to generate again code, just take that byte code and parse the execution plan after binding the platform dependent information according to the platform.

nietod/scientist don't u get this doubt with u

If Java programm doesn't work without JVM then,
This is similar to executing a C++ programm in other platform by compiling with respective platform
compiler.
We can't say byte code is platform independent. If so i can arguee c++ source code also platform independent.

The Why Java programm is prouded with Platform Independent ?


regards
cpearl
0
 
LVL 22

Expert Comment

by:nietod
ID: 6344266
>> So byte code and unicode are not same
Well, someone might have decided to use the word "unicode" for a second purpose.  It wouldn't be very smart, but its certainly been done before.

>> If Java programm doesn't work without JVM then,
>> This is similar to executing a C++ programm in other ?? platform by compiling with respective platform
That is exactly the point I made.

>> The Why Java programm is prouded
>> with Platform Independent ?
For most practicle purposes it is.  As is C++.   neither are trully 100%,b ut the exceptions don't matter.   I have a computer in my dishwasher that can't run either, but then again I don't really need it to.
0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6347608
I agree on the issue that unicode is 2 bytes (16-bits).Thanks to cpearl s and nietod to bringing it to my attention. I think cpearl s is right on the issue that bytecode and unicode are not the same if they were then there would have not been much difference between c++ and java and both could have been platform independent. Java programmers doesnot always have to always work with JVM they can use VJ++ of Microsoft and choose to work on windows.
>>We can't say byte code is platform independent. If so i >>can arguee c++ source code also platform independent.
>>The Why Java programm is prouded with Platform >>Independent ?
Nobody said that byte code is platform independent all I am saying is unicode is and since Java uses JVM to generate unicode java is plaform independent.
Java is prouded with platform independence because it has been proven to work under any environment regardless of the computers platform or OS.
--scientist


0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6348076
BTW, I found this quote, which may be relevant to this question:

'Java isn't platform independent; it is a platform. Like Windows, it is a proprietary commercial platform. That is, you can write programs for Windows/Intel or Java/JVM, and in each case you are writing code for a platform owned by a single corporation and tweaked for the commercial benefit of that corporation. It has been pointed out that you can write programs in any language for the JVM and associated operating systems facilities. However, the JVM, etc., are heavily biased in favor of Java. It is nowhere near being a general reasonably language-neutral VM/OS.'

This is from Bjarne Stroustrup.

0
 
LVL 22

Expert Comment

by:nietod
ID: 6348128
"you can write programs in any language for the JVM"  That is an interesting point!
0
 
LVL 1

Expert Comment

by:ksenthilraj
ID: 6348365
Hai,
>is C & C++ platform independent language? why is it so?
"please clearify the YES or the No answer that you are giving me"

Platform independent means nothing but the ability to run in all the platforms. Since different version of compilers and API's are availble C/C++ are not able to run in all platforms.. Java is capable to run in all the platforms because jave code are first speaks with the middle layer JVM then only it goes to API..


For your second question,  yes C or C++ can become platform independent whenever you have to create a middle tier or interface which can capable to combine with all the platforms or OS..

I think this will clear you.

With Cheers..

0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6348395
> Java is capable to run in all the platforms
> because jave code

Perhaps you should read Bjarne Stroustrup's quote above,  the answer is not nearly as clear cut as you imply.

This C++ program:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello, World!" << endl;
}

will probably run on more platforms than any equivalant Java program (I suspect there are still C++ compilers for many more platforms than those that there is a JVM).

The answer to 'is language X platform independant' depends very heavily on the answer to the question 'what do you mean by platform independance' - and that question has many different possible answers.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6348405
>> Platform independent means nothing but
>> the ability to run in all the platforms.
but what does THAT mean?  
Does it mean that the executable has to be able to run on all platforms?  Or that the source code can be used to create an executable for all platforms?  What does "all platforms mean"?  Does it include embedded systems?  What about platforms that don't yet support a C++ compiler or JVM?  Do those count or not.

THERE IS NO UNIVERSAL DEFINITION OF PLATFORM INDEPEDENCE.

>> Java is capable to
>> run in all the platforms
Oh?  Do ALL embedded systems support java?  Do ANY?
What about DOS?  IRMX?  Can you run java on a CRAY?

DOS and IRMX do support C/C++ but to the best of my knowledge have no support for java.  Doesn't that mean that C++ is platform independant and java is not?

What "platform dependance" means depends on what you are interested in.  

>> yes C or C++ can become platform independent
>> whenever you have to create a middle tier or
>> interface which can capable to combine with all
>> the platforms or OS..
No.  C/C++ is not an interpretted lanauges.  It produces its type of platform independance through a completely different means. The soruce code is platform independant, the object code is not.

As Bjarne Stroustrup observed, if you were to make it interpreted, like java, then in a sense that makes it extremely platform depedant.  Again what you mean by {platform indepedance" is highly subjective.  By Stroustrup's defintion (in that instance) java is TOTALLY platform dependant.  By other definitions its totally platform indepedant.  There is no reight definition, it depends on your needs and concerns.  
0
 
LVL 1

Expert Comment

by:ksenthilraj
ID: 6348626
nietod,

What is your CONCLUSION????

With Cheers..
0
 
LVL 22

Expert Comment

by:nietod
ID: 6348787
My conclusion is that according to some definitions C++ is platform independant and java is not.  According to some java is platform dependant and C++ is not, according to some both are and according to some neither are.  All those definitions are reasonable ones.  

In the end, it just depends on what your needs are.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6348816
Opps, that was supposed to be

"According to some java is platform INdependant and C++ is not"

2 letters can mean a big difference in meaning.  
0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6349337
Bjarne Stroustrup must have wrote the quote because he was founder of the c++ and may have not like the superiority of java over his invention.
--scientist
0
 
LVL 22

Expert Comment

by:nietod
ID: 6349643
>> Bjarne Stroustrup must have wrote the quote
>> because he was founder of the c++ and may
>> have not like the superiority of java over
>> his invention.
Apparently you've never read anything Bjanre Stroustrup has to say about C++ or other langauges.  I would call his opinion on languages strengths and weaknesses not only extremely well informed, but also extremely unbiased.

From Stroustrup.
"Several reviewers asked me to compare C++ to other languages. This I have decided against doing. Thereby, I
have reaffirmed a long-standing and strongly held view: Language comparisons are rarely meaningful and even
less often fair. "

Yet you claim that he saus that C++ is superior to java?  I've never seen anything from him to suggest it. Read "Design and  Evolution of C++"  
0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6349686
>>Language comparisons are rarely meaningful and
 >> even
>>  less often fair

Well,  If he is so unbaised than why would he call the language comparison unfair. I think comparing two languages is fair competetion.  Is afraid that the superiority of c++ may be japordize.  
Less ofter fair and rarely meaningful but somewhat meaningful atleast.
He might be feeling problem admitting Java is better over C++.
--scientist
0
 
LVL 22

Expert Comment

by:nietod
ID: 6349780
>> I think comparing
>> two languages is fair competetion.
????

His point is that it is virtually impossible to compare two lagangues.  He goes on to give good reasons why.  

Forget langauges.  

Which is better a hammer or a saw?

These are much simpler than lanagues and have less proponents than langauges.  You should be able to give them an honest comparison.  Which is better?  

You can't say.  It deoends on what you are doing. If you are hanging a picture a hammer is better, if you are shortening a table a saw is better.

>>  Is afraid that the superiority of
>> c++ may be japordize
Where does he say that C++ is superior?  Where did you get this quote?  post it.  It definitely conflicts with everything he has said about languages.  

>> He might be feeling problem admitting
>> Java is better over C++.
What are you talking aboiut?  I'm sure he woudl have no problem stating that java is better than C++---AT TIMES.   He is not so stupid as t think that it is always better than C++ or that C++ is always better than java.  That sort of view is foolish.

"I'll stick to reasonably portable C++ for most
of the kind of work I think most about and use
a variety of languages for the rest."

Why would he use langauges other than C++ if he thinks C++ is always the best?

How about

"I also point out the limitations of C++"
"C++ certainly isn't perfect,"

Are these the words of someone so biases that they beleive that C++ is superiot to all other languages.

have your ever read Design and Evolution of C++?  have you ever read any of Stroustrup's words on this subject?  If not how can you possible be stating an opinion on his beleifs on the matter!  And if you have read his work ont he subject, well, then why would you state something like this?

Once again, where do you see him stating that he believes that C++ is superior to java?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 10

Expert Comment

by:makerp
ID: 6351210
it is impossible to compare two languages as they will both be better for different things. although you could compare two langauges against a given problem, for example which is better for writting an operating system, C or Java.

i think mr scientist that your quotes from Stroustrup are not true, i can not image some one as cleaver as him coming out with such rubbish

Paul
0
 
LVL 22

Expert Comment

by:nietod
ID: 6351262
>> i can not image some one as cleaver
>> as him coming out with such rubbish
Especially when he stresses so strongly that he won't make such statements.
0
 
LVL 10

Expert Comment

by:makerp
ID: 6351309
i think mr scientist that you should listen to neitod, he displays a vast array of knowledge in this area, i do not know what your information sources are but i can assume that they are wrong.

taking on neitod is usually a bad idea !
0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6354678
I didnot quote him do any of you see me put quote around any of the statements the only thing I said is he MAY have thought about comparing languages that way nietod I think there is big misunderstanding on your part I have never said  that he has said such words nor made any statements like that.
--scientist
0
 
LVL 22

Expert Comment

by:nietod
ID: 6355331
You wrote

  Bjarne Stroustrup must have wrote the quote because
  he was founder of the c++ and may have not like
  the superiority of java over his invention.

Whus says he MUST have written it...

That is a very condemmming statement of a man whose works on the subject you have apparently never read.   I hope you will do a little better research before you accuse the next person of unethical practices.
0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6357770
I think this has gone too far I take everything back I have said and I will not post anymore comments on this question and forget my former comments.
--scientist.
0
 
LVL 10

Expert Comment

by:makerp
ID: 6358772
>>I think this has gone too far I take everything back I have said and I will not post anymore comments
on this question and forget my former comments.

hehehe :)
0
 

Expert Comment

by:cpearl_s
ID: 6358838
fine experts,
          Really this is hot discussion, and never ending discussion, and the argument still continues......

As what neitod says i agrees, since, as he said there is no universal defination for platform indepentent.
Also i raise this doubt to nietod ,
do u agrees what jasonclarke said
I dont think java is a platform.As he said it's like windows then it must be an OS isn't.
I also ask u is java is a platform or laungauge ????

regards
Cpearl
0
 
LVL 22

Expert Comment

by:nietod
ID: 6358880
>> do u agrees what jasonclarke said
Without any doubt.  java is a platform and thus the least platform indepedant langauge I can think of.

Without any doubt.  Java is not a plaform and thus the most platform independent language I can think of.

It depends on you you define platform.  In the absence of any real-world considerations, either argument is equally valid.  Its only when you begin to consider your needs for considering its indepedance for a particular case that you can really decide if it is platform indepdant or not, and thus only for a particular case.

>> I dont think java is a platform
Would you have called Windows 3.1 a platform?  Most peiple do.  But you could argue that the native platform was DOS and that windows 3.1 was a virtual machine running on DOS that provides an interface between the windows programs and the DOS platform.

So is Java a platform or a virtual machine running on a native platform?  You can argue either way.  It provides all the functions you associate with an OS.  Ability to open files, ability to access OS resources, ability to create threads and processes etc.  That sounds like an OS.  However on the other hand, it doesn't do most of those things directly, but instead uses the native OS to do it.  That sound's like a virtual machine.  But then is windows a virutal machine?

>> I also ask u is java is a platform or laungauge
It depends on why you ask.
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6358928
Even sun think that Java is a platform (and The Java Programming Language is a language for the Java platform), take a look here:

http://developer.java.sun.com/developer/onlineTraining/new2java/overview.html

What this means is that it is not really possible to write real windows programs with Java...you write Java Platform programs, which may run on and look like windows programs, but any calls to the Windows API that the JVM makes are not your concern (so if any new Windows facility comes along, you must wait for the JVM to support it before you can use it in Java), in the same way that when you write a Windows program the details of how the operating system interacts with the underlying machine are not your concern.


0
 
LVL 1

Expert Comment

by:scientist060700
ID: 6362831
Java is platform independent (mostly taken in theoratical sense). Since nietod like to check references for my comments you can find this in book called Title: Java Programming (from the beginning) by K N King P 19 and on some other pages I don't remember there is huge discussion on this topic.
>>So is Java a platform or a virtual machine running on a native platform?
But java doesnot care about the native platform. Your so called 'virtual machine' can run on any platform or any OS. so as long as it can compiled the code or run a program on any OS (OS + CPU = platform) then the language is understood to be platform independent.
If you not know the history of java the java was created when sun microsystem engineer were trying to hook electronic devices in to the network regardless of their platforms this can be also found in the book mention above under the topic 'history of java'.
Another example the java gain more popularity when it's applets and many other programs were able to run on the internet in any machine with any OS or plaform.
So, i think the idea of platform independence does play a major role in java being a popular language it is.
--scientist.
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6363076
scientist, Your argument still doesn't hold water in some respects - think about the Hello World program - which program (unchanged) will run on more platforms: the C++ one or the Java one?

Also, you *cannot* write a real Windows program with Java (if you could it wouldn't be platform independent!) - you can only *simulate* a windows program (as much as the JVM allows).  So, it is not platform independent in as much as you can only write JVM programs with Java (the fact that the JVM runs on Windows is a side issue - in the same way you can get Mac emulators for PCs, the PC emulates a Mac, so a Windows machine emulates a JVM machine, the only difference is there is no native JVM machine).

The whole point is, anyway, that this is only one view, it depends *very much* on what you want (as we have said before).

So, maybe you want a program with a GUI to run on mainstream platforms, unchanged - then Java maybe a good choice.

But if you want a program that you don't mind having to recompile on each platform, then maybe C++ is a better choice, especially if the platforms are not JVM supported.

If you are writing a program that is purely a Windows program - and you want to use Windows facilities - then maybe C++ or possibly even VB are better choices than Java.

More than this it also depends on your application - for example anybody doing serious numerical analysis would never choose Java (its floating point arithmetic is broken and slow) - and for many applications like this C++ code (because you don't mind recompiling algorithms typically) is more portable than Java.
0
 

Expert Comment

by:cpearl_s
ID: 6363240
To nietod ,
My doubt in discussing with Java is platform or not, is
Generally we call Platform mean the Operating System we use to execute.
If u say Java is a platform then iam running java under windows implies working with 2 operating system, which is impossible.
So i, do not agree Java is a Platform Unless i provided a necessary evidence.

More over nietod ,
Your reply confusing me still, what u trying to say is Java is Platform or a Launguage.
plz correct me if iam going wrong .
regards
cpearl
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6363270
> So i, do not agree Java is a Platform Unless i
> provided a necessary evidence.

read this:

http://java.sun.com/docs/books/tutorial/getStarted/intro/definition.html

an explanation of what the Java Platform is from Sun.


> If u say Java is a platform then iam running java under > windows implies working with 2 operating system,
> which is impossible.

is it really?  Consider a Mac Emulator running on Windows (or vice versa).  The emulator runs on top of another operating system - but Mac programs running on the emulator have no knowledge of what hardware they are running - all they see is the Mac OS.  What happens is that the application calls the Mac OS, the emulator translates these into Windows calls, and then Windows does the work. Exactly the same happens with a JVM running on top of Windows.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6363590
>> you can find this in book called Title:
>> Java Programming (from the beginning) by K N
>> King P 19 and on some other pages
And the book is right.  By many good and practile definitions of platform independance java is platform indepedant.  But by other equally reasonable definitions it is not.  

There are many platforms that java does not run on (DOS for example).  If you definitions is simply that it has to run on every single platform, well then it is not platform independant.  Now if you definitions is only that it has to be possible to run it on a platform, then you could argue that java coudl be made to run on DOS and thus it is platform independant.  Both arguments are valid.  They dissagree because they are using different, though reasonable, definitions of platform independance.

>> Generally we call Platform mean the
>> Operating System we use to execute.
Again the meaning of the term depends on your needs.  It depends on what issues you are concerned with.

>> If u say Java is a platform then iam running java under
>> windows implies working with 2 operating system,
>> which is impossible.
Why?  Does that mean that windows 3.1 is not an OS then?  since it run on DOS.  (And beleive me you could make the same claim about windows 95 and 98 and to a lesser extent BT and 2000.)

Depending on your concerns it is very valid to argue that windows is not an OS.  Depending on your concerns it is very valid to argue the other way.
0
 

Expert Comment

by:cpearl_s
ID: 6363845
Jasonclarke

hey janson, the argument is Java is a Platform or not.

I agrees what u said and neitod said, my thanks to u and neitod  for patient argument , and
fine explanation.
if any thing i said is wrong then i back from that.
Let me go to these sites and find answers

And finally ,would u mind guys clear me , Java and JVM are same or different.
if so then JVM is a platform (as jason said )and java is a langauge. ami right

Hope guys , call me when u are in such a hot discussion, let me share my knowledge

regards
cpearl
0
 
LVL 22

Expert Comment

by:nietod
ID: 6363857
>> JVM is a platform (as jason said )and
>> java is a langauge. ami right
java is a langauge.  period.  JVM could be considered a platform.  it could be considered an intepreter, it could be considered a virtual machine.
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6363867
> And finally ,would u mind guys clear me , Java and JVM are same or different.
> if so then JVM is a platform (as jason said )and java is a langauge. ami right

basically yes, it is just confusing because Sun make it confusing (by using the word Java for everything).  

Sun says that language is: The Java Programming Language (that is all 4 words and the capitalisation is important).

The Java Platform is the JVM plus the Java API.
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6363875
> java is a langauge.  period

no, I don't think so, Sun confuse these things: The Java Programming Language is a language, Java is also the word used for the Java Platform, the JVM and the Java API.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6363944
Alright it depends on what you mean by "java"....  :-)

will this never end?

What do you mean by "never"?
0
 
LVL 9

Expert Comment

by:jasonclarke
ID: 6363984
Actually, I quite like all that because it shows (IMHO) that Sun are just as obsessive about control over these things as Microsoft are - and a reminder that though Java programs may run on both Unix & Windows, the language is very much a proprietry one, owned by Sun.  In my opinion this is a bad thing - for example Microsoft seem to have changed VB from one language into a completely different one in VB.NET.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6364069
Well you are alone in that view.  :-)

If I ran MS or Sun.  Things would be very different.  Most significantly, I would be earning more.  Other than that, nothing would be different.

However in all seriousness, its definitely true that this is an area where C++ excels over java.  C++ is not owned by anyone.  Even AT&T who really paid the bills for developing it at the start or the other companies that spend a lot of resoruces in helping to standardize it (including both MS and Sun).  C++ is not at the whim of any single company nor dedicated to any particular agenda.  
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now