java - Class file don't run -
this question has answer here:
- run command line, wrong name error 6 answers
c:\users\student3>java -cp c:\users\student3 start exception in thread "main" java.lang.noclassdeffounderror: start (wrong name: wo rk/start) @ java.lang.classloader.defineclass1(native method) @ java.lang.classloader.defineclass(unknown source) @ java.security.secureclassloader.defineclass(unknown source) @ java.net.urlclassloader.defineclass(unknown source) @ java.net.urlclassloader.access$100(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.misc.launcher$appclassloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ sun.launcher.launcherhelper.checkandloadmain(unknown source)
screenshot: http://imageshack.us/photo/my-images/835/mt6a.png/ it's first run class windows, happens?
update:
exception in thread "main" java.lang.noclassdeffounderror: org/apache/poi/ss/usermodel/row so.. should create 1 hundred directories?
notice part says "wrong name: work/start". means class file found contains class called "work.start", wanted run 1 that's called "start".
you can 2 things:
- create directory called work , move start.class file there. run "java work.start".
- remove package declaration start.java , recompile.
Comments
Post a Comment