Results 1 to 5 of 5
Thread: Completely new to Java problem
- 10-08-2008, 06:42 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 2
- Rep Power
- 0
Completely new to Java problem
Hey I am a complete beginner to the wonderful world of java and I have a problem. We are writing the following in notepad:
// Welcome.java: this program prints
// a welcome message
public class Welcome
{
public static void main(String[] args)
{
System.out.println("Welcome to Java");
}
}
and we are opening it using command prompt. The instructions are to save the file as Welcome.java as all files in the Java folder in the C:. We are then instructed to type H:. When I type this i get the message 'The system cannot find the drive specified.' I instead tried to type 'C:' and this was ok until i came to the next instruction where we are instructed to type 'cd Java'. I get the same error message that 'The system cannot find the drive specified.'
There are a few more instructions after this. I was able to these commands no bother last week in the practical on the computers in the college. I bought a laptop yesterday and the instructers installed java for me on it. I tried to do this exercise on my laptop earlier and cannot figure out what I am doing wrong.
I apologise for my amature ways but I would appreciate your help. Thanks
- 10-08-2008, 06:58 PM #2
Senior Member
- Join Date
- Aug 2008
- Location
- Stockholm, Sweden
- Posts
- 119
- Rep Power
- 0
This has nothing to do with Java really. H: corresponds to a hard drive on your computer, which most likely is something else on your own computer.
Find out where your java files are saved (you choose that yourself with Save as in Notepad) and change to that directory in the command prompt.
E.g. if you save your files in c:\some directory\some other directory\java, you would do
- c:
- cd \some directory\some other directory
- Compile and run the program.
If you have further problems, you should really check a Windows forum, since this has to do with the command prompt, not Java.
- 10-08-2008, 07:01 PM #3
I assume that you are on a MS Windows system?
Who gave you/where did you get the instructions you describe?
They obviously assumed you knew a few DOS commands. There must be doc somewhere for how to use DOS commands. Have you tried Google?
Do you have any friends that know how to use the computer at this level? With DOS commands. See if you can find a Tutorial for them.
- 10-09-2008, 05:19 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
- 10-09-2008, 12:50 PM #5
Member
- Join Date
- Oct 2008
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Java problem
By grend in forum New To JavaReplies: 5Last Post: 08-18-2008, 11:44 PM -
Problem in java
By saytri in forum New To JavaReplies: 4Last Post: 01-16-2008, 10:09 PM -
Files not completely deleted on Linux
By amamare in forum Advanced JavaReplies: 0Last Post: 12-19-2007, 02:12 PM -
I am completely stuck
By jpnym15 in forum New To JavaReplies: 2Last Post: 11-14-2007, 06:40 PM -
JAVA if problem
By toby in forum New To JavaReplies: 2Last Post: 07-25-2007, 07:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks