Android Question How to do the same as B4J's #CommandLineArgs

OliverA

Expert
Licensed User
Longtime User
Is there a facility in B4A that is similar in functionality to B4J's #CommandLineArgs? I've ran into an issue (see https://www.b4x.com/android/forum/threads/use-foreign-java-code.158943/post-975812) where the compiler produces the following (abbreviated) error message:


According to a post I found here (https://stackoverflow.com/a/69179997), if I could pass
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
to the compiler, I might be able to proceed with the above project. But for now, I'm just stuck.

Note:
I've tried JDK 8, 11, 14, and 18 with the same/similar results, just in case anyone wants to know.
 

OliverA

Expert
Licensed User
Longtime User
Are you sure that you are using Java features that are supported by Android?
I'm guessing yes. The Ethernet support seems to require some special android.jar file, the jvmargs resolution is on an Android section of Stackoverflow.com, and people seem to be able to do such things in Android Studio. I do agree this seems to be an extreme edge case of Android development.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
No such thing. And there are no modules in Android.
Looks like java vm args for an application can somehow be set with a Gradle plugin in Android Studio. Outside of that, I don't think there is a readily available solution. :-(
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…