troubleshooting Question

DLL HELP!!!

Avatar of WalterRautenbach
WalterRautenbach asked on
Java
6 Comments1 Solution310 ViewsLast Modified:
Hi there.

Im struggling with a project that includes a dll, so i got an example off the net that shud run quite simply but it does not, here is the source code and the error.

I dont know if it could be my system configeration?

thanx.

class ShowMsgBox
  {
      public static void main(String args[])
      {
        MessageBox(0, "It worked!",
                  "This is a message box from Java", 0);
            }

     /** @dll.import("USER32") */
     private static native int MessageBox(
                                           int hwnd
                                         , String text
                                         , String title
                                         , int style
                                         );
  }


ERROR:

>java ShowMsgBox
Exception in thread "main" java.lang.UnsatisfiedLinkError: ShowMsgBox.MessageBox(ILjava/lang/String;Ljava/lang/String;I)I
      at ShowMsgBox.MessageBox(Native Method)
      at ShowMsgBox.main(ShowMsgBox.java:5)
>Exit code: 1
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros