Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321804

Summary: Jetty cannot be started in Eclipse if its installation path has a space in it
Product: [RT] Jetty Reporter: Ben Arnold <ben.arnold.spam>
Component: otherAssignee: Michael Gorovoy <mgorovoy>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: gregw, mgorovoy
Version: unspecified   
Target Milestone: 7.1.x   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ben Arnold CLA 2010-08-04 19:37:14 EDT
Build Identifier: 20100617-1415

The stack trace is...

java.lang.NoClassDefFoundError: Files/jetty-6/1/25
Caused by: java.lang.ClassNotFoundException: Files.jetty-6.1.25
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Exception in thread "main" 


Reproducible: Always

Steps to Reproduce:
1. Unzip Jetty to C:\Program Files\jetty-6.1.25
2. In Eclipse's "Servers" view create a new Jetty 6 server, pointing to that Jetty directory.
3. Right-click on the server and choose "Start"

Eclipse pops up a dialogue box that says "Could not find the main class: Files/jetty-6.1.25. Program will exit"
Comment 1 Greg Wilkins CLA 2010-08-05 07:35:44 EDT
How are you trying to start jetty?
Comment 2 Michael Gorovoy CLA 2010-08-06 12:00:36 EDT
What version of the Eclipse IDE are you using? 

There are no Jetty classes in the exception stack trace that you have provided. Therefore the CNFE has happened while the Eclipse IDE was attempting to load Jetty's bootstrap classes. As a result this is likely to be an issue with the way Eclipse IDE launches servers on Windows platform. An obvious work-around is to use an installation path for Jetty that does not contain spaces.

-Michael