当前位置: 代码迷 >> Java相关 >> linux下如何安装eclipse
  详细解决方案

linux下如何安装eclipse

热度:596   发布时间:2013-12-07 21:28:33.0

步骤如下:
安装jdk,我安装的是1.6。装完设置环境变量。不会的话,到网上搜一下。
安装eclipse。
我使用的是fedora core 7,在图形界面下安装。
因为网上的帖子写的很清楚,也很简单,我就解压后直接允许,却弹出个出错的对话框。
这个网上几乎没有说明,因为还没有人用这么"先进的“操作系统。
顺便提一下,在下安装的eclipse的全称是eclipse-jee-europa-fall2-linux-gtk.tar.gz。
但我主义到有个安全提示。第一次没有留意,总得意思是selinux阻止了eclipse读取别的目录下的文件,我也没有仔细研究。晚上睡了一觉,第二天重复,还是上面的错误,网上对这种错误也没有说。错误大概如下:

SELinux is preventing /usr/local/eclipse/eclipse from loading /usr/local/jdk1.6.0_02/jre/lib/i386/client/libjvm.so which requires text relocation.Detailed DescriptionThe /usr/local/eclipse/eclipse application attempted to load /usr/local/jdk1.6.0_02/jre/lib/i386/client/libjvm.so which requires text relocation. This is a potential security problem. Most libraries do not need this permission. Libraries are sometimes coded incorrectly and request this permission. The SELinux Memory Protection Tests web page explains how to remove this requirement. You can configure SELinux temporarily to allow /usr/local/jdk1.6.0_02/jre/lib/i386/client/libjvm.so to use relocation as a workaround, until the library is fixed. Please file a bug report against this package.Allowing AccessIf you trust /usr/local/jdk1.6.0_02/jre/lib/i386/client/libjvm.so to run correctly, you can change the file context to textrel_shlib_t. "chcon -t textrel_shlib_t /usr/local/jdk1.6.0_02/jre/lib/i386/client/libjvm.so"

The following command will allow this access:chcon -t textrel_shlib_t /usr/local/jdk1.6.0_02/jre/lib/i386/client/libjvm.so

请注意画线的提示,它提示我们如果想允许eclipse访问那个目录,使用这个命令。

我就照着命令做了一下,就ok了。

  相关解决方案