This was a problem faced by my friend. He happens to use only JAVA that too JAVAC. He does not like to use Netbeans I don’t know why. And he said that it was the only problem that stopped him from using Linux. So I decided to help him. These were some links which were really helpful.
http://en.opensuse.org/Installing_Sun%27s_Java_on_SUSE_Linux (to be more precise)
The problem was that the openJDK which provides JAVC which is the default installation on openSUSE is different from JAVAC provided by SUN because the same Hello World program which compiled on SUN’s JAVAC failed to compile on openJDK’s JAVAC.
The details can be found out here http://lug.nitdgp.ac.in/wiki/index.php/How_to_use_Java_on_Linux
The repositories described there are Local to our college you can use your package manager to locate the packages. For openSUSE users sun’s packages are in Non-OSS repo