Login  |  Register
Articles Exposed  - Article Details

Java Application Development with Linux platform

Date Added: October 13, 2009 01:14:38 PM
Author: allis
Category: Computing: Programming

As know in the Java Developers community, Java is a platform independent object oriented language which runs on every platform. That is why it is said for Java that “Compile once, run anywhere” language.

 

But when the term “anywhere” had been used, they must have some specific platforms described. If we are running Java Application on Linux then something arise in mind that which context and environment I’m into?

 

A Java developer new to Linux plat form may wonder about whether or not and if yes then how Java can find the environment on Linux platform? In particular four things to get on Linux platform:

  • Command-line parameters
  • Current shell’s environment variables
  • Location of data files
  • Current working directory

 

The answer to all these factors varies on different cases like of which kind your Java application would be and how portable you want Java application to be.

 

The basic external information is supplied by program invocation. It may be simple parameters or arguments. This information can direct a program to flexibility and execution.

 

Command-Line Arguments

When a program is run from the command line, more than just the program name can be supplied. Here are some examples:

 

$ javac example.java

$ mv Acct.java core/Account.java

$ ls –l

 

In the first example, we invoked a program called Javac and gave it the parameter example.java, the name of the file containing the Java program that we want Javac to compile to Java byte code The mv got two commandline arguments, Acct.java and core/Account.java, which look a lot lik ...


Ratings:

Average rating: ( votes)

Comments:

STATISTICS
  • Active Articles: 2139
  • Pending Articles: 2340
  • Todays Articles: 0
  • Total Categories: 33
  • Sub Categories: 134