This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bad class file

 
Arul Jose
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote the following classes

packclass.java


accesspack.java


When I compiled, I get the following error message



I could not get what the error is ...
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[aruljose@aruljose javatry]$ ls newpack/
packclass.class

Can you please do a "ls ." ?
packclass.java should be in newpack/
[ February 14, 2006: Message edited by: Satou kurinosuke ]
 
Arul Jose
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it did work. thanks.

but do we need the source file?

the class file is not enough?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need the source file, but you have to remove it from the current directory. The compiler will try to compile packclass.java if it finds it in the same directory as accesspack.java
 
John Dell'Oso
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arul,

I'd just like to make a comment on style.

Even though your class names don't break any Java compiler rules, there is a generally accepted standard that suggests that class names begin with a capital letter. If the class name is a combination of nouns (a noun phrase for the lack of a better term) each beginning letter of the name should be a capital. So in your case:

use Accesspack or AccessPack instead of accesspack.

Regards,
JD
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic