0

I am attempting to make a 3d graphing application for Android. I'm using the JMathTools library with requires me to use JFrame, which is a Java core library. Because of the difference in the framework, to my understanding, it is not simply possible to import the Java library.

I've tried using dx to convert the files from .class to .dex using the following command

dx --dex --output="C:\Users\ryan\Desktop\dxToClass\rt.dex" "C:\Users\ryan\Desktop\dxToClass\rt.jar"

but following error has occurred:

PARSE ERROR: unsupported class file version 52.0 while parsing com/oracle/net/Sdp.class

I've tried adding the following to the Gradle file, which was suggested but had the same problem

tasks.withType(JavaCompile) {

    sourceCompatibility = JavaVersion.VERSION_1_7
    targetCompatibility = JavaVersion.VERSION_1_7
}

So my overall question: would it be possible to hand copy every single java file within the rt.jar by hand, or will the difference in frameworks still give me an issue?

Do you have knowledge of alternative 3D graphing libraries that don't rely on core libraries?

Is there another way to approach this problem?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ryan Chrome
  • 1
  • 1
  • 4
  • It is unlikely to port without source/effort as 3D usual involves OpenGL which is different between desktop (and mobile (OpenGL ES) as well as how different Android's framework from a Java Swing app. See comments in this question: https://stackoverflow.com/questions/34846779/is-there-an-android-implementation-of-jogls-gl2es2 and https://stackoverflow.com/questions/28544821/how-to-import-javax-swing-in-android-studio For 3D libraries I would also look at existing game engines on Android but don't know what effort would be involved to integrate with JMathTools – Morrison Chang May 31 '17 at 04:42
  • An old post but something to consider: https://stackoverflow.com/questions/23938383/how-to-use-jzy3d-in-android-using-eclipse – Morrison Chang May 31 '17 at 04:49

0 Answers0