• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

javac doesn't make any class

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello, i am a java begginer and i have some problem with javac command. This command doesnt create any class even if i pres javac FileName.java.
I have path set to C:\Program Files\Java\jdk1.8.0_121\bin. Can someone help me? Ask for another information if you need.
 
Ranch Hand
Posts: 624
9
BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the ranch
Can you post the exact output after running the command "javac FileName.java"
 
Radu Catalin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ytb is my file name.
ytb.java:3: error: cannot find symbol
               System.out.prinln("How are you");
                               ^
 symbol:   method prinln(String)
 location: variable out of type PrintStream
1 error



i am not sure if command promt show me () ore <> but this is the error i see
an the code if you need is:
class ytb{
public static void main(String args[]){
System.out.prinln("How are you");
}
}
 
Bartender
Posts: 2237
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are not getting the class file because your code does not compile.

The compiler is telling you what the problem is:

ytb.java:3: error: cannot find symbol
               System.out.prinln("How are you");
                               ^
 symbol:   method prinln(String)


Take a close look at the method name. If you mistype one letter the compiler will complain. You need to use a proper method name.
 
Radu Catalin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my code is made from a bucky tutorial. I am very new and i don't know anything about java yet.
If you can give to me a good java program to test is please do it. I think my code is right.
 
Paweł Baczyński
Bartender
Posts: 2237
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it is not right.
And, what is more important, the compiler thinks it is not right.

Read the code in the tutorial very carefully, letter by letter. Are you sure it says prinln?
 
Radu Catalin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, i am preaty blind. Thankx you a lot :3
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The nice thing about the compiler is that it tells you (usually) where the problem is.  If the compiler prints out "error", the compiler pretty much gave up trying to make your .class file.  Regardless of what you think, it's not right.  

Here's a big hint though...if it ever prints out more than one error, ignore ALL the errors but the first one.  Fix it, then re-compile.  Much of the time, making one error confuses the parser, and it just gets more and more confused until it gives up and reports lots of errors.  But the thing is, if you fix the first one, a lot of the time that will un-confuse the parser, and it can then do a better job of reporting the next error.  Sometimes fixing the one error (like a missing curlie bracket) can fix ten reported errors...
 
Marshal
Posts: 80230
424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Radu Catalin wrote:ok, i am preaty blind. . . .

You mustn't worry about it. Many people make that sort of error. Another similar error is writing printIn with an I instead of the l.
 
Radu Catalin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thankx you all. By the way, you think it is a good idea to start to lern java at 15? just ask, i want to hear some opinion about this withou making another topic
 
Campbell Ritchie
Marshal
Posts: 80230
424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Radu Catalin wrote:thankx you all. By the way, you think it is a good idea to start to lern java at 15?

Yes

just ask, i want to hear some opinion about this withou making another topic

It might have been better to create a second thre‍ad.
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic