在eclipse中运行Jetty 7服务器? [英] Running Jetty 7 server in eclipse?

查看:146
本文介绍了在eclipse中运行Jetty 7服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置Eclipse来运行我的项目并将其部署到Jetty 7服务器(最早的版本可从 http://download.eclipse.org/jetty/ )。我已经下载了Jetty 7并解压缩了它,并且我已经从可用的服务器适配器列表中安装了Jetty插件,但是当我尝试配置一个新的Jetty服务器时,服务器类型列表只包含Jetty 6。如果我使用它并将其指向我的服务器运行时,当我尝试启动它时,我会收到以下错误:

I'm trying to set up Eclipse to run and deploy my projects to a Jetty 7 server (the oldest version available from http://download.eclipse.org/jetty/). I've downloaded Jetty 7 and unpacked it, and I've installed the Jetty plugin from the available server adapters list, but when I try to configure a new Jetty server, the server type list only contains "Jetty 6". If I use this and point it at my server runtime, when I try to start it I get the following error:

java.lang.NoClassDefFoundError: org/mortbay/start/Main
Caused by: java.lang.ClassNotFoundException: org.mortbay.start.Main
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main" 

我猜想我需要一个不同的适配器来启动Jetty 7,但我不知道从哪里找到。

I'm guessing I need a different adaptor to start Jetty 7, but I have no idea where to find it.

推荐答案

问题是,包名称随着迁移到Eclipse而改变,Jetty的人仍然很忙。

The problem is that the package name changed with the migration to Eclipse, and the Jetty folks are still busy.

您最简单的选择是从Codehaus下载Jetty 6( http://dist.codehaus .org / jetty / ),将其拆开并使用Jetty 6适配器。

Your easiest option is to download Jetty 6 from Codehaus (http://dist.codehaus.org/jetty/), unpack it somewhere and use the Jetty 6 adapter.

这篇关于在eclipse中运行Jetty 7服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆