This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problems with Eclipse project after replacing hard drive (XP)

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have recently replaced the hard drive and reinstalled Windows XP. Have perhaps done the installs (JRE/Eclipse/JDK) in the wrong order. My attempts to get my Java project working again seem to be moving backwards. javascript:emoticon('');

Also I simply copied the project folder onto an external drive, then copied it back onto the new drive, so any embedded absolute pathnames will be wrong, but assumed that Build or Clean Project would fix that.

Am now in state where build doesn't seem to do anything. Run gives



It all compiles (at least, have corrected all the errors) and there is a "main" declaration.


I installed JDK yesterday (previously only had JRE and it was running OK)

Help!
 
author
Posts: 23879
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely all the build path data is now missing / lost -- what used to be a source directory or package is now simply treated as a regular directory. This is why it can't find your files directory.

Just right click on the directories, and reassign the source directories back...

Henry
 
Malcolm Storey
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The editor finds the files OK, and the "Java Build Path" looks OK: "NWB/src"

But there's a problem with the bin directory:

Description Resource Path Location Type
The project was not built due to "Could not write file: E:\Eclipse Java Projects\NWB\bin.". Fix the problem, then try refreshing this project and building it since it may be inconsistent NWB Unknown Java Problem

When I click on it, Windows says "file or directory is corrupted and unreadable", so not sure how to proceed.

Come to think of it, one of the problems yesterday was that the system asked me to run CHKDSK. Think it was on E:\Eclipse Java Projects\NWB\bin. Ran it on all drives (with the /F) and it completed OK so assumed that was the end of it.
 
Sheriff
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you remove the project (just the project, not the source) and create it again from the existing source?
 
Malcolm Storey
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Created a new project and dragged all the packages into it. That sorted it.

Many thanks (again!) Rob.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic