Stefan Oltmann
09/14/2023, 11:02 AMContents/app/resources
(the default location). Now I want my app to call it using Runtime.getRuntime().exec()
.
My problem is that I don't know the folder in which my app is executed.
System.getProperty("user.dir")
always returns /
.
On Windows I get the actual directory where my app is living.
How can I determine the correct path to my helper tool?ephemient
09/14/2023, 11:21 AM[[NSBundle mainBundle] pathForResource:ofType:]
normally but I don't know how to access that from JVMStefan Oltmann
09/14/2023, 11:21 AMStefan Oltmann
09/14/2023, 11:22 AMDYLD_LIBRARY_PATH
which seems to be set for the skiko lib.
But that of course feels wrong.ephemient
09/14/2023, 11:23 AMStefan Oltmann
09/14/2023, 11:35 AMjava.lang.IllegalAccessError: class MainKt (in unnamed module @0x2080a082) cannot access class com.apple.eio.FileManager (in module java.desktop) because module java.desktop does not export com.apple.eio to unnamed module @0x2080a082
ephemient
09/14/2023, 11:44 AM--add-opens java.desktop/com.apple.eio=ALL-UNNAMED
would get around itpdvrieze
09/14/2023, 4:47 PM/usr/libexec/<myProg>
| common with open source programs) or to use some configuration file).sciack
09/17/2023, 7:41 AMmikehearn
09/17/2023, 6:02 PMapp.dir
system propertymikehearn
09/17/2023, 6:03 PMStefan Oltmann
09/19/2023, 7:30 AMMaybe is easier to copy the executable(s) in a temp dir and execute it. But that could impact with MacOS security model.Yes, it must be part of the App and be signed. Otherwise, it will not be executed.
Stefan Oltmann
09/19/2023, 7:35 AMoh if that's the only issue thenHow can I configure this?would get around it--add-opens java.desktop/com.apple.eio=ALL-UNNAMED
sciack
09/19/2023, 7:37 AMsciack
09/19/2023, 7:38 AMmodules("java.sql", "java.desktop", "java.naming")
sciack
09/19/2023, 7:39 AMcompose.desktop {
application {
mainClass = "passwordStore.MainKt"
jvmArgs += listOf("-Dkpassword-store.mode=PROD")
nativeDistributions {
targetFormats(TargetFormat.Rpm, TargetFormat.Msi)
packageName = "kpassword-store"
modules("java.sql", "java.desktop", "java.naming")
packageVersion = semver.version.substringBefore('-')
licenseFile.set(File("LICENSE"))
vendor = "Mirko Sciachero <m.sciachero@gmail.com>"
this.description = """
Program to manage and store credentials, similar to keepass but simpler \
Implemented in Kotlin and JCompose
""".trimIndent()
linux {
menuGroup = "Password Store"
rpmLicenseType = "UNLICENSE"
iconFile.set(File("src/main/resources/icons/lockoverlay.png"))
this.shortcut = true
}
windows {
upgradeUuid = "89c4e09f-40e5-4542-9396-934cca615a63"
menuGroup = "Password Store"
vendor = "Mirko Sciachero"
console = false
iconFile.set(File("lockoverlay.ico"))
}
}
}
}
try to add in a macos
configurationStefan Oltmann
09/19/2023, 7:41 AMmodules("java.sql", "java.desktop", "com.apple.eio")
, but that's not correct.
There must be a way to add additional compiler config strings, which I don't see right now.sciack
09/19/2023, 7:42 AMStefan Oltmann
09/19/2023, 7:42 AMStefan Oltmann
09/19/2023, 7:43 AMSymbol is declared in module 'java.desktop' which does not export package 'com.apple.eio'
sciack
09/19/2023, 7:43 AMStefan Oltmann
09/19/2023, 7:44 AMsciack
09/19/2023, 7:46 AMStefan Oltmann
09/19/2023, 7:46 AMsciack
09/19/2023, 7:46 AMsciack
09/19/2023, 7:46 AMStefan Oltmann
09/19/2023, 7:47 AMStefan Oltmann
09/19/2023, 8:04 AMStefan Oltmann
09/19/2023, 8:04 AMcompose.application.resources.dir
Stefan Oltmann
09/19/2023, 8:05 AM