• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unix + Java

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,
Could anyone let me know why Unix is used in combination with Java?

Thanks,
bobby
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic