The basic problem not mentioned by OP is that Java7 is considered obsolete; Java8 has been current since last spring. So, in the background we might assume that OP wants to put Java7 in a directory under /opt named for the given version.
It would be nice if the OpenJDK package were relocatable. The possibility of relocatable packages is mentioned here and there:
It is not: I was curious, and tried using the --installroot option of dnf ("same" as yum, but again, the latter is deprecated on Fedora22).
If you install Java7 on a system where you already have Java8, your package system may change the symbolic links for /usr/bin/java and/or /etc/alternatives/java to point to the newest install of Java.
Aside from that, it seems that the various systems where you might want to install OpenJDK have packaged it to avoid conflict.
With Fedora, for instance, the package java-1.7.0-openjdk-headless contains Java7's JRE. (If you need the development package, that would be java-1.7.0-openjdk-devel):
As suggested, you could make a symbolic link from /opt to the location in /usr/lib/jvm where your Java resides. Your PATH would have to have /opt/java1.7/bin and/or /opt/java1.7/jre/bin, depending on whether you want the development- or runtime-packages.
You should not construct the symbolic link in a manner that would eliminate the /bin leaf. The reason for this is that the executables are built using the rpath option so that the linker can find the required Java shared library based on the location of the executable. Incidentally, that is why the symbolic link works. Doing objdump -axh on the java executable shows (among other things) something like this:
Dynamic Section:
NEEDED libpthread.so.0
NEEDED libz.so.1
NEEDED libjli.so
NEEDED libdl.so.2
NEEDED libc.so.6
SONAME lib.so
RPATH $ORIGIN/../lib/amd64/jli:$ORIGIN/../lib/amd64
Because of this use of rpath, it would be possible to move the entire directory from /usr/lib/jvm to /opt and rename it in that location. Doing this has the drawback that package updates would not work, but it would succeed in "installing" Java7 in that location.