I'm running java 7 on one of my Solaris servers. We need to run updates but when we do java 8 tries to install itself. This wouldn't be a big deal but it conflicts with another application we have running for some reason. Therefore, I am stuck using java 7 for the time being.
Is it possible to ignore java updates when I run pkg update? I am new to solaris and any help would be appreciated.
No, you can't ignore specific updates, and you need to be aware that the system itself may require a newer version of Java for its own use (some of Solaris' own components use Java).
I assume what your actual issue is not so much that Java 8 is being installed, but that you want /usr/bin/java to point at java7 by default. You can do that by using the "pkg set-mediator" command as documented here:
https://docs.oracle.com/cd/E53394_01/html/E54739/gmagn.html
So, in your case, after applying the update and after rebooting, you could do this:
pkg set-mediator -V 1.8 java
Be aware that once Java 7 is removed from Solaris (at some future date, that will likely happen), you would then need to manually reset the mediator:
pkg unset-mediator -V java
...so that it reverts to the system default.
Ultimately, your best option is as the other poster suggested -- use your own custom installation of Java for applications if you require a specific version. The Java package found in Solaris is primarily for the use of the operating system, not applications, and is updated frequently.