You may try install Java offline -> disable all network chips (LAN, WLAN) in device manager first
After installing open Java Control Panel -> General Tab -> Network settings -> Use Proxyserver -> Put in VPN /Proxy Data
Enable network chip in device manager and use that proxy
no guarantee that it works
prolly you're also better off with a custom client like Amber (-> Wizards Tower Subforum)
----------------------------------------------------------------------------------------------------------------------------------------
Oracle Products (Open JDK aswell) underlie US Trade Sanctions against Iran - while i don't think Oracle is monitoring
https://openjdk.java.net/legal/tou/termsChapter 5s
not sure whether someone at persiantools forum might help you ... but be aware it's under observations!