2

I'm working on porting an existing codebase to GWT, but I am to change as little of the existing Java code as possible since GWT allows us to reuse much of this code from our existing Java app, in out new GWT-based version.

In many places, functionality of our own classes changes dramatically between the Java and GWT implementations, so we put in an interface and implement this separately on the GWT side. The same is true of some Java classes - Locale springs to mind.

Some Java classes that we use (but which do not exist in GWT's JRE emulation library) we have written for ourselves, which has given us the ability to make minor adjustments where needed (Locale was one of these).

However there are a few Java classes which are not present in GWT's JRE emulation layer, but would compile with absolutely no problems if we were to put them there (ie copy and paste the code into our own emulation layer).

I'm trying to read the license, but having no luck in determining - are we permitted to copy the code from say, StringTokenizer, to our own java.util.StringTokenizer.java? Alternatively is there any other way of pulling code such as this into GWT? I see no point in reinventing or rewriting the wheel, but don't want to fall on the wrong side of the license.

Thanks!

2 Answers 2

1

Depending on your project you might be able to use source from the OpenJDK as that is GPL licensed.

Each source file is licensed individually so make sure you check thee license of the code you use.

Sign up to request clarification or add additional context in comments.

1 Comment

This is the way forward for me. Thanks very much.
1

There is a library called GWTx which seems to be an extension of GWTs JRE emulation and contains some of the classes and methods that are not in GWTs JRE emulation library.

6 Comments

I was wary of using this, as the latest activity was May 2009. Do you (or anybody else) have experience using GWTx recently? I see that it is only today that somebody posted a fix to make it work with GWT2.2+.
@Richter I haven't used GWTx myself I'm afraid. I think @Dave Webb may be right, you could use source from the OpenJDK...
At least you could extract the code from GWTx and integrate into your project.
That's a good point @helios! The guys who wrote GWTx must have gotten the code from the JDK?
I think that's going to be my way forward. I don't think GWTx will be entirely OpenJDK, I assumed the purpose of the project was to adapt those Java classes to compile in GWT. Thanks for the insights guys.
|

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.