Thin driver
Oracle's JDBC Thin driver uses Java sockets to connect directly to Oracle. It provides its own TCP/IP version of Oracle's SQL*Net protocol. Because it is 100% Java, this driver is platform independent and can also run from a Web Browser (applets).
There are 2 URL syntax, old syntax which will only work with SID and the new one with Oracle service name.
Old syntax
jdbc:oracle:thin:@[HOST][:PORT]:SID
New syntax
jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE
On new syntax SERVICE may be a oracle service name or a SID.
There are also some drivers that support a URL syntax which allow to put Oracle user id and password in URL.
jdbc:oracle:thin:[USER/PASSWORD]@[HOST][:PORT]:SID
jdbc:oracle:thin:[USER/PASSWORD]@//[HOST][:PORT]/SERVICE
source: http://www.orafaq.com/wiki/JDBC