| Author |
Unix + Java
|
bobby reddy
Greenhorn
Joined: Nov 05, 2007
Posts: 27
|
|
Hello everyone, Could anyone let me know why Unix is used in combination with Java? Thanks, bobby
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26216
|
|
Bobby, UNIX is an operating system. Java runs on an operating system. Java can run on UNIX (or Windows or Mac or Linux or ...)
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
bobby reddy
Greenhorn
Joined: Nov 05, 2007
Posts: 27
|
|
Hello Jeanne Boyarsky, Whats the difference in the Java application that makes use of Unix or Windows operating system? Can the same Java application work on two different OS? bobby
|
 |
Matt Gaunt
Ranch Hand
Joined: Sep 05, 2003
Posts: 34
|
|
Hi Bobby, A java application, once written and tested can be run on both a UNIX and Windows operating system. You do not have to alter the code for it to work for different environments. Regards Matt Gaunt
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9956
|
|
There are some caveats to that. it is certainly possible to write some java code that IS system dependent, but this usually means you've used some non-standard classes/packages. You can also write your java to make system calls (i.e. call a program that the OS runs... i.e. on windows, you could call 'dir' to list the files) which would not work across platforms.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
Originally posted by bobby reddy: ...Can the same Java application work on two different OS? ...
Absolutely. This is the idea behind compile once and run anywhere. The thing is: The different platforms must be running their own (OS-specific) Java Virtual Machine (JVM). This is what allows the same compiled bytecode to run on different platforms. As pointed out, JVMs can run on Windows, Mac, Linux...
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
camilo lopes
Ranch Hand
Joined: Aug 08, 2007
Posts: 202
|
|
for examples: Delphi not run in all operation system. Today he give support there are some system as a unix. Java run independent of the plataform that you use. can be unix, mac, windows. not is necessary move one line of the code for this.
|
Brazil - Sun Certified Java Programmer - SCJP 5
http://www.camilolopes.com/ About Java - Update every Week.
Guide SCJP - tips that you need know http://blog.camilolopes.com.br/livrosrevistaspalestras/
|
 |
 |
|
|
subject: Unix + Java
|
|
|