java-native-access / java-native-access/jna

How to get JNA working with JavaME

Open
#650 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
8.9k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

I created a wrapper of a C library with JNA and all is working. Now I'm trying to use the wrapper in a JavaMe project, but with no success.
I.m using javaME SDK 8.2 and JNA 4.2.1.
In NetBeans 8,1 I added JNA-4.2.1.jar and my wrapper to a JavaME project,just as I did with a Java project. I can build it, but when I try to run the project on the emulator I get the following error (the line where I have the error is where I try to access some JNA code):

`Starting emulator in execution mode
Trying starting IMlet...
TRACE: , startApp threw an Exception
java.lang.UnsupportedClassVersionError

  • java/lang/Class..unknown.(), bci=0
  • java/lang/Class.initialize(), bci=110
  • JavaMEApplication2.startApp(JavaMEApplication2.java:47)
  • .unknown...unknown.(), bci=1
  • .unknown...unknown.(), bci=5
  • .unknown...unknown.(), bci=236
  • .unknown...unknown.(), bci=38
  • .unknown...unknown.(), bci=5
  • .unknown...unknown.(), bci=127
  • com/sun/midp/main/AppIsolateMIDletSuiteLoader.main(), bci=26
    java.lang.UnsupportedClassVersionError
  • java/lang/Class..unknown.(), bci=0
  • java/lang/Class.initialize(), bci=110
  • JavaMEApplication2.startApp(JavaMEApplication2.java:47)
  • .unknown...unknown.(), bci=1
  • .unknown...unknown.(), bci=5
  • .unknown...unknown.(), bci=236
  • .unknown...unknown.(), bci=38
  • .unknown...unknown.(), bci=5
  • .unknown...unknown.(), bci=127
  • com/sun/midp/main/AppIsolateMIDletSuiteLoader.main(), bci=26
    BUILD SUCCESSFUL (total time: 39 seconds)`

Would anyone have an idea about what's happening ?
Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at JavaMEApplication2.java:47 and reproduce the emulator failure using JavaME SDK 8.2, JNA 4.2.1, and the native wrapper. Compare the JavaME runtime requirements with the included JNA JAR and wrapper; done means identifying whether this combination is supported and documenting a confirmed configuration or compatibility limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.