Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. import java.io.*;
  2. import org.graalvm.polyglot.*;
  3.  
  4. class Polyglot {
  5.     public static void main(String[] args) throws IOException {
  6.         Context polyglot = Context.newBuilder().
  7.                                allowAllAccess(true).build();
  8.         File file = new File("polyglot.bc");
  9.         Source source = Source.newBuilder("llvm", file).build();
  10.         Value cpart = polyglot.eval(source);
  11.         cpart.getMember("main").execute();
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement