0
Can I call Java class method from JavaScript Function
2 Respostas
+ 1
my requirements is from JavaScript I want to call a Java class so that I can do some operation
+ 1
First off, this is not a definitive answer. A few years ago, the answer would have been a resounding no and a redirection to GWT or similar things.
That said, compiling to web assembly may be possible. It was not possible because of a lack of garbage collection in web assembly. Since adding garbage collection to web assembly was a stated goal, compiling Java to web assembly should be possible or will be possible in the near future.
JavaScript programs can call web assembly libraries very easily.