Thursday, July 20, 2017

Re: Transpile plain Java project WITHOUT references to any UI, DOM, or any other web/framework features

I realize this question is a couple of weeks old, but I figure it's still worth answering in case you haven't found a solution. 

Do you run


before you try to load your GWT library? When RN loads, it does define a global window object. I haven't tried using GWT generated code in React Native, but I've used them both quite heavily in the past, so I'll give it a try and see how it goes. 

On Thursday, June 29, 2017 at 7:13:36 AM UTC-4, Igor wrote:
Hi all,

I have a Java project which performs scientific calculations. It does not have any dependencies and it does not reference any UI, DOM, or any other web environment features. It is basically a few custom data structures and algorithms. I wish to expose one class in this project using JsInterop and consume it in a React Native and React app.

I've successfully transpiled the Java into Javascript, but I am unable to use it my React Native app because the resulting Javascript seems to reference UI elements (there's always "var $wnd = $wnd || window.parent..." at the top of the cache.js file which React Native chokes on). Is there a way to achieve my goal and, if so, how?



You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment