Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Java Eclipse File History

+15 votes
As a student who continually struggles to save and share the proper way, I force myself to ask this question. Much like how internet browsers provide a history tab to travel back in time and re-visit opened links, is there a way to do this in Java so that you can open files worked on in the past?

It makes sense because I can SAVE documents on Java, but I can't find these documents on my own device when I need them later.
asked Jan 8, 2016 in (Winter 15-16) by Kenaniah Saunders (100 points)
This is the same problem I am experiencing.

1 Answer

+7 votes
Best answer

When you log in to Eclipse, you choose a Workspace folder.  The workspace folder stores all of the project folders in it, and each project stores (generally inside the "src" subfolder) the individual .java files that make up the Java programs that you write. 

In the computer labs, you should be choosing "H:\CSC211" for the workspace.  If you accidentally choose a different one (like H:\CSC212) then it will create that folder as an empty workspace without any projects in it yet.  If you create a project there, it will be stored there.)

In general, as long as you ALWAYS use the same workspace, then all of your projects and .java files from the beginning of the term will ALL be visible to you in your workspace.

So often when students "lose" .java files, it turns out they are sitting in a different workspace folder.  As long as you chose a workspace on the H: network drive somewhere, you should be able to find it again (from ANY Augustana lab computer).  If, somehow, you managed to choose a workspace folder on the C:\ drive, you could be in trouble, because the lab computers' hard drives get wiped every time they reboot.  However, C: isn't one of the default dropdown options, so this is really not likely.  

Another way students "lose" their files is by working on both the lab computers and their own computers, and forgetting which one they used, because  the files are in your H:\CSC211 folder are different from the files on your own laptop.

If you installed Eclipse on your own computer, then you probably may have used the default workspace folder, which is usually a subfolder of your "home" user folder.  (You may have chosen "always use this workspace" folder, so it no longer asks you every time you launch Eclipse... but it's still using whatever workspace folder you chose earlier!)  On Windows, this folder is likely:


On Mac, it's probably:


Also, on your home computers, you should be able to go to File->Switch Workspace and it should list the workspaces that you've previously used.

Hope this helps!

answered Jan 9, 2016 by Forrest Stonedahl (100 points)
selected Jan 10, 2016 by Kenaniah Saunders
Dr. Stonedahl, you are a god among men. This whole time I was using the C:/User/User/Workspace workspace instead of the C:/User/User/Eclipse.
I will send you the Owl Project ASAP.
A god among men?  No, actually I'm just a wizard among muggles...  Glad this helped.