• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

UnsatisfiedLinkError, zayit, libzayit.so, wtk, linux

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Does anyone know how to enable native code under Linux version of WTK2.1 ?
It seems WTK2.1 cannot call a native code method inside libzayit.so.
I have already checked libzayit.so and the method I need is really there.
I've read that you have to define LD_LIBRARY_PATH to point at libzayit.so.
I also ready that -Xbootclasspath/a:/my-wtk-path/bin is need in order to libzayit to be found. I've tryed many "flavors" but it's not working.
I know JNI is not supported under MAC/OSX and I'm afraid that JNI is not supported under Linux too!
Below you can see my method, the error I got and my java.sh script I run inside my profile.
Thank you in advance
Fernando Gomes
fernando.gomes@bigfoot.com
mobile:+55(11)9993-2760
 
Fernando Gomes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems I discovered something weird in my Linux box.
The problem was hostname and domainname were misconfigured.
Probably you will receive a strange message when WTK emulator is started, telling you something like "hostname not found" or "wrong IP"... I don't remember very well.
My /etc/sysconfig/networking/profiles/default/network was ...
HOSTNAME=sirius.localdomain
... and should be:
HOSTNAME=sirius
DOMAIN=localdomain
Enter RedHat network configuration applet and reconfigure your system, restart networking and check if everything seem OK. Start WTK emulator and you should not see the weird message anymore.
I hope it helps.
Fernando Gomes
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems that the code attempts
to run (with calling native) without the sand box;

if run from :
public static void main(String[] args){
//the j2me code
}
it will throw the java.lang.UnsatisfiedLinkError:*****

but run from:
public class YourMIDlet extends MIDlet{
protected void startApp() throws MIDletStateChangeException {
//from here:
String msg = "你好!!";
SMSSendThreadHTTPImpl httpImpl = new SMSSendThreadHTTPImpl(msg);
Thread httpSend = new Thread(httpImpl);
httpSend.start();
}

}
it will OK!!!

[ January 10, 2006: Message edited by: sun gong ]
[ January 10, 2006: Message edited by: sun gong ]
 
Willie Smits can speak 40 languages. This tiny ad can speak only one:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic