change the "SELECT * FROM gantt_tasks..."

Where can I can change the “SELECT * FROM gantt_tasks …” in java connector?

Hello,
try using render_sql method of gantt connector:
docs.dhtmlx.com/connector__java__basis.html