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 899497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:13:37+00:00 2026-05-15T15:13:37+00:00

Using the scripting framework (javax.script.*), it’s really easy to get basic integration between Java

  • 0

Using the scripting framework (javax.script.*), it’s really easy to get basic integration between Java and Javascript working. However, once you get to the point of wanting to do something really useful, you run into all the little ways that the bridge from Javascript back to Java (and, to some extent, the other direction too) are messy.

Example: if you’ve got a Javascript object set up to implement a Java interface (which is basically easy to do), and one of the methods you want to implement needs to return an array of strings, you can’t just do this:

    // ...
    return [ firstString, "hello world", lastString ];

That won’t work because Javascript arrays aren’t automatically converted to Java arrays. You have to explicitly construct a Java array with reflection, fill it up, and return that.

There are several irritating things like that, and none of them are hard to deal with, really, but as I’m now starting in on the second project that needs those tools I wonder whether this has been solved by some simple Javascript “bridge” framework designed for this purpose. I’ve found nothing useful via google searches (mostly because any search with the term “java” in it results in a billion hits), but there are people here who seem to know everything so I thought I’d ask.

  • 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-15T15:13:38+00:00Added an answer on May 15, 2026 at 3:13 pm

    One way that you can help the problem is using one of the two answers here. I’ve successfully gotten the Java based solution to work with variables.

    The second one can easily be adapted into a JS util function. IE

      return toJavaArray(["something",1]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 506k
  • Answers 506k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Make them properties of a @ViewScoped bean. @ManagedBean @ViewScoped public… May 16, 2026 at 3:42 pm
  • Editorial Team
    Editorial Team added an answer I don't know the Pros (there might be, I just… May 16, 2026 at 3:42 pm
  • Editorial Team
    Editorial Team added an answer In SVG a text shadow effect isn't as simple as… May 16, 2026 at 3:42 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am using javax.scripting to add support for running arbitrary user-uploaded JavaScripts on the
I'm using rhino via the bean scripting framework to create and configure objects in
I have the following file file: <html> <head> <title></title> <script type=text/javascript src=/Prototype.js></script> <script type=text/javascript>
I have been reading the JavaScript Scripting Guide for Quicktime and in there it
In most of the Programming or scripting language such as PHP or JavaScript, i
I am working on a servlet (runs on tomcat) which receives requests that contains
In addition to the explanation, what does the $ mean in javascript? Here is
I am new to Java (but have a fair bit of .NET experience). I
Is it possible to generate a parser for a scripting language that uses the
Is it possible to convert an image file to BMP format using WindowsXP's native

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.