Skip to content

Commit

Permalink
Add links to IDEs to website
Browse files Browse the repository at this point in the history
  • Loading branch information
jwharm committed Jun 14, 2024
1 parent 3330950 commit 47e7888
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions website/docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,21 @@ Registering a Java class as a new GType is documented [here](register.md).
## Creating a Gtk composite template class

To create a Gtk composite template class (coupled to a ui definition in XML or Blueprint format), read [these instructions](templates.md).

## GNOME Builder

![Screenshot of GNOME Builder with JDTLS](img/gnome-builder-screenshot.png)

A great tool for developing GNOME applications is GNOME Builder. Builder primarily supports C, JavaScript, Rust, Python and Vala applications, but you can use it to develop Java applications as well, if you have the Eclipse JDT language server (JDTLS) installed.

!!! warning
In my limited experience this is still very unpolished and fragile. For any serieus work, by all means use a well-supported Java IDE.

1. Install GNOME Builder. Preferably the newest release from Flathub, but at least version 44.
2. Download JDTLS [here](https://download.eclipse.org/jdtls/milestones/). Pick the latest milestone version and download the file `jdt-language-server-...-tar.gz`.
3. Extract the downloaded file into a local directory.
4. Add the `[jdtls folder]/jdtls/bin` to your `$PATH`. The easiest way to do that, is with a symlink like this: `ln -s ~/Downloads/jdt-language-server-1.35.0-202404251256/bin/jdtls ~/.local/bin/jdtls`
5. Start GNOME Builder and open a Java project.
6. Open a `.java` file. Builder will spawn the JDT language server and will display "Initialize Workspace". This might take a few minutes.
7. When the initialization has completed, you can develop and build your Java project with GNOME Builder.

Binary file added website/docs/img/gnome-builder-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions website/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ Build and run the application using your IDE or build tool of choice. The follow

See [this `build.gradle` file](https://github.com/jwharm/java-gi-examples/blob/main/HelloWorld/build.gradle) for a complete example.

!!! tip "Use an IDE"
An Integrated Development Environment (IDE) with support for Java is the most efficient way to develop software in Java. IDEs will help setup a project and build configuration, navigate and refactor source code, detect problems and suggest improvements. The most commonly used Java IDEs are:

* [JetBrains IntelliJ IDEA](https://www.jetbrains.com/idea/)
* [Eclipse IDE](https://eclipseide.org/)
* [Apache NetBeans](https://netbeans.apache.org/)
* [Visual Studio Code with a Java extension](https://code.visualstudio.com/docs/languages/java)

If you often work from the command line, [SDKMAN!](https://sdkman.io/) will proove useful to manage your installed SDKs and build tools.

## Further reading

For more advanced instructions on using Java-GI consult [this page](advanced.md), and read about subclassing GObject classes with Java-GI [here](register.md). If you're new to Gtk development, read the [Gtk "Getting started" guide](getting-started/getting_started_00.md) that has been translated to use Java for all code examples.
Expand Down

0 comments on commit 47e7888

Please sign in to comment.