Reputation: 15103
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
Upvotes: 0
Views: 1703
Reputation: 186
Install JDK on OpenSolaris (or OpenIndiana) is quite simple, you need to use
$ pfexec pkg install jdk
$ pfexec pkg install jdk64
I've a post (in Spanish) with all the process,
http://sparcki.blogspot.com/2010/05/instalar-java-jdk-en-opensolaris.html
Urko,
Upvotes: 0
Reputation: 4170
OpenSolaris includes just the Java Runtime (JRE) out of the box - developer tools like compilers for C, C++, & Java don't fit on the LiveCD so are installed from the package repository.
pkg search javac
will show the packages available with the javac command - if you're using the latest development builds, it will be in the “developer/java/jdk” package,
or “jdk” for short, so you could install with pfexec pkg install jdk
. On older builds, like the 2009.06 stable release, the package name will be something like “SUNWjdk” instead.
Upvotes: 1
Reputation: 3070
What is the value of your JAVA_HOME environment variable? And did you remember to append that to your PATH?
Upvotes: 0