Any idea on how to use wildcards for jar files with many separate jar dependencies?

I've been working on some projects and one of them involves a lot of dependencies in the form of jar files. I would add each one to the deps flag but I ended up realizing I have wayyyyyy too many jar files to fully build a command. Is there a way to use wildcars like *.jar so cheerpj automatically selects all jar files within a directory as dependencies for a single jar file?
17 Replies
Splatty56
Splatty56•10mo ago
I wonder if I could figure out how to extract all of them, merge all the file structures under one directory, then recompress as a single jar file
Alex
Alex•10mo ago
try
./cheerpjify.py application.jar --deps `find . -name "*.jar" | tr '\n' ':' | sed 's/:$//'`
./cheerpjify.py application.jar --deps `find . -name "*.jar" | tr '\n' ':' | sed 's/:$//'`
Splatty56
Splatty56•10mo ago
Is there a reason on why I keep seeing unknown opcode ba? The command is working, but that keeps showing up and things like class not found StringConcatFactory are showing up Thers a lot of class not found errors like java.lang class not found Do I need to somehow add my openjdk? to add some context, my project is attempting to get the latest version of minecraft running in a web browser
Alex
Alex•10mo ago
Opcode 0xBA is invokedynamic, so I'm guessing that CheerpJ 2 AOT doesn't support it (I don't work directly on CheerpJ, and the developers are asleep right now 😉)
Splatty56
Splatty56•10mo ago
Its all good
Alex
Alex•10mo ago
You could try out the CheerpJ 3 prerelease, but.... Minecraft uses the LWJGL library, which will break see https://ptb.discord.com/channels/988743885121548329/1029287106054455357/1130826176089296997 for more information
Splatty56
Splatty56•10mo ago
gotcha
Alex
Alex•10mo ago
sorry 😅
Splatty56
Splatty56•10mo ago
Do you know why it breaks? oh wait lemme read up on it didn't realize it was a link
Alex
Alex•10mo ago
LWJGL directly talks to the X server, but CheerpJ doesn't virtualise X
Splatty56
Splatty56•10mo ago
That's what I was getting from it, that makes sense
Alex
Alex•10mo ago
additionally, the browser supports WebGL, which is distinct from OpenGL (the "GL" in LWJGL)
Splatty56
Splatty56•10mo ago
So support for lwjgl in cheerpj is its own beast to tackle
Alex
Alex•10mo ago
so even if we did stub the X server (i.e. pretend there is one), the graphics commands would need translating yep, sadly
Splatty56
Splatty56•10mo ago
Ok thx for the help
mountvol
mountvol•10mo ago
do minecraft 1.16.5, cheerpj 2.0 is compatable with java 1.8 lwjgl point still stands tho, when I get it to work I plan to just use some eaglercraft-ish patches to make the graphics work
Splatty56
Splatty56•10mo ago
Ok