...
IMPORTANT: Do not skip this step. If you do, you will not be running the code in your IDE and will waste hours wondering why you make changes and they don't run.
Using NetBeans (JDK-8)
Many commiters are using NetBeans to develop Java and native code. NetBeans projects have been configured for both. Native projects in NetBeans are currently not configured to build using either Make or gradle, however ant build works in NetBeans and will build the classes and jar files needed for the IDE.
...
You should take advantage of Eclipse's incremental compiler and faster unit tests compared to gradle tasks, however, you still need gradle for the initial setup (./gradlew
or /.gradlew build
) that generates resources that are specified in the Eclipse projects dependencies, and to verify that you can build with javac. You can either use gradle from the command line or use Buildship (recommended).
Import the Eclipse Projects
...
Right click on the resource you want to test (project/package/class) and select Run as -> JUnit Test
.
You might need to add the following VM arguments:
-Djava.library.path=<path to repo>/build/sdk/lib
-Djavafx.toolkit=test.com.sun.javafx.pgstub.StubToolkit
When running test.javafx.scene.web.WebViewTest, instead of the -Djavafx.toolkit
argument, use:
-Djava.library.path=<path to repo>/modules/javafx.graphics/build/module-lib:<path to repo>/modules/javafx.web/build/module-lib
Running a dependent project
...
The project structure for Gradle is such that the root directory (/rt
) contains the parent project with all other projects being its children. The Gradle Tasks view will allow you to execute the tasks that you would use Cygwin for otherwise.
...
- Install Buildship.
- Go to
File -> Import -> Gradle -> Existing Gradle Projects.
- Set the root directory to the base repository path (/
rt
by default). Finish and wait for the workspace to rebuild. This will result in many compilation errors.
Revert all .classpath and files (and clean and rebuild if it does not happen automatically - this will some take time). There should be no compilation errors.
What this process does is add the Gralde nature and build command to the .project files. This means that these files are now different than the ones in the repo. Additionally, the .settings folder for each project will contain a Buildship pref file. You will need to resolve the conflicts with the upstream repo, e.g., via hg ignore
or hg forget
.
Run Sample Code with Gradle Built Shared Libraries (Note: old)
...