I\'ve just imported a large amount of source code into Eclipse and basically the package name is no longer valid (the code has been moved folders). Is there a way to select
It is an old question, but I ran into the same problem and wrote a very simple bash script. Hope it will help someone.
for i in *.java; do
sed -i 's/.*package com.example.something;.*/package com.example.something_else;/' $i
done
Basically, the script traverses all java files inside a directory, and each occurrence of package com.example.something; replaces with package com.example.something_else;.