Skip to main content

Trying to get a Java program to run

1 reply [Last post]
kellynshawn06
Offline
Joined: 2009-08-16
Points: 0

I have downloaded the JDK and tried to run a program I have written. When I try to run the program, The black screen comes up and then goes away quickly before I can read it. Can anyone tell me what I am doing wrong or if it might be downloaded incorrectly? My system platform is Windows and I am using Vista. I am also trying to figure out how to create a non-GUI based Java application that calculates weekly pay for an employee. The application should display text that requests the user input the name of the employee, the hourly rate, and the number of hours worked for that week. The application should then print out the name of the employee and the weekly pay amount. In the printout, display the dollar symbol ($) to the left of the weekly pay amount and format the weekly pay amount to display currency. I am having a hard time figuring out how to get a program to do this and how to get the program to run when my system is not working with me or I am doing something wrong.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
weberlin
Offline
Joined: 2004-11-02
Points: 0

For the example of non-GUI based Java application,
there is an "already executable" program on the web,
One can use it to see the environment setup and to know where is wrong.
you can download jL.zip from
http://sites.google.com/site/jlhomesite/
After start it up, select:
Examples -> javase tutorial 1.6 -> trail=Basics -> Group=getStarted -> program=HelloWorldApp