Help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Help

  1. #1
    Join Date
    May 2004
    Posts
    5

    Help

    Hello

    I'm new to Java, and running XP professional and I just installed the SDK (jssdk1.4.2_04), but each time I go into comand prompt and tries to compile a simple a comand line program it always comes back with this message

    error:cannot read: Initialise.java
    1 error

    I've unistalled and reinstalled it just won't work, can some one please help me out
    Thank you

  2. #2
    Join Date
    Sep 2002
    Posts
    124
    Hello.

    Is the file you're trying to compile called "initialise.java" ?

    If so, make 100% certain that is what WinXP thinks it is called. A common stumbling block is using Notepad as your editor, when you come to save your class file, it often defaults to "initialise.java.txt"

    If that is the case, when you save a class file make sure you select SAVE AS "all files" in NOTEPAD.

    Hop this helps.
    JM

  3. #3
    Join Date
    May 2004
    Posts
    5
    Hello
    Thank you for your reply I have checked the file I want to compile and corrected it to make sure it is a .java file, but I'm still having the same problem. I am doing a project and not allowed to use any other tool other than notepad. Do you any idea of what I can do? Thank you

  4. #4
    Join Date
    Sep 2002
    Posts
    124
    Hello again.

    Sorry to keep on about the file extensions thing, but the error you're getting still seems related to it.

    Open Windows Explorer and click TOOLS and then FOLDER OPTIONS and then VIEW .. if there is a check ( or tick ) mark in the box next to "hide extensions for known file types" remove it and click OK.

    Now have another look at your class file... does it still only say "initialise.java" ?

  5. #5
    Join Date
    May 2004
    Posts
    5
    Thank you, I have done that and checked the file again, it says
    Initialise.java then under it says JAVA file.

    I think it should be Initialise and then JAVA file but i don't know how to fix this thank you

  6. #6
    Join Date
    Feb 2004
    Posts
    541
    when you go in save as look in the drop down menu of file types. Is .java one of the file types in there? If it is then select it and save the file as Initialise. That might help.

  7. #7
    Join Date
    Jun 2004
    Posts
    12
    ok...this may be one of the probs that I had at first

    are you saving Initialise.java in C:\j2sdk1.4.2_04\bin?
    If not...that is your problem....you have to save the file in that folder(change the C to whatever your harddrive letter is). Hope that solves your problem.

  8. #8
    Join Date
    Feb 2004
    Posts
    808
    Originally posted by shimano55
    ok...this may be one of the probs that I had at first

    are you saving Initialise.java in C:\j2sdk1.4.2_04\bin?
    If not...that is your problem....you have to save the file in that folder(change the C to whatever your harddrive letter is). Hope that solves your problem.
    please do not advise users to do this; it is incorrect.
    if you are doing this, then stop, and take a moment to read the installation instructions:
    http://java.sun.com/j2se/1.4.2/install-windows.html

    additionally, you should add the "current directory" to the classpath, by appending ;. (semicolon followed by period) to whatever the classpath is already.
    details on editing the classpath can be found at:
    http://java.sun.com/j2se/1.3/docs/to...classpath.html
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center