Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7618217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:20:53+00:00 2026-05-31T03:20:53+00:00

I have experience in GWT but know nothing about JSNI or Javascript . i

  • 0

I have experience in GWT but know nothing about JSNI or Javascript . i am searching for few days for JSNI now but i am not able to understand how to implement JSNI in my GWT project.

where and how i will add a javascript file in my GWT project, where i will write my javascript?

and then i want to call a javascript method from java/GWT

Here is a simple example of how to code a JSNI method that puts up a JavaScript alert dialog:

          public static native void alert(String msg) /*-{
          $wnd.alert(msg);
           }-*/;

but where will i add this code in my GWT project

i hvae just created a new project “HelloJSNI” and in my class HelloJSNI.java , i added this code , am i doing write ?

      public void onModuleLoad() {
        alert("call from java to Javascript");

    }
    public void testJSNI(int amt, float interestRate,
            int term){
        Window.alert("call from javascript to java");
    }
    public static native void alert(String msg) /*-{
//    $wnd.alert(msg);
      $wnd.testJSNI=
          $entry(@com.jsni.client.HelloJSNI::testJSNI(IFI));

    }-*/;
}

will i be able to see “hello JSNI “?
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:20:54+00:00Added an answer on May 31, 2026 at 3:20 am

    The first and best place to learn about JSNI is this article.

    If you have any more specific questions after reading that article, please ask here on SO.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 4 days of experience with Google Maps Javascript API and i find
I do a lot of work with GWT but don't have experience of Flex.
I have experience about PDO but I was working with MySQL so far. I
Anyone have experience with this plugin? I have it installed but I have no
I have experience on windows client dev, language c++, and Flash ActionScript3 dev, but
I have experience with C++ but I've never really used Qt before. I'm trying
Does anyone have experience writing a Facebook application using GWT with GAE? I'm new
I have developed web applications using JSF (myfaces components). But in these days of
What's the advantage of EXT GWT compare to GWT? I have some experience in
I have experience with Android's search functionality as described here: http://developer.android.com/guide/topics/search/index.html , but haven't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.