This message was deleted.
# compose-desktop
s
This message was deleted.
a
The packaging tasks should use the JRE pointed to by JAVA_HOME (when run from the command line).
It’s not likely to be a bug.
m
You can use a normal JDK which contains all the tools for packaging and define the JRE you want to bundle with your app separately here:
Copy code
compose.desktop {
    application {
        mainClass = "MainKt"
        javaHome = JAVA_PACKAGE_HOME
        ...
where JAVA_PACKAGE_HOME could be pointing to your JBR.
thank you color 2
a
My app is packaging with JBR without setting
javaHome
in
application
. I just have this in IDEA:
But setting
javaHome
is probably the more robust way.
Try a standalone JBR installation maybe
For me
~/Library/Java/JavaVirtualMachines/jbr-17.0.9-1/Contents/Home/bin
does have the
jpackage
and
jlink
binaries
The JBR that comes bundled with Android Studio could have those binaries stripped
Also in IDEA -> File -> Project Structure -> SDKs -> Plus button
What’s
JBR.isAvailable()
? It returning false seems to be a contradiction
print
System.getProperty("java.vendor")
m
The JBRs from https://github.com/JetBrains/JetBrainsRuntime/releases do indeed not contain jpackage and jlink and thus cannot be used.
Yes, that once happened to me accidentally. Therefore I was surprised that the JBRs I examined either did not contain jpackage/jlink or, if the do contain it, it does not work. Does the DecoratedWindow in jewel now work with this?
By the way, the JBR in
Copy code
IntelliJ IDEA 2023.3 Beta (Community Edition)
Build #IC-233.11799.67, built on November 22, 2023
Runtime version: 17.0.9+7-b1087.7 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.1.1
does not seem to contain jpackage/jlink. Which version did you use?
t
I used the JBR installed by navigating to
File -> Project Structure -> SDKs -> Plus button
from Intellij IDEA IDEA version
Copy code
IntelliJ IDEA 2023.2.5 (Community Edition)
Build #IC-232.10227.8, built on November 9, 2023
Runtime version: 17.0.9+7-b1000.46 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
    debugger.new.tool.window.layout=true
    ide.experimental.ui=true
installed JBR version
17.0.9 (JetBrains s.r.o. 17.0.9+7-b1087.7)
m
Ahhh, that worked. The packaged application reports:
Copy code
java.vm.name: OpenJDK 64-Bit Server VM
java.runtime.version: 17.0.9+7-b1087.7
os.name: Mac OS X
os.arch: x86_64
java.vendor: JetBrains s.r.o.
Is this runtime now also compatible with Jewel? I haven’t had the time to try that yet.