Results 1 to 5 of 5
  1. #1
    Seamo14 is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

    Default 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

  2. #2
    ojn
    ojn is offline Senior Member
    Join Date
    Sep 2008
    Location
    Stockholm, Sweden
    Posts
    119
    Rep Power
    0

    Default

    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
    1. c:
    2. cd \some directory\some other directory
    3. 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.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,903
    Rep Power
    25

    Default

    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.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  5. #5
    Seamo14 is offline Member
    Join Date
    Oct 2008
    Posts
    2
    Rep Power
    0

Similar Threads

  1. Java problem
    By grend in forum New To Java
    Replies: 5
    Last Post: 08-19-2008, 12:44 AM
  2. Problem in java
    By saytri in forum New To Java
    Replies: 4
    Last Post: 01-16-2008, 11:09 PM
  3. Files not completely deleted on Linux
    By amamare in forum Advanced Java
    Replies: 0
    Last Post: 12-19-2007, 03:12 PM
  4. I am completely stuck
    By jpnym15 in forum New To Java
    Replies: 2
    Last Post: 11-14-2007, 07:40 PM
  5. JAVA if problem
    By toby in forum New To Java
    Replies: 2
    Last Post: 07-25-2007, 08:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •