A United Boeing 777-200, registration N783UA performing flight UA-987 from Chicago O'Hare,IL (USA) to Paris Charles de Gaulle (France), was enroute at FL350 about 280nm north of Ottawa,ON (Canada) when the crew reported a cracked windshield, descended the aircraft to FL300 and diverted to Newark,NJ (USA). On approach to Newark the crew declared medical emergency in addition to reporting a shattered windshield. The aircraft landed safely on Newark's runway 22R about 90 minutes after the decision to divert. The airline reported the aircraft diverted due to a mechanical issue. The passengers were taken to hotels and are being taken to Paris the following day.