• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A JNI error has occurred

 
Kalege Enock
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I'm new to JAVA programming, leaning GUI and event-driven programing. I got this error please assist.

--------------------Configuration: <Default>--------------------
java.lang.NoSuchMethodError: main
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
Process completed.

Thanks
 
Kalege Enock
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using JCreator version 4.50.010
 
Campbell Ritchie
Sheriff
Posts: 48371
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with using JCreator; you need to check the heading for your main method. It should read

public static void main(String[] args)

and there is very little variation permitted. The JVM looks for a method with that heading, and even the slightest spelling error (eg Main) will prevent it from finding it.

See whether that works.
 
Campbell Ritchie
Sheriff
Posts: 48371
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to JavaRanch
 
Kalege Enock
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Campbell Ritchie,
Thank you for a welcome note and support. The error is resolved.
 
Campbell Ritchie
Sheriff
Posts: 48371
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic