Link to home
Start Free TrialLog in
Avatar of frosty12345
frosty12345

asked on

Programming Languages on Operating Systems

Is there a programming language that does not rely on a certain operating system being used? (eg one which is truly mulit platform/os independant??)

If so .. which one?


Cheers (Frosty)
Avatar of stevenlewis
stevenlewis

I beleive java, as long as there is a JVM (java virtual machine) installed then the JVM translates for the OS
that depends on what exactly you need it to do...
and what os's you need it to work with - if its only Microsoft based ,or Macs as well...
Avatar of frosty12345

ASKER

ANY os mac, freebsd, linux everything.
well Java runs on all of them mac, linux, M$. If the OS supports Java (has a JVM), it will run
is that the only language?

are there any major os's that dont support java (or JVM)?
some of the programming experts may have more info on this than I do, but as far as I know all major OS's (except maybe DOS, and that wouldn't be considered major any more) support it.
ok good can Java be compiled to a .exe format?  Im not a techie but i have only ever seen java embedded in webpages (to my recollection)

Can it be used seperatly?
They have java office suites, etc
see www.sun.com for more info on java
BTW java doesn't compile to an exe (linux and MAC's don't use exe's)
can it be compiled into a style like a .exe?
Yes, it does compile into a format, but I'm not sure what it is (I'm not a programmer) I think it's a .jar file, again I'm not sure
Java must run on JVM - so no java virtual machine - not runnable.

You could write your program in c++.

Then again, you must recompile it for every OS you want to run it on.

You may get in trouble - Oses uses diffrent operating system calls, so you must be careful or implement að "interface" wich you change when compliling for another os.

I will recomend using Java, it's portable and you don't need to compile it for every OS.

When you write Java source, and compile it, it will not fully compile, it will compile to byte code, wich the java virtual machine will read and run on the os.

Read som java tutorals on the net to learn more.

Every language has its strengths & weaknesses. Each was designed with a specific task in mind.

Each hardware platform has a unique instruction set, so a compiled object file will only run on the harware for which it was designed.

The purpose of a high-level language is to make the program OS- and architecture-independent, and use the OS-specific compiler to generate code to suit the final environment.

Having said that, compiler-constructors then ofter extend the language to include facilities that are available in the destination environment. This makes the compiler more salabe than a plain-vanilla variety. As a simple example, you can't use long filenames on DOS or OS/360 systems, since long filenames are not available on those systems, but you can't leave them out of *nix systems, since they're a fundamental concept to those OSs.

It is possible to construct a 'p-code' compiler for virtually any language, which produces a file that can be transported directly from platform to platform. You then need a matching P-code interpreter to execute the file. This has its uses, but is still subject to the restraints of the OS, obviously.

Java is very net-oriented, and does that job well. I have seen some valiant efforts to make it work as a general-purpose commercial language, but I feel it really doesn't make the grade on mainframe systems, for instance.

I'd suggest C to be one of the most common languages available for most platforms. C++, then you take your chances (but have more facilities for use in the platform-set you choose...)

Think of it this way - If you were to try to get a universal tool, would you choose a hammer, a screwdriver or a spoon?

...Bill
ASKER CERTIFIED SOLUTION
Avatar of nir2002
nir2002

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
NIR - from Israel?
where from?- im from B.S.
frosty12345:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.