File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes exception generate java.lang.verifyerror Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "exception generate java.lang.verifyerror" Watch "exception generate java.lang.verifyerror" New topic

exception generate java.lang.verifyerror

Ritesh raushan
Ranch Hand

Joined: Aug 29, 2012
Posts: 100
this gives java.lang.verifyerror

Exception in thread "main" java.lang.VerifyError: Bad type on operand stack in method
Mana.main([Ljava/lang/String;)V at offset 9
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(
at java.lang.Class.getMethod0(
at java.lang.Class.getMethod(
at sun.launcher.LauncherHelper.getMainMethod(
at sun.launcher.LauncherHelper.checkAndLoadMain(

fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

Not when I compile and run it.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Tony Docherty

Joined: Aug 07, 2007
Posts: 2838
this gives java.lang.verifyerror

No it doesn't, it throws java.lang.VerifyError. Java is case sensitive.

I must say I've never seen a VerifyError before and I've run your code and it works fine so I suggest you delete the class files, re-compile and try again.
I agree. Here's the link:
subject: exception generate java.lang.verifyerror
It's not a secret anymore!