Comments (3)
While I was solving the problem on my own I found this : #1675
I tried Execute packageUberJarForCurrentOS, Run with java -jar file.jar, and an error occurred. According to the operation in the article, I added
tasks.register<Zip>("repackageUberJar") {
val packageReleaseUberJarForCurrentOS = tasks.getByName("packageReleaseUberJarForCurrentOS")
dependsOn(packageReleaseUberJarForCurrentOS)
val file = packageReleaseUberJarForCurrentOS.outputs.files.first()
val output = File(file.parentFile, "${file.nameWithoutExtension}-repacked.jar")
archiveFileName.set(output.absolutePath)
destinationDirectory.set(file.parentFile.absoluteFile)
exclude("META-INF/*.SF")
exclude("META-INF/*.RSA")
exclude("META-INF/*.DSA")
from(project.zipTree(file))
doLast {
delete(file)
output.renameTo(file)
logger.lifecycle("The repackaged jar is written to ${archiveFile.get().asFile.canonicalPath}")
}
}
I Execute packageUberJarForCurrentOS again, and Run with java -jar file.jar, all functions run normally, but when I want to Execute packageReleaseDistributionForCurrentOS, I found that there will still be SecurityException, so How to exclude few META-INF files for packageReleaseDistributionForCurrentOS, I think this may work for me very useful
from compose-multiplatform.
I tried again to solve this problem myself
- Try to execute
runReleaseDistributable
and an error occurs.
- Looking at the log, I found that this jar package was copied from .gradle and filtered. I donβt know what was done in the middle.
- Find the original jar file, execute
jarsigner -verify
, and it will prompt that the jar has been verified. - Find the copied jar file and execute
jarsigner -verify
again, prompt
jarsigner: java.lang.SecurityException: SHA-256 digest error for org/bouncycastle/LICENSE.class
- Delete the internal
META-INF/*.RSA, META-INF/*.SF, META-INF/*.DSA, META-INF/*.EC
files from the copied bcpkix, bcprov, and bcutil jars. - Execute
zip -d file.jar 'META-INF/*.SF' 'META-INF/*.RSA' 'META-INF/*.DSA' 'META-INF/*.EC'
- Double-click to launch file.app
- The program runs normally, no errors are reported
I want to know what was filtered in step 2, and how can I delete some files under META-INF when copying?
from compose-multiplatform.
I'm very sorry. During my subsequent debugging, I found that this has nothing to do with resources
. I will provide a minimal reproduction program to help troubleshoot the problem.
https://github.com/LazyIonEs/compose-multiplatform-desktop-template
In the above program, when I add in compose-desktop.pro
-keepclasseswithmembers public class MainKt {
public static void main(java.lang.String[]);
}
-keep class org.bouncycastle.** { *; }
When executing runReleaseDistributable
, an error message java.lang.SecurityException: SHA-256 digest error for org/bouncycastle/operator/OperatorCreationException.class
will appear.
I think it may be because of the rule -keep class org.bouncycastle.** { *; }
, but when I delete it, the rule in compose-desktop.pro
is
-keepclasseswithmembers public class MainKt {
public static void main(java.lang.String[]);
}
# -keep class org.bouncycastle.** { *; }
I executed runReleaseDistributable
again, and an error message cannot create signer: no such algorithm: SHA256WITHRSA for provider BC
appeared.
I don't understand why
Can you help me solve this problem?
from compose-multiplatform.
Related Issues (20)
- Android Composables not transformed by compiler in 1.6.10 HOT 5
- 1.6.10-rc03 version error HOT 3
- 1.6.10: MPP with JS but without WASM target: Cannot determine the version of Skiko for Compose '1.6.10 HOT 5
- Compose for Desktop doesn't emit lifecycle events, only states HOT 4
- [Web/Wasm] TextField not opening keyboard in mobile browser HOT 1
- String resource mapping web 1.6.10-rc03
- Change position of MenuBar HOT 2
- Compose Desktop IDE Plugin doesn't show when using Jetbrains Preview annotation HOT 1
- ImageViewer example: Android application crash due to missing Android Manifest FileProvider HOT 2
- `MissingResourceException` after updating to v1.6.10 and. Kotlin 2.0.0 HOT 2
- navigation-compose in kmp/cmp sometimes flashes to next screen, or you can go back enough to get to white screen HOT 4
- Compose Compiler (iOS): public Composable functions in expect/actual class is attempted to be exported to ObjC HOT 1
- Support Material3 version 1.3.0-Beta01
- ComposeUiViewController with nested scrollable column shrinks Column with UIModalPresentationFormSheet
- Be able to define define keyboard event handlers that are always active in the current window, globally. HOT 1
- `BasicAlertDialog` Crash iOS with OOM (Memory Leak) HOT 8
- 1.6.10 depends on pre-release versions of Kotlin HOT 1
- Desktop: Fails to createDistributable with packageDmg because of duplicate entry: META-INF/services HOT 1
- Reduce ios app size. HOT 5
- [Web] Uncaught runtime error in Material3 DatePicker (DisplayMode.Input) when enter incorrect date
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-multiplatform.