[Java-gnome-developer] java.lang.UnsatisfiedLinkError: gnome_date_edit_new
Brought to you by:
afcowie
From: Jason P. <ja...@wi...> - 2003-10-25 23:49:01
|
Hi everyone, I recently installed java-gnome(had a problem building because I didn't have ANT installed) compiled and ran the example code. Everything went well. I am interested in the DateEdit class. I edited the EntryDemo.java example.... http://java-gnome.sourceforge.net/docs/GNOME-tutorial/c688.html#ENTRY to the following.... import org.gnu.gnome.DateEdit; import org.gnu.gtk.Gtk; import org.gnu.gtk.HBox; import org.gnu.gtk.Widget; import org.gnu.gtk.Window; import org.gnu.gtk.WindowType; import org.gnu.gtk.event.LifeCycleEvent; import org.gnu.gtk.event.LifeCycleListener; import java.util.Date; public class DateEditDemo { public static void main(String[] args) { boolean thetruth = true; Gtk.init(args); Window w = new Window(WindowType.TOPLEVEL); w.addListener(new LifeCycleListener() { public void lifeCycleEvent(LifeCycleEvent event) { if (event.isOfType(LifeCycleEvent.Type.DESTROY) || event.isOfType(LifeCycleEvent.Type.DELETE)) { Gtk.mainQuit(); } } }); w.setDefaultSize(200,200); w.setBorderWidth(5); w.setTitle("DateEdit Demo!!!"); w.add(new DateEdit(new Date(), thetruth, thetruth )); w.showAll(); Gtk.main(); } } the code compiles fine and when launched I get the following.... Exception in thread "main" java.lang.UnsatisfiedLinkError: gnome_date_edit_new at org.gnu.gnome.DateEdit.gnome_date_edit_new(Native Method) at org.gnu.gnome.DateEdit.<init>(DateEdit.java:52) at DateEditDemo.main(DateEditDemo.java:27) I have only worked a little bit with Java Native Interface so I don't know where to start. A little research suggests the following in DateEdit.java... native static final protected int gnome_date_edit_new(long the_time, boolean show_time, boolean use_24_format); should be changed to the following along with the supporting code but I am not sure.... native static final protected int gnome_date_edit_new(int the_time, int show_time, int use_24_format); gnome_date_edit_new suggests that "the_time" in an unsigned long (32 bits) not java long (64 bits) and the show_time and use_24_format are int not boolean. But again I am very new to JNI.. I made the changes but got the same error UnsatisfiedLinkError I'm I way off? Thanks, Jason Peterson -- ja...@wi... |