Connect to which part of Hadoop? HDFS, Hive, HBase?
If HDFS, you can use WebHDFS from any programming language with an HTTP client, or you can include the hadoop-common library in your code via Maven, for example.
If HBase, there are Java clients you can find.
If Hive, you can use JDBC.