Here you can find the source of enterContext()
public static Context enterContext()
//package com.java2s; /* (c) 2014 Open Source Geospatial Foundation - all rights reserved * (c) 2001 - 2013 OpenPlans/*from w w w. j a v a 2 s . com*/ * This code is licensed under the GPL 2.0 license, available at the root * application directory. */ import org.mozilla.javascript.Context; public class Main { /** * Associate a context with the current thread. This calls Context.enter() * and sets the language version to 1.8. * @return a Context associated with the thread */ public static Context enterContext() { Context cx = Context.enter(); cx.setLanguageVersion(Context.VERSION_1_8); return cx; } }