Java: Changing to another project in Eclipse

Hi,

Caveat: I realize that "Project" may not be the correct term to use per the below...please feel free to correct this Java newbie! :)

In the screenshot below, I want to change the java project on which I'm working from MIT Assignment 1 to Hello Pluto. But, when I click on "Hello Pluto", the MIT Assignment 1 remains on the screen. How do I change?

Also, how do I create an entirely new project? I tried doing SAVE AS on MIT Assignment 1, but it did not seem to create a new project.

switching classes
Thanks,
Steve
LVL 4
Stephen KairysTechnical Writer - ConsultantAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gurpsbassiCommented:
your java files belong to a single project.
If you don't want to see files from the assignment project then right click the project and select 'close project'.

You will then be left with the Hello Pluto project being the only open project. You should not see files from the first project anymore.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
OK thanks. And how to start a new project?
gurpsbassiCommented:
File > new project > Java project
Something like that. Not near my laptop to check.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Stephen KairysTechnical Writer - ConsultantAuthor Commented:
OK, I closed a third project on the panel to the left.

Now, I have to project remaining.

Hello Pluto
MIT Assignment 1.

Right now, MIT Assignment 1's source code displays.

But when I click HELLO PLUTO, I still see the MIT project.

What am I missing? :)
Thanks,
Steve
gurpsbassiCommented:
If you have two open projects, you can see files from both projects. This is the way eclipse works.

I really don't understand the problem. If you have 100 projects and only want to see the source code of 1 of them, then close the other 9 projects.

Job done!
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
But how do I switch the display to show project #2 when I'm looking at #1?
Thanks.
gurpsbassiCommented:
If project 2 is closed, you should not be seeing any of the project 2 files on the display.
mccarlIT Business Systems Analyst / Software DeveloperCommented:
But how do I switch the display to show project #2 when I'm looking at #1?

Basically, only have 1 project open at a time, the one that you are working on. Probably the easiest way to manage it, is if you want to work on Project #1, then right-click on Project #1 and select "Open Project" (if it is not already open) and then again right-click on Project #1 and select "Close Unrelated Projects" and it will close all other projects for you.

Then when you want to work on Project #2, right-click on Project #2 and "Open Project" and then right-click again on Project #2 and "Close Unrelated Projects"
RobOwner (Aidellio)Commented:
In other words, you can't do what you're after.  It would be a "workspace" thing that you're after.  That as you switch between projects, the files that you have open from that previous project would close and the ones you had open previously for the new project would appear.

Someone would argue that they do not want this functionality and they might want both sets of files open while working on multiple projects.  

So the solution here is If you do as the other experts have said, close the project and open a the next project, eclipse should remember the files you had open previously and open them.
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
All,

Thanks for your suggestions. Winding down for the night but will try them tomorrow.

Steve
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
OK. So I now have closed all "unrelated" projects for both the Assignment and Hello Pluto projects.

So...I have NO projects (source code) displayed in the window.

But when I click on either Hello Pluto or Assignment 1, no source code displays at all.

So, what's the quickest way to open (one of) those projects.

Thanks!!
gurpsbassiCommented:
errrrm...try double clicking perhaps?

or right click and open project??

Source code is not going to be visible in the editor pane until you select a file and open it by double clicking on it.
RobOwner (Aidellio)Commented:
In my experience, if you have files for a project open and you close the project (do not close the files), the files close but when you open the project again, those files should also open.
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
Rob,

You mean via FILE --> OPEN?

Thanks.
gurpsbassiCommented:
how about posting a video of what you are actually trying to achieve?
RobOwner (Aidellio)Commented:
I meant File -> Open Project
mccarlIT Business Systems Analyst / Software DeveloperCommented:
I meant File -> Open Project

@Rob, Should that be "Project" -> "Open Project" then?   ;)  (Or has it changed over different versions?)


@Stephen,

As I said in my comment earlier, I find it easier to right-click on the project that you want and select "Open Project" from there. It saves a few clicks.
RobOwner (Aidellio)Commented:
Nope, hasn't changed, you're right. I'm going from memory (which isn't that good *grin*)
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
I'll try the right-click thing tomorrow. About to turn in for the night. Thanks, all :)
Stephen KairysTechnical Writer - ConsultantAuthor Commented:
OK...

With nothing displaying, I used FILE-->OPEN to open HelloPluto.Java. HOWEVER, the project was still apparently NOT OPEN b/c the OPEN PROJECT option is available.

I'm guessing that I'm confusing the concepts of File and Project...

In any event, no rush on your replies. I'm about to go on vacation and will resume looking at this issue when I return. Maybe the break will allow me some clarity :)  Thanks, everyone for your patient help!

Steve
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.