Unsupported major.minor version 50.0

100 views
Skip to first unread message

shah jahan

unread,
Oct 15, 2012, 3:29:07 AM10/15/12
to zx...@googlegroups.com
Hi 

I am trying to build a library for barcode reader using Zxing2.0 for both iPhone and Android using java in jdeveloper 11g.

I am using JDK version 1.6.0_29.  

When I build the project there are no any issues, it is getting successfully built.  But when i deploy the application to iPhone simulator or Android simulator, I am getting the error "Unsupported major.minor version 50.0".

I have rechecked all the Project properties and confirmed the java compiler i am using is JDK 1.6.0_29. After googling i found that the above mentioned is due to files are getting compiled in JDK version 1.6 but while running they are expecting below versions.  

Please let me know how should i resolve this.

Sean Owen

unread,
Oct 15, 2012, 5:18:06 AM10/15/12
to zx...@googlegroups.com
Well, you already found the answer: you are running code complied for Java 6 on 1.5 or below. Don't do that. Run Java 6 when you run these emulators. Set your default Java version correctly.

shah jahan

unread,
Oct 15, 2012, 7:20:27 AM10/15/12
to zx...@googlegroups.com
Thank you very much Sean.

I have verified the java versions being used on my mac system.  On the machine its java 6 only  and in 'project properties' of jdeveloper also its java 6 only. But still getting the same issue.

What am i missing in between.  I tried this on both windows as well as Mac systems in both the systems am getting the same issue.

Sean Owen

unread,
Oct 15, 2012, 7:49:37 AM10/15/12
to zx...@googlegroups.com
The error shows you are definitely not running Java 6. I am sure you just haven't quite set the right thing.

Lachezar Dobrev

unread,
Oct 15, 2012, 9:46:26 AM10/15/12
to shah jahan, zx...@googlegroups.com
When compiling you should target Java 1.5
I do not use JDeveloper, and have no idea how to do that.

Googling around points to 'Project Properties->Compiler'.
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_2/images/compileroptions.gif

From the Oracle JDeveloper documentation:
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_2/jdtut_11r2_2.html

2012/10/15 shah jahan <sehe...@gmail.com>:

Lachezar Dobrev

unread,
Oct 15, 2012, 9:56:06 AM10/15/12
to shah jahan, zx...@googlegroups.com
Scratch that!
All my projects compile against Java 1.6 (v 50.0).

2012/10/15 Lachezar Dobrev <l.do...@gmail.com>:

Sean Owen

unread,
Oct 15, 2012, 10:05:48 AM10/15/12
to zx...@googlegroups.com, shah jahan
I don't think it will compile versus 1.5 anymore, at the least because of @Override on interface methods. You could pull those out. There may be a few Java 1.6+ method calls though.

shah jahan

unread,
Oct 16, 2012, 4:47:39 AM10/16/12
to zx...@googlegroups.com, shah jahan
Hi,
 
Thanks to Sean and Lachezar Dobrev.
 
I have found the reason for this error.  This is because Java VM embeded within the framework is based on JavaME spec, which is based on Java 1.4.  Now I think i cant use Zxing2.0.
 
Could you please let me know if there is Zxing which runs on Java1.4.
 
Thanks once again for the support.

Sean Owen

unread,
Oct 16, 2012, 4:52:21 AM10/16/12
to zx...@googlegroups.com, shah jahan
The version before, 1.7.

Lachezar Dobrev

unread,
Oct 16, 2012, 4:56:03 AM10/16/12
to shah jahan, zx...@googlegroups.com
What platform/platforms are you building for?

I am curious as to how are you building iPhone application with Java.
http://www.iphonefaq.org/archives/9731
'The iPhone will not support Java applications of any kind.'

Android also does not support JavaME (out-of-the-box).

I have a gut feeling, that you're building a JavaME application that
you believe will run on Android and iStuff. That won't do!

The ZXing project has a JavaME sub-project, but it has been
deprecated for some time now and is hopelessly out-of-date.

2012/10/16 shah jahan <sehe...@gmail.com>:

shah jahan

unread,
Oct 24, 2012, 10:00:14 AM10/24/12
to zx...@googlegroups.com, shah jahan
I am using Zxing 1.1 version.
 
While testing in the Android emulator it says "java.lang.NoClassDefFoundError: java.awt.image.BufferedImage".  But when tested as a normal Java applications it scans bar codes successfully.
 
Now currently I am using Java 1.4 version and testing in Android Emulator Target 4.0.3 API level 15. 

Sean Owen

unread,
Oct 24, 2012, 12:13:06 PM10/24/12
to zx...@googlegroups.com, shah jahan
Surely you are not using Java 1.1 or ZXing 1.1.
You are including classes you don't need, in javase/. They don't work on Android. Don't include them.
Android uses Java 6, not 1.4. But I thought you were developing for JavaME.

This sounds pretty confused...

shah jahan

unread,
Oct 25, 2012, 1:11:08 AM10/25/12
to zx...@googlegroups.com, shah jahan
Actually I am developing this on both iOS and Android, the current framework which i am using is still in Beta version and am not allowed to disclose more about this but that internally uses Java 1.4 version.
I will try to remove the unwanted classes.  Thanks once again for this info.
Reply all
Reply to author
Forward
0 new messages