CSC301: Admin: What to do you have lots of red marks in Eclipse [22/56] |
Suppose you had eclipse working and then one day, eclipse looks like this:
Try
"Project" > "Clean..." > "Clean all projects"
If that does not work, try creating a fresh eclipse-workspace.
eclipse-workspace
.oldworkspace
and create a new folder called eclipse-workspace
eclipse-workspace
, create a new folder called algs4
oldworkspace/algs4
to eclipse-workspace/algs4
data lib src
The above works by copying the good files to a new eclipse-workspace. You can also try the following approach, which removes the problemantic files from the exiting eclipse-workspace instead.
Exit eclipse
Using the finder or terminal, remove the following files/directories:
eclipse-workspace/.metadata
eclipse-workspace/algs4/.classpath
eclipse-workspace/algs4/.project
If you are using finder on a mac, you may need to make these files visible. Run Terminal and enter the following two commands:
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder
To switch back, do the same but substitute FALSE
for TRUE
.
Restart eclipse. You should have a blank eclipse-workspace.
Follow the previous instructions to show the
algs4
project, by following the previous instructions
to install the code from class, starting with File > New >
Java Project
If that does not work ensure that you have the correct version of Java installed.
Project -> Properties -> Java build path Project -> Properties -> Java compiler
Preferences -> Java -> Compiler Preferences -> Java -> Installed JREs