JWebAssembly
JWebAssembly copied to clipboard
Custom classes are used in the method of export annotation, and errors are reported during compilation
Exception in thread "main" de.inetsoftware.jwebassembly.WasmException: Abstract or native method can not be used: java/lang/Object.registerNatives()V at java.lang.Object.registerNatives(Object.java) at de.inetsoftware.jwebassembly.module.ModuleGenerator.createInstructions(ModuleGenerator.java:551) at de.inetsoftware.jwebassembly.module.ModuleGenerator.scanFunctions(ModuleGenerator.java:226) at de.inetsoftware.jwebassembly.module.ModuleGenerator.prepareFinish(ModuleGenerator.java:279) at de.inetsoftware.jwebassembly.JWebAssembly.compile(JWebAssembly.java:368) at de.inetsoftware.jwebassembly.JWebAssembly.compileToBinary(JWebAssembly.java:340) at de.inetsoftware.jwebassembly.JWebAssembly.compileToBinary(JWebAssembly.java:308) at TestWasm.main(TestWasm.java:41)
Which version of jwebassembly-api do you use? This should be implemented already in version 0.3. Best result will you have with the snapshot version.
I am getting a very similar error when compiling this application.
I am using JWebAssembly 0.3, OpenJDK 8, and Ubuntu 20.04.
de.inetsoftware.jwebassembly.WasmException: Abstract or native method can not be used: java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
@fribeiro1 This is not the same. It is another method. This method is not implemented in a released version. You need to use the snapshot version of jwebassembly-api
https://github.com/i-net-software/JWebAssembly/wiki/Build-with-Gradle#library-dependencies
de.inetsoftware.jwebassembly.WasmException: Abstract or native method can not be used: java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
@fribeiro1 This is not the same. It is another method. This method is not implemented in a released version. You need to use the snapshot version of
jwebassembly-api
https://github.com/i-net-software/JWebAssembly/wiki/Build-with-Gradle#library-dependencies
Thanks!