In particular, java dependencies in the VM need to be isolated:
Like the SwingCodeExecutorAdapter is now in the subscript.swing package, these java dependencies may go to package subscript.jvm. For the JS version, we may use a package subscript.js, which should have stubs for synchronized and for the executor that ThreadedCodeFragment uses.
How will the appropriate class from either of these packages be loaded at run time? The run time should know whether it runs on JVM, JS or maybe something else. How exactly is to yet be found out.