This uses the Dropbox Java SDK to share a file at "/test.txt" with a specific user:
List<MemberSelector> newMembers = new ArrayList<MemberSelector>();
MemberSelector newMember = MemberSelector.email("<EMAIL_ADDRESS_TO_INVITE>");
newMembers.add(newMember);
...