my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Java applications, control structures and some general questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java applications, control structures and some general questions" Watch "Java applications, control structures and some general questions" New topic
Author

Java applications, control structures and some general questions

Olakunle Oladipo Oni
Greenhorn

Joined: Aug 28, 2008
Posts: 18
Hi and a beautiful day to someone on this forum. I'm throwing some questions to the open and i'll really appreciate somebody's patience. My question isn't one but a number of them. I just believe we have one thing to learn (however simple) from time to time...

(i) I've created an application program in java. How can i or somebody else run it just by the click of a button i.e without necessarily utilizing the command line utility? I'll appreciate clear answers...

(ii) How can i package my java program in such a way that users can install it on their computers via a cd or storage medium just like most of us install other developed software? Of course, as a pointer to the first question, I'll want it to be run by the click of a button.

(iii) In what particular instance of program design should a do-while construct be appropriate at the expense of the while construct. I'll appreciate if practical instances are given to this question. Is there really a significant difference to using any of these constructs other than just the time in which a construct is accessed in a running program?

(iv)Do i really need the application of stream class and the system class to create an application that can be executed via the command line in which i can input numbers one at a time by pressing 'enter' and incrementing the additions and carry out basic calculations like summation or averaging? In a nutshell, how can i carry out this basic calculations from the command line with a number at a time?

(v) What is the significance of the root directory from the context of the command prompt?


(vi) When the phrase ‘java-enabled browser’ is said in java courses, can the phrase be taken
literally i.e does it mean the browser is actually empowered by java or the other way round. In
other words does it mean that the java interpreter is just a component of the browser software
that is activated once the browser is up and running. This question may appear simplistic but I
just want to be clear.


Olakunle Oni
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

(i) You could create an executable jar file that contains the program. Users who have the JRE installed should then be able to double-click it to start the program.

(ii) There are a number of installer generators for Java. I've used IzPack in the past.

(iii) Sometimes you can make the code cleaner and easier to read by using a do-while instead of a while loop. The difference is ofcourse that in a do-while loop, the conditional expression is checked at the end instead of at the beginning of the loop. It's hard to give a conrete example, but sometimes you'll notice that a do-while is more appropriate.

(iv), (v) I don't understand what you mean here. Better explain it in more detail in a separate topic.

(vi) They probably mean a web browser that is capable of running Java applets.

We prefer that you ask one thread per question, especially if the questions don't really have anything to do with each other - otherwise you'll get a big mega-topic where several discussions are running at the same time.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java applications, control structures and some general questions
 
Similar Threads
Sybase beginner, Need Help
Accessig the properties file from outside the jar file
What IDE Should I use?
configuring editplus
Unicode: cmd parameters (main args); exec parameters; filenames