Welcome! Log In Create A New Profile

Advanced

Program 1.1

Posted by 42248280 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Program 1.1
July 10, 2010 03:51PM
i am stragling to create a working directory, i've tried to do this: Creat a Path

MyDirectory;c:\Program Files\Java\jdk1.6.0_21\bin

The following program was stored under MyDirectory with the name SimpleProgram.java
Quote

public class SimpleProgram {
public static void main(string[] args) {

System.out.printIn("A proverb: "winking smiley;

String proverb = "Practice makes perfect: ";
System.out.print(proverb);

int characterCount = proverb.length();
System.out.printIn("The proverb has " + characterCount + "characters."winking smiley;
}
}

javac does compile ok and java does run ok

But if i try to type: javac SimpleProgram.java
the output is:
javac: file not found: SimpleProgram.java
usage: javac <option> <source files>
use -help for list of possible option

WHERE do i go wrong?
Re: Program 1.1
July 10, 2010 09:28PM
Sorry i've got it, i was not writting it in full. I was suppose to type:
cd c:\MyDirectory \ javac SimpleProgram.java
Sorry, only registered users may post in this forum.

Click here to login