prepare j environment