wood burning stoves*
The moose likes Android and the fly likes JDk Compliance issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "JDk Compliance issues" Watch "JDk Compliance issues" New topic
Author

JDk Compliance issues

Sean Michael Hayes
Ranch Hand

Joined: Feb 08, 2012
Posts: 54

Not sure if this goes in here or the Android forums but here goes.

I wanted to implement a chart view in my Android app and used [url = http://www.jjoe64.com/p/graphview-library.html]GraphView[/url] for this. I wanted to test its update and redraw features so for this test I called the appendData() class. Problem, when I try to run it, I get this error with that method.

I researched the problem and it seems to be that the copyOf method is in JDK 1.6, while the compliance level of my Android project is 1.5, no problem, I changed the compliance level, refreshed and cleaned the project but I still get the error. I poked around the preferences further but cannot see what my problem is. Can anyone give me some guidance on what to do here? I'm using JRE7 as the JRE and the JAVA_HOME variable is set to JDK 1.7.0.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Yes, this should really be asked in the Android forum, I'll move the post for you. I suspect that you are running into one of the methods that is not provided on the Android platform (which is not 100% Java compliant), hence the error.


JBoss In Action
Sean Michael Hayes
Ranch Hand

Joined: Feb 08, 2012
Posts: 54

Peter Johnson wrote:Yes, this should really be asked in the Android forum, I'll move the post for you. I suspect that you are running into one of the methods that is not provided on the Android platform (which is not 100% Java compliant), hence the error.


Thanks for the reply and you are indeed right! I was using API level 8 as my Android API and did not realise that it only supported JDK 1.5 and below. I couldn't upgrade my API as my Samsung Galaxy mini did not support any higer so I simply overrode the method and replaced the 1.6 methods with a 1.5 equivalent (System.arrayCopy) and it seems to work!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDk Compliance issues
 
Similar Threads
"Bad version number in .class file"
compareToIgnoreCase() problem
Compiler Compliance Level vs Build JRE
Android Memory FootPrint
Eclipse Compiler Compliance