fix bug with context and add warning if running with Java < 8