Typically you will get the following error when trying to open the file:
which is caused by an OutOfMemoryError of the Java Heap space.
One convenient way to execute .sql without having to open the script in the SQL Developer editor is to configure the default path for scripts.
Go to Tools -> Preferences->Database->Worksheet:
Then, go to the SQL Developer editor and simply use the @ command to reference and execute the script.