aspose file tools
The moose likes Beginning Java and the fly likes Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Exception" Watch "Exception" New topic
Author

Exception

Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
why is the code below giving me an exception?

Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2341
What is productPrice[4][4]?
Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
Okay even productPrice[1] is giving the exception. And shouldnt it be an ArrayoutofBOuds exception if this was the problem? This exception is:

Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class f
e
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2341
That looks like you have an older version of the .class file you are trying to run.

Are you sure that you are interpreting the right class?
Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
Yes, Am I the only one getting this exception. could someone else verify for me please?
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2341
I don't get that exception.

Make sure that there is no older version of MainApplication.class in your current directory and try

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exception
 
Similar Threads
printing an 2d array by row
Sorting arrays
sentinal controlled looop
Display of double in GUI different from non-GUI.
CreateFailureException