Just noticed my app on my mac is "Intel" and not "...
# compose-desktop
c
Just noticed my app on my mac is "Intel" and not "Apple". That means it's using rosetta right? Can I adjust that?
h
Yes. Use a arm JRE.
a
Wow are you in for a pleasant surprise.
😄 8
c
I thought I was using an arm jre? im using https://github.com/mdogan/homebrew-zulu Maybe there's somewhere else I gotta declare that though besides IDE > Gradle > JDK? @Alexander Maryanovsky what does that mean? lol
a
The gradle JDK is not necessarily the app’s runtime JRE.
I think it’s the one specified by $JAVA_HOME
Run
Copy code
println(System.getProperties().entries.joinToString("\n") { "${it.key}: ${it.value}" })
and see what you get
c
Interesting. I just remembered I had to add some jvmToolchain lines (as part of conveyor packaging). maybe thats part of the issue?
Copy code
kotlin {
    jvm("desktop")
    jvmToolchain {
        languageVersion.set(JavaLanguageVersion.of(17))
        vendor.set(JvmVendorSpec.JETBRAINS)
    }
https://github.com/hydraulic-software/compose-multiplatform-starter/blob/master/composeApp/build.gradle.kts#L34-L37
a
That sounds like the JDK with which the app is compiled.
But I can’t say for sure
c
fwiw. here's my output of the function call you provided
Copy code
java.specification.version: 17
sun.jnu.encoding: UTF-8
java.class.path: /Users/cidle/Developer/kmp/RollerToaster/composeApp/build/classes/kotlin/desktop/main:/Users/cidle/Developer/kmp/RollerToaster/composeApp/build/processedResources/desktop/main:/Users/cidle/.gradle/caches/modules-2/files-2.1/io.github.kdroidfilter/composenativetray/0.5.5/8ddb408140d7f0b7a8c13d5705d11af5f9b63ffd/composenativetray-0.5.5.jar: + a bunch more
sun.awt.enableExtraMouseButtons: true
java.vm.vendor: JetBrains s.r.o.
sun.arch.data.model: 64
user.variant: 
sun.font.fontmanager: sun.font.CFontManager
java.vendor.url: <https://openjdk.java.net/>
user.timezone: America/New_York
java.vm.specification.version: 17
os.name: Mac OS X
apple.laf.useScreenMenuBar: true
user.country: US
sun.java.launcher: SUN_STANDARD
sun.boot.library.path: /Users/cidle/Library/Java/JavaVirtualMachines/jbr-17.0.11/Contents/Home/lib
sun.java.command: com.cerealbarapps.RollerToaster.MainKt
jdk.debug: release
sun.cpu.endian: little
user.home: /Users/cidle
user.language: en
java.specification.vendor: Oracle Corporation
java.version.date: 2024-04-16
java.home: /Users/cidle/Library/Java/JavaVirtualMachines/jbr-17.0.11/Contents/Home
file.separator: /
java.vm.compressedOopsMode: Non-zero based
line.separator: 

java.vm.specification.vendor: Oracle Corporation
java.specification.name: Java Platform API Specification
intellij.os.virtualization: none
jbr.virtualization.information: No virtualization detected
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
java.runtime.version: 17.0.11+1-b1312.2
user.name: cidle
path.separator: :
os.version: 15.3.1
sun.awt.noerasebackground: true
java.runtime.name: OpenJDK Runtime Environment
file.encoding: UTF-8
java.vm.name: OpenJDK 64-Bit Server VM
java.vendor.version: JBR-17.0.11+1-1312.2-nomod
java.vendor.url.bug: <https://bugreport.java.com/bugreport/>
java.io.tmpdir: /var/folders/9t/_r5bx1c15c56nw02hzp866xr0000gn/T/
java.version: 17.0.11
user.dir: /Users/cidle/Developer/kmp/RollerToaster/composeApp
os.arch: aarch64
java.vm.specification.name: Java Virtual Machine Specification
native.encoding: UTF-8
java.library.path: /Users/cidle/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
<http://java.vm.info|java.vm.info>: mixed mode, sharing
java.vendor: JetBrains s.r.o.
java.vm.version: 17.0.11+1-b1312.2
sun.io.unicode.encoding: UnicodeBig
apple.awt.UIElement: true
java.class.version: 61.0
a
That looks like arm to me
c
thanks. i will keep investigating. good to know that it should be arm indeed.
found my issue. it ended up being a botched copy pasta job from myself when i was worker on porting over the conveyor download page logic into my own website.
worth noting. everything seems a lot faster as well. like sub second launch speeds now. nice