plugin java and js, first draft