OpenJFX is an open source project and we love to receive contributions from our community — you! There are many ways to contribute, from improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into OpenJFX itself.
If you think you have found a bug in OpenJFX, first make sure that you are testing against the latest version - your issue may already have been fixed. If not, search our issues list on Java Bug System (JBS) in case a similar issue has already been opened. More information on where and how to report a bug can be found at http://bugreport.java.com/
It is very helpful if you can prepare a reproduction of the bug. In other words, provide a small test case which we can run to confirm your bug. It makes it easier to find the problem and to fix it.
Provide as much information as you can. The easier it is for us to recreate your problem, the faster it is likely to be fixed.
If you find yourself wishing for a feature that doesn't exist in OpenJFX, you are probably not alone. There are bound to be others out there with similar needs. Many of the features that OpenJFX has today have been added because our users saw the need. Open an issue on our issues list on JBS which describes the feature you would like to see, why you need it, and how it should work.
If you have a bugfix or new feature that you would like to contribute to OpenJFX, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change.
We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code.
Note that it is unlikely the project will merge refactors for the sake of refactoring. These types of pull requests have a high cost to maintainers in reviewing and testing with little to no tangible benefit. This especially includes changes generated by tools. For example, converting all generic interface instances to use the diamond operator.
Once you have created a bug report or confirmed its existance on JBS, you will need to fork the repository and clone it to your local machine. See github help page for help.
Once your changes and tests are ready to submit for review:
-
Test your changes
Run the test suite to make sure that nothing is broken.
-
Sign the Contributor License Agreement
Ultimately, the goal is to send accepted Pull Requests upstream to the OpenJFX repository hosted at Oracle infrastructure. Therefore, please make sure you have signed the Oracle Contributor Agreement . We are not asking you to give up your copyright, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the OCA once.
-
Rebase your changes
Update your local repository with the most recent code from the main repository, and rebase your branch on top of the latest
develop
branch. We prefer your initial changes to be squashed into a single commit. Later, if we ask you to make changes, add them as separate commits. This makes them easier to review. As a final step before merging we will either ask you to squash all commits yourself or we'll do it for you. -
Submit a pull request
Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, choose a title which sums up the changes that you have made, and in the body provide more details about what your changes do. The title should include a JBS Bug ID, which will make it easier for reveiwers to cross-refrence your pull requests with JBS.
Then sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, we would love to work with you to get your pull request merged into OpenJFX.
Please adhere to the general guideline that you should never force push
to a publicly shared branch. Once you have opened your pull request, you
should consider your branch publicly shared. Instead of force pushing
you can just add incremental commits; this is generally easier on your
reviewers. If you need to pick up changes from develop
, you can merge
develop
into your branch. A reviewer might ask you to rebase a
long-running pull request in which case force pushing is okay for that
request. Note that squashing at the end of the review process should
also not be done, that can be done when the pull request is integrated
via GitHub.
Minimum JDK 9 is required to build OpenJFX. You must have a JDK 9 installation
with the environment variable JAVA_HOME
referencing the path to Java home for
your JDK 9 installation. By default, tests use the same runtime as JAVA_HOME
.
Currently OpenJFX builds are running on JDK 9 and JDK 10.
We support development in any major Java IDE (Eclipse,IntelliJ, Netbeans). IDEs can automatically configure projects based on Gradle setup.
Please follow these formatting guidelines:
- Java indent is 4 spaces
- Line width is 140 characters
- The rest is left to Java coding standards
- Disable “auto-format on save” to prevent unnecessary format changes. This makes reviews much harder as it generates unnecessary formatting changes. If your IDE supports formatting only modified chunks that is fine to do.
- Wildcard imports (
import foo.bar.baz.*
) are forbidden and may cause the build to fail. Please attempt to tame your IDE so it doesn't make them and please send a PR against this document with instructions for your IDE if it doesn't contain them. - Don't worry too much about import order. Try not to change it but don't worry about fighting your IDE to stop it from doing so.
OpenJFX uses the Gradle for its build. Before submitting your changes, run the test suite to make sure that nothing is broken, with:
gradle all test
Even more documentaton on OpenJFX projects and its build system can be found at https://wiki.openjdk.java.net/display/OpenJFX/