Skip to content

Swap classloader to Class.forName().getPackage()#88

Open
gorbit99 wants to merge 1 commit intohoijui:masterfrom
gorbit99:master
Open

Swap classloader to Class.forName().getPackage()#88
gorbit99 wants to merge 1 commit intohoijui:masterfrom
gorbit99:master

Conversation

@gorbit99
Copy link
Copy Markdown

This PR intends to fix #75 and #87

Since getDefinedPackage is not available on android, I just replaced it with the same logic that was used for java.awt. Since java.lang and java.util should always be present and loaded, I elected to just ignore the ClassNotFoundException.

@Jurrie
Copy link
Copy Markdown
Collaborator

Jurrie commented Apr 1, 2026

Didn't test this on Android myself, but the change seems pretty straight forward and the reasoning seems sound. I vote to merge it even when there is nobody (else) available to test this on Android. @gorbit99 Does the whole library work when this change is applied? Would you be interested in testing more Android specific patches in the future?

@gorbit99
Copy link
Copy Markdown
Author

gorbit99 commented Apr 1, 2026

@Jurrie I haven't done a lot of testing past seeing that the error has disappeared and at least this part of the code was back to working. I don't really test things on android, I just happened to have android studio open after investigating a crash caused by this issue and wanted to fix it for the future. I wouldn't make for a good Android tester.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot receive OSC on android API 32

2 participants