• Post Reply Bookmark Topic Watch Topic
  • New Topic

No compilation error, no class file produced  RSS feed

 
nick woodward
Ranch Hand
Posts: 382
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another day another question if you guys don't mind!

Its not a problem to be solved (I can do that), just a question about why I'm not getting the usual error msgs.

I've a .java file that won't compile, but produces no errors (in cmd prompt).

I think its the import of java.util.ArrayList thats causing the problem (because it can compile a different file in the same source folder) - so i'm assuming its the classpath that is wrong. which is fine. i love fighting with classpaths.

But why isn't it providing me with an error. the compiler usually goes bat-sh.. crazy if the -cp is incorrect!


Nick

** solved i think ** its because I'm switching between command prompt and a text editor and it hadn't saved the file for some reason, and still won't am getting rid of this editor!!
 
Derik Davenport
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose you are not allowed to use an IDE like NetBeans or Eclipse?
 
nick woodward
Ranch Hand
Posts: 382
12
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Derik Davenport wrote:I suppose you are not allowed to use an IDE like NetBeans or Eclipse?


i don't allow myself to use it

tbh i am a million times better with the compiler because of it. but yeah it feels like a slog sometimes!

it was because the compiler was compiling an empty file, even though the editor was telling me the file was saved (with the correct extension)
 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree Nick, I think you are doing the right thing. When your starting out it's good to use a text editor and compile by hand (assuming you have a text editor that does actually save your work for you). You get a much better understanding of compilation, classpaths etc and apart from those benefits trying to learn a new language and how to use an IDE at the same time just makes the whole process even more confusing and frustrating.

My advice is get a good feel for the language and only when you are comfortable using it should you consider an IDE. Of course then you have the problem of which IDE to choose but that's a whole different issue.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!