JWebAssembly icon indicating copy to clipboard operation
JWebAssembly copied to clipboard

Custom classes are used in the method of export annotation, and errors are reported during compilation

Open dingjinhong opened this issue 3 years ago • 4 comments

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)

dingjinhong avatar Aug 16 '21 12:08 dingjinhong

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.

Horcrux7 avatar Aug 18 '21 17:08 Horcrux7

I am getting a very similar error when compiling this application.

I am using JWebAssembly 0.3, OpenJDK 8, and Ubuntu 20.04.

fribeiro1 avatar Nov 01 '21 23:11 fribeiro1

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

Horcrux7 avatar Nov 02 '21 18:11 Horcrux7

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!

fribeiro1 avatar Nov 02 '21 19:11 fribeiro1