java.lang.NoClassDefFoundError while running examples
pxc3113 opened this issue · 1 comments
How to reproduce the issue:
root@39d189491fd8:/usr/local/tomcat/webapps.dist/examples/WEB-INF/classes/nonblocking# java ByteCounter
Error: Could not find or load main class ByteCounter
Caused by: java.lang.NoClassDefFoundError: nonblocking/ByteCounter (wrong name: ByteCounter)
Your error is wrong name: ByteCounter
because it's technically ByteCounter.java
# ls
'ByteCounter$1.class' ByteCounter.java NumberWriter.class
'ByteCounter$CounterListener.class' 'NumberWriter$1.class' NumberWriter.java
ByteCounter.class 'NumberWriter$NumberWriterListener.class'
I tested the webapp by moving the folder so it's accessible through the web https://github.com/docker-library/docs/tree/master/tomcat#how-to-use-this-image
Questions like these are better suited for a dedicated help resource, if you need further help I'd try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum