• Post Reply Bookmark Topic Watch Topic
  • New Topic

javac  RSS feed

 
Grigorii Malakhov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I do HelloWorld app, but when you compile the command line, I received a error.

error:cannot read: HelloWorldApp.java
1 error

Help me please!
Thanks in advance!
 
Paweł Baczyński
Bartender
Posts: 2083
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What OS are you using? It looks like you don't have reading permissions on that file.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a file named "HelloWorldApp.java" in your current directory?

Did you save it with Windows Notepad? It might have saved it as "HelloWorldApp.java.txt". Rename it to "HelloWorldApp.java".
 
Grigorii Malakhov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's a screenshot of my screen!
-.gif
[Thumbnail for -.gif]
 
Grigorii Malakhov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper de Jong wrote:Is there a file named "HelloWorldApp.java" in your current directory?

Did you save it with Windows Notepad? It might have saved it as "HelloWorldApp.java.txt". Rename it to "HelloWorldApp.java".


I did everything as you said, but now he gives me another
-.gif
[Thumbnail for -.gif]
screenshot
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is case sensitive. Try javac HelloWorldApp.java (and not HelloWorldApp.JAVA)
Also, like Jesper said, make sure the HelloWorldApp.java is in your current directory.

In future, please do not post screenshots. You can always copy the console text and paste it here (Please UseCodeTags)
 
Grigorii Malakhov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:Java is case sensitive. Try javac HelloWorldApp.java (and not HelloWorldApp.JAVA)
Also, like Jesper said, make sure the HelloWorldApp.java is in your current directory.

In future, please do not post screenshots. You can always copy the console text and paste it here (Please UseCodeTags)



Did all of the writing here is the error which he gave me!

C:\Users\ДИМА>javac HelloWorldApp.java
error: cannot read: HelloWorldApp.java
1 error
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the output for this command?

C:\Users\ДИМА>dir HelloWorldApp.java


 
Grigorii Malakhov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivan Jozsef Balazs wrote:What is the output for this command?

C:\Users\ДИМА>dir HelloWorldApp.java



Here is what he wrote:


C:\Users\ДИМА> dir HelloWorldApp.java
Volume in drive C has no label.
Volume serial number: 1234-1234

The contents of a folder C:\Users\ДИМА

File not found
 
Paweł Baczyński
Bartender
Posts: 2083
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That means exactly what it sais:
There is no HelloWorldApp.java file in C:\Users\ДИМА directory.
Where did you save your file? Maybe it is named HelloWorldApp.java.txt.
Exacute
dir *.java
and then
dir HelloWorldApp*
and paste the results here.
 
Grigorii Malakhov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pawel Pawlowicz wrote:That means exactly what it sais:
There is no HelloWorldApp.java file in C:\Users\ДИМА directory.
Where did you save your file? Maybe it is named HelloWorldApp.java.txt.
Exacute
dir *.java
and then
dir HelloWorldApp*
and paste the results here.


Вот что он написал:

C:\Users\ДИМА>dir HelloWorldApp.java
Volume in drive C has no label.
Volume serial number: 1234-1234

The contents of a folder C:\Users\ДИМА

27.08.2013 19:05 259 HelloWorldApp.java
1 files 259 bytes
0 folders 81 547 264 bytes free
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First you reported this:

Here is what he wrote:
C:\Users\ДИМА> dir HelloWorldApp.java
Volume in drive C has no label.
Volume serial number: 1234-1234
The contents of a folder C:\Users\ДИМА
File not found


And later you reported that:

C:\Users\ДИМА>dir HelloWorldApp.java
Volume in drive C has no label.
Volume serial number: 1234-1234
The contents of a folder C:\Users\ДИМА
27.08.2013 19:05 259 HelloWorldApp.java
1 files 259 bytes
0 folders 81 547 264 bytes free


It is inconsistent. Maybe you created the file in the mean while, but then the previous compilation attempts lost their significance.
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me recommend this reading:
Oracle tutorial

 
Grigorii Malakhov
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Very Much! It worked out!
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.

Hа здоровье!
(I wanted to write something friendly in Russian, but my Russian is weak and seriously limited ...)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!