How can I get the input addresses of a transaction in Java?
You should get the list of inputs, this is a snippet code using BitcoinJ to get input and outputs addresses:                    

List&lt;TransactionInput&gt; inputs = tx.getInputs();
List&lt;TransactionOutput&gt; outputs = tx.getOutputs();

for (TransactionOutput out : outputs) {
   System.out.println("addresses in output " + out.getAddressFromP2PKHScript(params));
}
for (TransactionInput in : inputs) {
    System.out.println("addresses in input " + in.getFromAddress());
}