RFR: 8258499: JavaFX: Move src.zip out of the lib directory

Marius Hanl mhanl at openjdk.java.net
Wed Jun 30 16:13:03 UTC 2021


On Wed, 30 Jun 2021 15:06:50 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> The JavaFX SDK bundle provides a set of modular jars in the `lib` directory. It provides a `src.zip` file for use by IDEs in that same `lib` directory. If a developer adds the `lib` directory to their application's module path in the IDE, it will try to load `src.zip` as if it were a jar file, and will fail. This is a pain point for developers using the SDK. 
> 
> The proposed solution is to move the `src.zip` file from the lib directory to the top directory of the SDK.
> 
> With this fix, the layout of the SDK will be:
> 
> 
> <sdk>/
>     bin/                      (Windows)
>         <native libraries>    (Windows)
> 
>     legal/
>         ...
> 
>     lib/
>         *.jar
>         <native libraries>    (macOS and Linux)
> 
>     src.zip
> 
> 
> NOTES:
> 1. The JavaFX Eclipse plugin will need a minor change, which is tracked by eclipse-efx/efxclipse-eclipse#85.
> 2. This still needs to be tested on IntelliJ

I just tried it with IntelliJ. 

I did the following steps:
1. I build the PR with **gradle sdk**
2. I copied the content of the sdk folder into an own '**jfx-17-internal**' folder.
3. I added the **lib** folder as library in IntelliJ<details><summary>Screenshot</summary>![image](https://user-images.githubusercontent.com/66004280/123993257-9158be00-d9cc-11eb-9acd-cefe66daaa32.png)</details>
4. I navigated into a class file (**Stage** in this case) and clicked on '**Choose sources...**' (top right)<details><summary>Screenshot</summary>![image](https://user-images.githubusercontent.com/66004280/123993603-dbda3a80-d9cc-11eb-8233-5ac6da3b321e.png)</details>
5. I chose the **src.zip** which is now inside the root folder<details><summary>Screenshot</summary>![image](https://user-images.githubusercontent.com/66004280/123994144-60c55400-d9cd-11eb-984d-ea137aa43b22.png)</details>
6. I can now see the sources (in my case: **Stage**)<details><summary>Screenshot</summary>
![image](https://user-images.githubusercontent.com/66004280/123995006-2dcf9000-d9ce-11eb-88d1-4e224be959c1.png)
</details>

Is this sufficient/Do I miss something or is this fine as test?

-------------

PR: https://git.openjdk.java.net/jfx/pull/558


More information about the openjfx-dev mailing list