• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in Compile  RSS feed

 
Firoz Noor
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends

I am new in Java. I use TextPad to write the code & I save in a folder. Before when I used to save the source code with one name, with the same name it would creat a class file after compilation. But now this class file is not creating & showing so many errors. Regarding this Expecting your help.

Ex : Source code name is Prime.Java
after compilation new file prime.class
 
Will Hoskins
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Might the editor be adding ".txt" to the file name you give it? If you start with Prime.java, does the editor write Prime.java.txt?

2. In your example you refer to Prime.Jave but prime.class. If the name starts with capital P then you should javac Prime.java and this should create Prime.class also with a capital.
[ February 10, 2008: Message edited by: Will Hoskins ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Firoz Noor:
...now this class file is not creating & showing so many errors...

Can you please post the error messages?
 
Firoz Noor
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Will Hoskins:
1. Might the editor be adding ".txt" to the file name you give it? If you start with Prime.java, does the editor write Prime.java.txt?

2. In your example you refer to Prime.Jave but prime.class. If the name starts with capital P then you should javac Prime.java and this should create Prime.class also with a capital.

[ February 10, 2008: Message edited by: Will Hoskins ]


Dear Friend

Many thanks for your reply. No its not adding the " .txt" to the file. now after compilation the file with " xxx .class " extention not creating but before it were creating automatically. I belive that Classpath changed. If so how can I change the classpath & it will be like before, once again like to say thanks.
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is unusual for a classpath to change without warning. Have you sorted out the error Will Hoskins pointed out yet? If that hasn't helped, then please post more details; it is difficult to know what is going on from the little you have told us.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!