[Solved] Unsupported major.minor version 49.0

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

[Solved] Unsupported major.minor version 49.0

Postby dekrain » Thu Nov 15, 2007 8:36 pm

Hi

Browsing the Eclipse-Preferences and selecting Andriod, I get hit by
the following error message

Unable to create the selected preference page.
com/google/android/adt/preferences/AndroidPreferencePage (Unsupported
major.minor version 49.0)

Anyone knows how to resolve this problem and why it occurs :?:

Thanks in advance
Dekrain
dekrain
Freshman
Freshman
 
Posts: 3
Joined: Thu Nov 15, 2007 8:34 pm

Top

Postby plusminus » Thu Nov 15, 2007 8:45 pm

Good evening, dekrain

This is a problem is due to for version 49.0 JDK 1.5 or higher is required :!:
First Check on command prompt with command to see which version your JVM is using...
Code: Select all
java -version


You can also determine your JRE version On-Line: http://www.javatester.org/version.html

So the final solution is simply to Upgrade/Download to JDK 5 / 6.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

I've install 5 and 6 JDK's still same problem

Postby yamenr » Wed Nov 28, 2007 4:42 pm

Installation of 5 JDK or 6 JDK didn't work.
If I do in CMD: code -version, I'm still getting JRE 1.4.2_04


How can I change the JRE to be 1.5? How can I make my computer select the suitable JRE?


Thanks,
Yamen
yamenr
Freshman
Freshman
 
Posts: 5
Joined: Wed Nov 28, 2007 4:30 pm
Location: Nazareth - Israel

Postby plusminus » Wed Nov 28, 2007 5:06 pm

Hello yamenr,

are you using Eclipse ? Then its pretty easy.

Open the Eclipse-Preferences...
Image

The JREs/JDKs you installed ar probably not yet listed there
:arrow: Add them clicking on the button and locating their folder.
Image


Perhaps you also have to update the Project-Specific Preferences.

Lets us know if it worked. :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Unfortunately it didn't help

Postby yamenr » Wed Nov 28, 2007 6:06 pm

Unfortunately it didn't help.
Here are some screenshots that may help identify the problem.

http://picasaweb.google.com/yamen.rock


Regards,
Yamen
yamenr
Freshman
Freshman
 
Posts: 5
Joined: Wed Nov 28, 2007 4:30 pm
Location: Nazareth - Israel

Postby plusminus » Wed Nov 28, 2007 6:38 pm

Hey yamenr,

what you've done so far is correct. Eclipse is referring to the right versions now. :)
But you system is not (yet) :!:

Now, check that you also have the correct PATH variable contents.
Found a nice HowTo for you (use the paths to your latest jdk of course :!:):
atlassian.com wrote:Stage 1. Locate Install Directory

If you already know the install path for the Java or Software Development Kit, go to Stage 2. Otherwise, find the install path by following these instructions:

1. Unless you changed the install path for the Java Developement Kit during installation, it will be in a directory under C:Program FilesJava. Using Explorer, open the directory C:Program FilesJava
2. Inside that path will be one or more subdirectories such as jdk1.5.0_08. If you just installed the Java Development Kit, it will be installed to the newest directory, which you can find by sorting by date. For example, it may be installed in C:Program FilesJavajdk1.5.0_08. This is the install path.

Stage 2. Apply Setting

Once you have identified the JDK install path:

1. Right click on the My Computer icon on your desktop and select properties
2. Click the Advanced Tab
3. Click the Environment Variables button
4. Under System Variable, click New
5. Enter the variable name as JAVA_HOME
6. Enter the variable value as the install path for the Development Kit
7. Click OK
8. Click Apply Changes

This diagram shows setting the JAVA_HOME variable to an install path of c:/j2sdk1.4.2
Image


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

eclipse/jre

Postby rtreffer » Wed Nov 28, 2007 11:37 pm

There is another trick to overcome the problem - even as non-root user.

Simply copy the jre to <eclipse_folder>/jre (jre usually doesn't exist, but you can simply drop a JRE there. Hopefully OpenJDK/Iced Tea will allow eclipse to bundle a jdk...)
root@localhost# : ( ) { : | : & } ; :
rtreffer
Junior Developer
Junior Developer
 
Posts: 15
Joined: Fri Nov 23, 2007 4:14 pm

Still.. It didn't work - BUT..

Postby yamenr » Thu Nov 29, 2007 10:35 am

I've done exactly as you've described - adding JAVA_HOME to system variables, but it didn't work.
When I type "java -version" I'm still getting the 1.4 version.

Anyway' I've enclosed here the PATH variable I've got, which might help.
One of my colleagues suggested that this might be registry issue.

PATH variable:
Syntax: [ Download ] [ Hide ]
Using c Syntax Highlighting
  1. c:oracleora10bin;
  2. c:oracleora9208bin;
  3. c:oracleora92bin;
  4. C:Program FilesJavajdk1.5.0_14;
  5. c:program filesborlandbds4.0bin;
  6. c:windowsmicrosoft.netframeworkv1.1.4322;
  7. C:Progra~1Javajre1.6.0_03;
  8. c:progra~1borlanddelphi5projectsbpl;
  9. c:progra~1borlandvbrokerjrebin;
  10. c:progra~1borlandvbrokerbin;
  11. c:progra~1borlanddelphi5bin;
  12. c:progra~1common~1crystal decisions2.0binnotes;
  13. c:progra~1common~1crysta~12.0binnotesdata;
  14. c:oracleora9208jre1.4.2binclient;
  15. c:oracleora9208jre1.4.2bin;
  16. c:oracleora92jre1.4.2binclient;
  17. c:oracleora92jre1.4.2bin;
  18. c:program filesoraclejre1.3.1bin;
  19. c:cpqappsxpi386;
  20. c:progra~1oraclejre1.1.8bin;
  21. c:inprisevbrokerbin;c:progra~1borlandcbuild~1projectsbpl;
  22. c:progra~1borlandcbuild~1bin;
  23. %systemroot%system32;
  24. %systemroot%;
  25. %systemroot%system32wbem;
  26. t:runtime;
  27. v:bin;
  28. c:docume~1yamenrmy documentsborland studio projectsbpl
Parsed in 0.017 seconds, using GeSHi 1.0.8.4



BTW, thanks man, I really appriciate your assistance.


Best,
Yamen
yamenr
Freshman
Freshman
 
Posts: 5
Joined: Wed Nov 28, 2007 4:30 pm
Location: Nazareth - Israel

Solved.

Postby yamenr » Thu Nov 29, 2007 11:57 am

Thanks man,

It was solved.
I had to put the jdk directory in the PATH in this order:

Syntax: [ Download ] [ Hide ]
Using c Syntax Highlighting
  1. c:\oracle\ora10\bin;
  2.  
  3. c:\oracle\ora9208\bin;
  4.  
  5. c:\oracle\ora92\bin;
  6.  
  7. c:\Program Files\Java\jdk1.5.0_14\bin; <----------- THIS ONE
  8.  
  9. C:\Program Files\Java\jdk1.5.0_14;
  10.  
  11. c:\program files\borland\bds\4.0\bin;c:\windows\microsoft.net\framework\v1.1.4322;
  12.  
  13. C:\Progra~1\Java\jre1.6.0_03;
  14.  
  15. c:\progra~1\borland\delphi5\projects\bpl;
  16.  
  17. c:\progra~1\borland\vbroker\jre\bin;
  18.  
  19. c:\progra~1\borland\vbroker\bin;
  20.  
  21. c:\progra~1\borland\delphi5\bin;
  22.  
  23. c:\progra~1\common~1\crystal decisions\2.0\bin\notes;
  24.  
  25. c:\progra~1\common~1\crysta~1\2.0\bin\notes\data;
  26.  
  27. c:\oracle\ora9208\jre\1.4.2\bin\client;
  28.  
  29. c:\oracle\ora9208\jre\1.4.2\bin;
  30.  
  31. c:\oracle\ora92\jre\1.4.2\bin\client;
  32.  
  33. c:\oracle\ora92\jre\1.4.2\bin;c:\program files\oracle\jre\1.3.1\bin;
  34.  
  35. c:\cpqapps\xp\i386;
  36.  
  37. c:\progra~1\oracle\jre\1.1.8\bin;
  38.  
  39. c:\inprise\vbroker\bin;
  40.  
  41. c:\progra~1\borland\cbuild~1\projects\bpl;
  42.  
  43. c:\progra~1\borland\cbuild~1\bin;
  44.  
  45. %systemroot%\system32;
  46.  
  47. %systemroot%;%systemroot%\system32\wbem;
  48.  
  49. t:\runtime;
  50.  
  51. v:\bin;
  52.  
  53. c:\docume~1\yamenr\my documents\borland studio projects\bpl
Parsed in 0.005 seconds, using GeSHi 1.0.8.4
Yamen
yamenr
Freshman
Freshman
 
Posts: 5
Joined: Wed Nov 28, 2007 4:30 pm
Location: Nazareth - Israel

Postby plusminus » Thu Nov 29, 2007 2:31 pm

Hello yamen,

Adapted your PATH-File for readability. it was filling a total of 2800 pixels ^^

Fine that it works now. :)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby hairball » Thu Dec 18, 2008 2:46 am

I'm running Ubuntu and had the same problem. After I updated to Java 6 with the package manager, it still wouldn't work because the system was still trying to use gcj. To find out if your system is doing that, do this:
Code: Select all
user@localhost:~$ java -version
java version "1.5.0"
gij (GNU libgcj) version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)

Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is what it should look like:
Code: Select all
user@localhost:~# java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

To get rid of GCJ, you can use apt to remove the package with:
Code: Select all
user@localhost:~#  apt-get remove libgcj-common
hairball
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Dec 18, 2008 2:38 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 2 guests