File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Problems regarding Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Problems regarding Eclipse" Watch "Problems regarding Eclipse" New topic

Problems regarding Eclipse

Nitya Sundar

Joined: Nov 13, 2012
Posts: 15
please help me?when ever i am creating a class in a project folder every time it is showing two class file(.java file) with the same to resolve this problem?for example if i create class A then Eclipse is creating the same class A below it with the same name as class A.thanks in advance...
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
it must be in different folder. Eclipse has concept of showing contents under soruce folder, plus you can the same in real folder (with different name)

Add a snapshot will illustrate your problem clearly.

SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog-
Nitya Sundar

Joined: Nov 13, 2012
Posts: 15
please bear me if any mistake i have done over here as i am new to this can see here the same file is automatically created.and if you delete the one than the other one also get deleted.i need only single java file.

[Thumbnail for Capture.PNG]

Peter Johnson

Joined: May 14, 2008
Posts: 5852

This is an artifact of the way Eclipse displays source files. It lets you see the file within a directory structure (the you have highlighted), and it also presents a view where source files are grouped by package (the within the "(default package)" group. These are just two views of the exact same file.

I don't know why you don't also see twice: it could be due to the type of project you created, or it could be due to the fact that you are creating classes without packages (which is frowned upon, you should always have a package statement as the first line of your source file.)

JBoss In Action
Nitya Sundar

Joined: Nov 13, 2012
Posts: 15
Thanks Peter.I just wanted to know why it was showing.
I agree. Here's the link:
subject: Problems regarding Eclipse
It's not a secret anymore!