Hello
When I compile the program it got no errors. But when I try to run it, it doesnot run the program. Need some help please. Thanks a lot
/********************************************************** * Program Name : Lab01 - Calculate Total Spending * Author : Adam Bastola * Date : September 22, 2014 * Course/Section : CSC111 - 111 * Program Description: This program will prompt users to input their * monthly income, and their monthly expenses on rent, phone bill * and utilities. The program will calculate sum for total expenses * and calculate spending money by subtract total expenses from monthly income. * This program will display monthly income, total expenses and spending * money on to the monitor. * * Methods: * ------- * main - calculates the sum, and diff * **********************************************************/ public class Lab1 { static Library myLib; /********************************************************** * Method Name : main * Author : Adam Bastola * Date : September 22, 2014 * Course/Section : CSC111 - 111 * Program Description: This program will prompt users to input their * monthly income, and their monthly expenses on rent, phone bill * and utilities. The program will calculate sum for total expenses * and calculate spending money by subtract total expenses from monthly * income. This program will display monthly income, total expenses and * spending money on to the monitor. * * BEGIN Calc Spending $ * Prompt user for monthly income * Prompt user for rent bill * Prompt user for phone bill * Clear the screen * Calculate total expenses * Calculate Spending $ * Display results * END Calc Spending $ **********************************************************/ public static void main (String [] args) { //local constants //local variables int income; //monthly income input by the user int rent; //expense for rent input by user int phone; //expense for phone input by user int utilities; //expense for utilities input by user int totalExpenses; //sum of expenses on rent, phone and utilities int spending; //diff of income - totalExpenses Library myLib = new Library();//has methods to clear/pause screen /******************** Start main method *****************/ //prompt user for monthly income System.out.println("\n\n"); System.out.print("\tEnter your monthly income : "); income = Keyboard.readInt(); //prompt user for monthly rent System.out.print("\tWhat is your monthly rent: "); rent = Keyboard.readInt(); //prompt user for phone bill System.out.print("\tWhat is your monthly phone bill: "); phone = Keyboard.readInt(); //prompt user for second number System.out.print("\tWhat is your monthly utilities bill: "); utilities = Keyboard.readInt(); //clear the screen myLib.clrscr(); //Calculate Total Expeneses totalExpenses = rent + phone + utilities; //Calculate Spending spending = income - totalExpenses; //display the results of the calculations System.out.println("\n\n\n"); System.out.println("\t Monthly Budget\n"); System.out.println("\tMonthly Income : " + income); System.out.println("\tMonthly Expenses : " + totalExpenses); System.out.println("\tSpending : " + spending); System.out.println("\n\n\n\n\n\n\n\n\n\n\n"); //pause the screen - this statement is not needed in this program //myLib.pause(); } //end main method } //end Lab01[COLOR="Silver"] [/COLOR]
--- Update ---
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lib in java.librar
y.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1857)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at Library.<clinit>(Clrscr.java:8)
at Lab1.main(Lab1.java:60)
Press any key to continue . . .
The above code is displayed when I run it