Johnny is pursuing Amber, who accused him of domestic abuse during their divorce proceedings in 2016, for defamation over a 2018 Washington Post article in which he claims she suggested he was violent towards her.
Javier, who starred alongside Johnny in "Pirates of the Caribbean: Salazar's Revenge", and the 2000 drama "Before Night Falls", has made a declaration in the case, obtained by The Blast, supporting his pal as a victim of "lies" made by "toxic beings".
"I love Johnny. He has always been a true gentleman and an extremely generous and caring friend to my family and myself," he begins, before praising the actor's "respectful attitude towards every single member of the crew alongside his unique and hilarious sense of humor."
"I stand by Johnny because I have always seen and felt a true caring and loving man in him," he adds.
The Spanish actor's wife, Penelope Cruz, who has herself worked with Johnny three times, has also made a declaration supporting him against his ex-wife.
At the end of his evidence, Javier takes a shot at Amber, saying: "I love Johnny because he is a good human being, trapped in the lies and manipulations of toxic beings and yet smiling and loving us all in spite of it."
Johnny is suing Amber for $50 million (£42.5 million) in damages, and they have traded bitter allegations, with The Lone Ranger star claiming his ex abused him rather than the other way round, and the Aquaman actress alleging he has alcohol and drug problems.
The 56-year-old is also embroiled in another defamation case in the U.K. over an article in The Sun newspaper which accused him of being a "wife-beater". Both he and Amber, 33, were due to attend court in London on Monday (23Mar20) but the British case has been delayed due to the coronavirus pandemic.