I am trying to use Google Maps Javascript API in a java application through Nashorn (basically lets you run javascript in java). Anyway when I load the API I get an error that "window" is not defined in the API.

Does anyone know where I might be able to find documentation on "window" or where in the API it might be defined?

1 Answer 1


It wasn't actually a google maps API issue (which I couldn't tell from the console). Upon further inspection of Oracle's Nashorn documentation I found that Nashorn doesn't support 'objects normally supported in web-browsers' such as window and console. Well that is too bad.

For more information you can find it here, right before the section titled "Scripting Extensions".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.