Depending on how you have Java 6 installed, the answer might be slightly different.
When installing Java through
apt-get, the installation scripts will typically leverage the Debian alternatives system. The Debian alternatives system is just a simple solution to having multiple runtimes/versions of multiple applications on the same system by creating symbolic links in different locations.
Please note that if you installed Java from binary or source, that this might not apply (unless you configured it yourself).
To check to see if java is leveraging alternatives, run
update-alternatives --list java. This will either return:
update-alternatives: error: no alternatives for java.
java - auto mode
link currently points to /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java
/usr/lib/jvm/java-6-openjdk-i386/jre/bin/java - priority 1061
slave java.1.gz: /usr/lib/jvm/java-6-openjdk-i386/jre/man/man1/java.1.gz
/usr/lib/jvm/java-7-openjdk-i386/jre/bin/java - priority 1051
slave java.1.gz: /usr/lib/jvm/java-7-openjdk-i386/jre/man/man1/java.1.gz
Current 'best' version is '/usr/lib/jvm/java-6-openjdk-i386/jre/bin/java'.
If your java installation is leveraging the alternatives system, you can easily install multiple versions without disturbing the existing runtime. In the above example, I have two versions of Java installed, openjdk6 and openjdk7. If I just run
/usr/bin/java -version, I am going to get the "best" alternative, which is currently pointing to openjdk6. I can also switch what "best" alternative to use, so that all applications that use the default
java will point to one or the other.
In summary, if your application is explicitly calling the java binary (and not the alternative) then you're fine. If your application is using
/usr/bin/java, then you want to make sure that installing another java version doesn't conflict with the system alternatives.
To find out more about alternatives and all the fun things you can do with them, take a look at the manual with
tl;dr No, they shouldn't conflict. Make sure that anything that depends on Java 6 or Java 7 is using the actual binary (not a symbolic link), as just running
/usr/bin/java can have different results based on what your system alternatives look like.