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

  • SEARCH
  • Home
  • 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 7177331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:41:28+00:00 2026-05-28T16:41:28+00:00

I want to add javascript enable pane in my java webbrowser. I have heard

  • 0

I want to add javascript enable pane in my java webbrowser.
I have heard about Rhinno , v8 etc javaScript engine
but don’t know how to use it.
Is there any link for tutorial of their implementation of this as i m new in java.
Or could you please send me link for Downloading Of JWebPane.
Thank You

  • 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-28T16:41:29+00:00Added an answer on May 28, 2026 at 4:41 pm

    It sounds like you’re writing or modifying a web browser written in Java, that doesn’t have a JavaScript interpreter feature yet. If so, then Rhino is probably the easiest thing to use to add it.

    There are lots of examples of how to use it on the Mozilla Rhino examples page. Rhino is pretty easy to invoke, as this example demonstrates:

    /* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     *
     * ***** BEGIN LICENSE BLOCK *****
     * Version: MPL 1.1/GPL 2.0
     *
     * The contents of this file are subject to the Mozilla Public License Version
     * 1.1 (the "License"); you may not use this file except in compliance with
     * the License. You may obtain a copy of the License at
     * http://www.mozilla.org/MPL/
     *
     * Software distributed under the License is distributed on an "AS IS" basis,
     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     * for the specific language governing rights and limitations under the
     * License.
     *
     * The Original Code is Rhino code, released
     * May 6, 1998.
     *
     * The Initial Developer of the Original Code is
     * Netscape Communications Corporation.
     * Portions created by the Initial Developer are Copyright (C) 1999
     * the Initial Developer. All Rights Reserved.
     *
     * Contributor(s):
     *
     * Alternatively, the contents of this file may be used under the terms of
     * the GNU General Public License Version 2 or later (the "GPL"), in which
     * case the provisions of the GPL are applicable instead of those above. If
     * you wish to allow use of your version of this file only under the terms of
     * the GPL and not to allow others to use your version of this file under the
     * MPL, indicate your decision by deleting the provisions above and replacing
     * them with the notice and other provisions required by the GPL. If you do
     * not delete the provisions above, a recipient may use your version of this
     * file under either the MPL or the GPL.
     *
     * ***** END LICENSE BLOCK ***** */
    
    import org.mozilla.javascript.*;
    
    /**
     * RunScript: simplest example of controlling execution of Rhino.
     *
     * Collects its arguments from the command line, executes the
     * script, and prints the result.
     *
     * @author Norris Boyd
     */
    public class RunScript {
        public static void main(String args[])
        {
            // Creates and enters a Context. The Context stores information
            // about the execution environment of a script.
            Context cx = Context.enter();
            try {
                // Initialize the standard objects (Object, Function, etc.)
                // This must be done before scripts can be executed. Returns
                // a scope object that we use in later calls.
                Scriptable scope = cx.initStandardObjects();
    
                // Collect the arguments into a single string.
                String s = "";
                for (int i=0; i < args.length; i++) {
                    s += args[i];
                }
    
                // Now evaluate the string we've colected.
                Object result = cx.evaluateString(scope, s, "<cmd>", 1, null);
    
                // Convert the result to a string and print it.
                System.err.println(Context.toString(result));
    
            } finally {
                // Exit from the context.
                Context.exit();
            }
        }
    }
    

    So when setting up to execute JavaScript included in a web page, you’d add the various environment objects (document and such) to the scope object, and then use evaluateString to evaluate it.

    This is going to be a significantly non-trivial task. If you’re still new to Java, I’d recommend starting with something smaller.

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

Sidebar

Related Questions

I have numbers in javascript from 01(int) to 09(int) and I want add 1(int)
i have this javascript code to which i want to add the jquery fade-in
i have javascript as below html=<th>+<?php echo __(); ?>+</th>; I want to add another
I want to add a element into the existing DOM to have the javascript
I want to add some style to head tag in html page using javascript.
I have dbml with single table users i want add partial class for User
I have a website built with ASP.NET (3.5) and want add some level of
I have a list of string values that I want add to a hashtable
I want to add a + button to div 1 only if JavaScript enabled
I want to add javascript to asp.net page dynamically. can anybody point me towards

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.