You're confusing the International Criminal Court (ICC) with International Court of Justice (ICJ). Here the UN general assembly has asked ICJ to give a legal opinion (not start a trial against Israel) and all UN members are automatically party to the court, including Israel.  
In 2003, UNGA has asked for a legal opinion on Israel's wall in Palestinian territories. ICJ ruled that it had jurisdiction, whether Israel liked it or not.