Edit: an easier method is here at the top, but the stuff about
control files from the full original answer is still relevant, so I am keeping it below the horizontal rule.
make-jpkg already made an Oracle Java .deb file, you could extract it, modify its
control file like below to add
provides directives, re-pack it, and install the modified deb..
equivs, one can create a dummy package which basically acts to make dpkg think something is installed.
A good example of how to start using 'equivs' is written here.
Officially you should start with
equivs-control <:pkgname> which
will create a file
pkgname in the current directory. Inside are
various fields but you only need eight and can simply delete the rest.
Here's approximately what you should end up with for a fictional
Maintainer: Your Name <firstname.lastname@example.org>
Description: fake pkgname to block a dumb dependency
To do this for Oracle Java, and make it act as a substitute for openjdk (which it appears is a dependency of
icedtea-netx in sid, which I use), I think you need to set the
provides: entry in the dpkg configuration. So your control file would look something like:
Maintainer: Joe Bob <email@example.com>
Description: dummy Java package to let the system know Oracle JDK is OK to use
Provides: openjdk-7-jdk, openjdk-7-jre, openjdk-7-jre-headless
Note the addition of the last line. If I could do colored text in markdown, I'd color it red for emphasis.
Then, according to the blog post linked above:
Having done this, all you need do is issue the command
equivs-build path-to-pkgname (preferably from the same directory) and you get a fake deb to install with
dpkg -i. Say goodbye to the dependency.
For details on the
provides directive, see:
Note that I'm not sure which version of debian you're using, so I don't know if OpenJDK 7, 8, or something else is dependent on icedtea.
You should probably install IcedTea at the very least, since I don't think Oracle's JDK has a web plugin. But if you wanted, and you were certain it wouldn't break anything, you could add icedtea as 'provided', too. The package name is (I think - it depends on your Debian release)