Darin:

There is one other possibility. You mention that you "... tested the
compiled code (including the native
code) inside the Mozilla browser and it also runs as it should."

What's happening is that the Java run-time is able to load and run your
library in hosted mode. But, that doesn't mean that you can compile this
library to Javascript. Try putting the library into the classpath, modify
your code to instantiate whatever classes you need, and compile (rather than
run in hosted mode). You cannot use LoadLibrary on the client side: there is
no Java runtime.

On Mon, Nov 2, 2009 at 4:37 PM, Darin <[email protected]> wrote:

>
> Hello.
>
> I have written a GWT project that uses native code. The class that
> calls the code looks like this:
>
> public class NativeCodeClass {
>        static {
>                System.loadLibrary("SolverLibrary");
>        }
>        public native String validatePassword(String username, String
> password);
> }
>
> When I compile and run this inside of Eclipse (hosted mode), the
> native code runs (assuming that I uncheck the "Use Google App Engine")
> just fine. I have also tested the compiled code (including the native
> code) inside the Mozilla browser and it also runs as it should.
> Unfortunately, when I deploy my code to the server, the Javascript
> does not seem to be able to find my native library (SolverLibrary)
> even though the Javascript is definitely working. I have tried copying
> the library to every conceivable location that I could think of but
> have thus far failed. I am running Windows XP and using Apache as my
> http server. Any ideas for where I should put the native library so
> that the Javascript can find it?
>
> Disclaimer: I am a definite newbie with GWT and a mathematician by
> trade. If I am doing something outrageously stupid, I apologize for
> wasting everyone's time, but please let me know what I'm doing wrong
> so that I don't wind up smashing my computer and scaring my son.
> Thanks, Darin
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to