Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A package related Issue in Eclipse platform

 
Ronish Cheenath Raphael
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

V have a problem regarding package name when v work with eclipse 3.1. Issue can be described as follows.


If the class name and the package name are the same in a folder, is there will be any conflict between these while using it. That means suppose a folder named 'animator' contain a package 'a' and a class name 'a'. I got any error in the 'Eclipse' tool that "a collides with a package". Is this can be solved by any change of setting in Eclipse? If then where can i change.? Can anybody help me to solve this issue??


example : Animator----mainfolder
-----Pack1 -- sub folder
-----PackClass.java -- class
-----PackClass -- subfolder/package
-----Pack1.java --class


if v importing PackClass to my Pack1.java class like

(import Pack1.PackClass) an error comes in Eclipse as

"conflict with package name"

But when v tried the same from dos promt ..its woking fine with out
any issue.

So I welcome ur replys,


thankxs In advance
 
Scheepers de Bruin
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try capital A.

It's good practice to have class names start with a capital letter and instances of them not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic