Closed david-a-diaz closed 8 years ago
Hello! You are supposed to take the JS output of JSweet and run it in a browser (or with node.js). Here you are trying to run a JSweet program with a JRE, which explains the problem. Note that some JSweet programs that only use Java API can also run in a JRE (that way you can share code between Java and JavaScript). But here you are using a JSweet API which is JavaScript-specific ($set) and cannot run in Java.
Hi,
When I try to run a simple example:
public class Main { public static void main(String[] args) { jsweet.lang.Object m_permanentListeners = new jsweet.lang.Object(); m_permanentListeners.$set("test", "value"); } }
I get the following error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: jsweet.lang.Object.$set(Ljava/lang/String;Ljava/lang/Object;)V at jsweet.lang.Object.$set(Native Method) at Main.main(Main.java:12)
I'm testing on Mac with the JDK 8 but we are seeing the error on Windows with JDK 8 as well.
Can you help us out?