在opensolaris上安装jdk1.6
我安装了 opensolaris 我看到它有 /usr/jdk/jdk1.6 但是它没有 bin/javac 只有 java
我的默认 java -版本是 jdk1.6 在 opensolaris 安装之后但是因为我没有 javac 我下载了 jdk1.6在solaris上执行jdk1.6xx.sh后,我cd到了jdk的文件夹,然后在bin目录中我运行了javac,但是它给了我NoClassDefFoundError java/lang/Object。 (在常规的 Solaris 安装中,同样的事情也发生在我身上)。 任何人都可以告诉我如何在 opensolaris 上使用 javac 运行 jdk1.6? 谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
OpenSolaris 仅包含开箱即用的 Java 运行时 (JRE) - 开发人员工具,例如 C、C++ 和 C++ 编译器。 Java 不适合 LiveCD,因此从包存储库安装。
pkg search javac
将显示 javac 命令可用的包 - 如果您使用的是最新的开发版本,它将位于“developer/java/jdk”包中,或简称为“jdk”,因此您可以使用
pfexec pkg install jdk
进行安装。在较旧的版本(例如 2009.06 稳定版本)上,软件包名称将类似于“SUNWjdk”。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.您的 JAVA_HOME 环境变量的值是多少?您是否记得将其附加到您的路径中?
What is the value of your JAVA_HOME environment variable? And did you remember to append that to your PATH?
在 OpenSolaris(或 OpenIndiana)上安装 JDK 非常简单,您需要使用
我的一篇文章(西班牙语)介绍所有过程,
http://sparcki.blogspot.com/2010/05/instalar-java-jdk-en-opensolaris.html
Urko,
Install JDK on OpenSolaris (or OpenIndiana) is quite simple, you need to use
I've a post (in Spanish) with all the process,
http://sparcki.blogspot.com/2010/05/instalar-java-jdk-en-opensolaris.html
Urko,