注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

一个博客

两个标题

 
 
 

日志

 
 

eclipse java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin  

2008-03-02 05:31:48|  分类: JAVA |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

How to run Eclipse 3.3 on Ubuntu 7.10

Problem description

Standard Ubuntu Gutsy installation does not support Eclipse 3.3 in its package repository, only 3.2 is available.

For whom is this article? (target audience)

Ubuntu 7.10 users that would like to have Eclipse 3.3 or later running on their boxes.

Prerequisites

  • Eclipse 3.3 (Europa) binaries from here. Download the configuration you need.
  • Java 5 (or later) runtimes from Sun to run Eclipse. You can install them using:
$sudo apt-get install sun-java5-jre
  • (optional) JDK for Java/Eclipse development:
$sudo apt-get install sun-java5-jdk

Installation.

Unpack Eclipse archive somewhere. I use /usr/local/opt for such things.

$sudo mkdir /usr/local/opt
$sudo mv your.downloaded.eclipse.version.tar.gz /usr/local/opt
$cd /usr/local/opt
$tar -zxf your.downloaded.eclipse.version.tar.gz
$rm your.downloaded.eclipse.version.tar.gz

You can use Midnight Commander for this...

Running

Eclipse should run out-of-the-box, let's check:

$cd eclipse
$./eclipse

If you get errors which look like ' java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin' check next chapter.
If menu doesn't work (you select menu item but nothing happens) ... check next chapter.

Troubleshooting

"java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin" problem.

This is because Eclipse needs to start using Java runtimes from Sun, not the GNU ones. Additionally this need to be 1.5 or later binaries. There are few ways to fix the glitch... i present the easiest one, and 100% working.

Setting Ubuntu to use right JRE system-wide

Check which java VM's are available:
$update-java-alternatives -l
you should get output similar to this one:
> java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun
> java-6-sun 63 /usr/lib/jvm/java-6-sun
> java-6-sun 73 /usr/lib/jvm/java-7-sun

> java-gcj 1042 /usr/lib/jvm/java-gcj

set the right VM:
$sudo update-java-alternatives -s java-1.5.0-sun
Ensure to set right version, that is 1.5.0, 1.5.1 or later (i use java-7 and it works fine)
Finally, update /etc/jvm. Run your favorite text editor as superuser and change the file so it looks similar to this one (1.5.0 is on the top):
# This file defines the default system JVM search order. Each
# JVM should list their JAVA_HOME compatible directory in this file.
# The default system JVM is the first one available from top to
# bottom.

/usr/lib/jvm/ia32-java-1.5.0-sun
/usr/lib/jvm/java-1.5.0-sun
/usr/lib/jvm/java-gcj

Eclipse should run properly from now on...
老外写得和文档一样。。。看不出是博客吧。。。
  评论这张
 
阅读(1375)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017