The JavaShell demo doesn't work because its dependencies have issues with their metadata.
The JavaShell demo has dependencies on the org.apache.sling.commons.compiler and org.apache.sling.scripting.java bundles.
Both these bundles don't resolve.
The org.apache.sling.commons.compiler bundle has:
org.osgi.service.prefs,version=[1.1,2) – Cannot be resolved
The org.apache.sling.scripting.java bundle has:
org.osgi.framework,version=[1.7,2) – Cannot be resolved