This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unix + Java

 
bobby reddy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
Could anyone let me know why Unix is used in combination with Java?

Thanks,
bobby
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bobby,
UNIX is an operating system. Java runs on an operating system. Java can run on UNIX (or Windows or Mac or Linux or ...)
 
bobby reddy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12198
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
camilo lopes
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic