2

I am using this link to help me with starting my own simple jetty server on my android device. I keep getting this error:

"Could not find class 'org.eclipse.jetty.server.Server', referenced from method onCreate in MainActivity"

I am using Jetty 7 and I have add the appropriate jar files to the build path. Does anyone know any possible ways to fix this issue? Thank you.

Oriol
  • 274,082
  • 63
  • 437
  • 513
rstojano
  • 159
  • 4
  • 14

2 Answers2

2

You'll want the i-jetty project at

http://code.google.com/p/i-jetty/

It is the android layer for Jetty 7, created by the Jetty project team members themselves.

It has the appropriate extra classes you will need to embed jetty in your android application, along with an example project that uses jetty + this layer to serve dexified (a dalvik bytecode format) webapps (war files).

Pay attention to the packaging and also the permissions that i-jetty use.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
0

Even if you added jetty jar files to build path, it will fail to launch if you didn't check the box on 'Order and Export' tab of Java Build Path window.

enter image description here

Seunghoon
  • 5,632
  • 5
  • 35
  • 41