views:

63

answers:

2

Hi, I installed opensolaris I saw that it has /usr/jdk/jdk1.6 however it had no bin/javac only java

my default java -version is jdk1.6 just after opensolaris installation however as I have no javac I downloaded jdk1.6 for solaris and after executing the jdk1.6xx.sh i did cd to the folder of jdk and then inside bin directory I ran javac however its giving me NoClassDefFoundError java/lang/Object. (same thing happened to me on a regular solaris installation). anyone can tell me how am i supposed to have a working jdk1.6 with javac on opensolaris? Thanks

A: 

What is the value of your JAVA_HOME environment variable? And did you remember to append that to your PATH?

TMN
i'm not sure because you see I don't have the jdk installed so i have got no javac so i don't know where and if i have somewhere to point my JAVA_HOME to...
Jason
A: 
alanc
pkg search javac gives me stuff like this:basename link usr/bin/javac pkg:/[email protected]
Jason
when trying to install with pkg intall jdk or SUNWjdk it says that it cannot find them try relatxing the pattern, also when I did pkg search javac it wrote: basename link usr/bin/javac pkg:/[email protected] however when I went to the base directories where I have extracted the jdk1.6 tar.Z and tried to do pkgadd -d . SUNWj6dvx WUNWj6dmx SNWj6rtx then its saying Installation of SUNWj6dvx was successful however javac results with no such command again, can you help please?
Jason
Since pkg search identified SUNWj6dev as the package name, the command would be `pkg install SUNWj6dev` (the *pkg:/* is optional). Also 0.91 is a very very old developer build (it was part way between the 2008.05 and 2008.11 stable releases) - seems strange to be using if you just installed it.
alanc
hiis there a way for me to just update my opensolaris or just download a more newer version (I downloaded opensolaris from its website...) so that when I do pkg search javac and then pfexec pkg install jdk it will just work as you suggested? (I can "reformat my computer' and install whatever you suggest!
Jason
`pkg image-update` should upgrade you to a newer version - there's lots of details on http://opensolaris.org/
alanc