This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

helloworld error  RSS feed

 
tny shariff
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
dear all,
im starting my 1st program java,i saved it as "HelloWorldApp.java". but i cant compile it- the error statement is error: cannot read: HelloWorldApp.java (im using console window)
pls help..
 
Jas Oberai
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Report post to moderator
Throw in your program code...
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
How did you create the file? Did you use a text editor, like Textpad or Notepad, or did you use an RTF editor like Wordpad or a Word Processlor like MS Word? The java compiler can only deal with plain text, so you should only use the first category to work on your Java files.

Of course, somethign more sisister may be going on, so please 1). Post your code and 2). Post the command that you are trying to use to compile it.
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Report post to moderator
If you wrote it using Notepad, it probably append ".txt" to the filename (trying to be helpful). If that's not the case, make sure you saved it where you think you did.

If there's no package statement at the top, it should be in the same directory from which you're compiling. Type "dir" and verify that the file is there and spelled correctly, including case.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!