标签归档:JDK

NetBeans出现Cannot locate java installation in specified jdkhome: *错误的解决办法

最近重装了系统,安装了最新版本的JavaJDK,结果早期安装的NetBeans6.9.1不能用了,在更新jdk版本后,启动netbeans 出现 Cannot locate java installation in specified jdkhome: ***错误的解决办法,***是以前jdk的版本所在目录,解决的方法很简单:C:Program FilesNetBeans 6.9.1etcnetbeans.conf ,或者你自己的安装目录下的etcnetbeans.conf文件内,找到对应的配置信息,修改为新的jdk目录即可。

好吧,应人要求说详细一点,下面是配置文件:

# ${HOME} will be replaced by JVM user.home system property

netbeans_default_userdir=”${HOME}/.netbeans/7.0″

# Options used by NetBeans launcher by default, can be overridden by explicit
# command line switches:
netbeans_default_options=”-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=384m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true”
# Note that a default -Xmx is selected for you automatically.
# You can find this value in var/log/messages.log file in your userdir.
# The automatically selected value can be overridden by specifying -J-Xmx here
# or on the command line.

# If you specify the heap size (-Xmx) explicitly, you may also want to enable
# Concurrent Mark & Sweep garbage collector. In such case add the following
# options to the netbeans_default_options:
# -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
# (see http://wiki.netbeans.org/FaqGCPauses)

# Default location of JDK, can be overridden by using –jdkhome <dir>:
netbeans_jdkhome=”C:Program FilesJavajdk1.6.0_24″   //=====我指的位置就是这个地方,改成你JDK的位置就可以了=====

# Additional module clusters, using ${path.separator} (‘;’ on Windows or ‘:’ on Unix):
#netbeans_extraclusters=”/absolute/path/to/cluster1:/absolute/path/to/cluster2″

# If you have some problems with detect of proxy settings, you may want to enable
# detect the proxy settings provided by JDK5 or higher.
# In such case add -J-Djava.net.useSystemProxies=true to the netbeans_default_options.

CentOS Linux下安装JDK笔记

JDK(Java Development Kit)是Sun Microsystems针对Java开发员的产品。自从Java推出以来,JDK已经成为使用最广泛的Java SDK。JDK 是整个Java的核心,包括了Java运行环境,Java工具和Java基础的类库。下面我们就来学习如何在CentOS系统下安装 JDK。
一、CentOS系统创建安装目录
#mkdir /usr/java
二、下载
先去 java.sun.com 网站寻找到 最新jdk(JDK 6 Update 16)的下载地址:
http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u16-linux-i586.bin?BundledLineItemUUID=OTVIBe.lL.YAAAEjJWElLW8e&OrderID=XAtIBe.lVDEAAAEjE2ElLW8e&ProductID=Dx1IBe.prBgAAAEirRcTvuC_&FileName=/jdk-6u16-linux-i586.bin
在当前目录下(/usr/java)执行:
wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u16-linux-i586.bin?BundledLineItemUUID=OTVIBe.lL.YAAAEjJWElLW8e&OrderID=XAtIBe.lVDEAAAEjE2ElLW8e&ProductID=Dx1IBe.prBgAAAEirRcTvuC_&FileName=/jdk-6u16-linux-i586.bin
可以喝杯水,慢慢等待……
三、在CentOS系统中安装
下载完成之后执行命令,即可拥有对 .bin文件的执行权限
chmod 777 *.bin
然后输入执行安装:
./*.bin

继续阅读