sqlcl works as expected in a Windows cmd window.
In a 32 bit cygwin, an either an xterm window or a Cygwin Terminal, I get misbehavior with return terminating command input prematurely and with echoing of the command:
.../Downloads/sqlcl-4.2.0.16.175.1027-no-jre/sqlcl/lib
$ java -jar oracle.sqldeveloper.sqlcl.jar /nolog
SQLcl: Release 4.2.0.16.175.1027 RC on Tue Sep 20 16:37:56 2016
Copyright (c) 1982, 2016, Oracle. All rights reserved.
SQL> select 1 from dual;
select 1 from dual;
SP2-0640: Not connected
SQL> select 1
select 1
SP2-0640: Not connected
SQL> help
help
For help on a topic type help <topic>
List of Help topics available:
/
@
...
Windows 7 Enterprise SP1 running on VMware via VMware Horizon Client.
Cygwin 2.6.0(0.304/5/3)
$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode)
Ideally I would expect sqlcl to be plug compatible with emacs Comint Mode by simply changing the program from sqlplus to:
(setq sql-oracle-program "/cygdrive/c/Users/.../Downloads/sqlcl-4.2.0.16.175.1027-no-jre/sqlcl/bin/sql.bat")
or the distilled invocation in the example output