Replaces constant with java constant