I'm not sure Oracle JDK is properly packaged in Raspbian (it may not be possible to do so legally). Run
apt-file search $(which java) to see what JRE/JDK package you have installed. If no package is listed,
apt simply doesn't know you have Java, that's why it tries to pull a suitable dependency when you ask it to install Eclipse.
As a short term solution, you cat tell
apt to ignore the dependency you don't want to install:
apt-get install eclipse openjdk7-headless-jre-
This will allow you to install Eclipse and test if it works with the JDK you have. Should that be the case, you'll need a permanent solution which may be one of the following:
- Edit the Eclipse package to remove the unwanted dependency (most probably
default-jre and its alternatives)
- Create an empty package which claims to provide that dependency (or one of the alternatives).
(1) will break when eclipse package is updated and the new version will again want to install
default-jre. Break may be an overstatement since nothing bad should happen, but you'll have that unwanted package installed. (2) may break when you'll want to install another package which needs
default-jre but doesn't cope well with Oracle.
I personally used (2) when I had a system running with a custom version of
dbus, since fixing all the packages listing
dbus as a dependency would have been an unmanageable mess.