简体   繁体   中英

Compiling Java hardware API to run in Android.

I am a bit of a noob to Android.

I have a project that utilizes a sensor glove to input data in the from of sensor values to a device. The objective of my project is to interface this sensor glove with an Android device so that the information from the glove is sent wireleslly to the Android device where my application would do the necessary processing.

The glove came with a set of tools and APIs to program in Java with. My question is basically, can i compile my code written in java to work on the Android platform? I reference a set of Jar files in my original code. Will i be able to utilize the same Jar files when running my code in Android, or would i be able to compile the same java code to run in Android.

really appreciate the help,

If the jar contains compiled class files, it won't work. Your source code has to be compiled to work with the dalvik virtual machine, not java.

However, if you have the uncompiled class files, it will (likely) work with Android. Most standard Java libraries are also available on Android.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM