If you’ve been having problems with getting Java 7 applications to run while connected to Cisco Anyconnect version 3.0 or 3.1 you’re not alone. There is an issue with how Java 7 handled IPv6 that causes it not to run within the VPN tunnel. Fortunately, there are some workarounds.
Work around 1: Uninstall Java 7 and install Java 6 — This isn’t a good idea though because Oracle already stated that Java 6 is going end-of-support in early 2013.
Work around 2: When using AnyConnect 3.0(10055), you can simply go into the AnyConnect virtual adapter and uncheck IPv6 as shown in the image below:
Work around 3: If you want to use the 3.1 client, you need to take a few extra steps for some odd reason where you have to downgrade to Java 6 and then upgrade to 7. Also, simply unchecking the IPv6 virtual adapter settings no longer works — so you have to enter a command line option. Please follow these directions and it should let you run Java 7 apps through Anyconnect 3.1(2026):
1: install the 3.1(2026) version of AnyConnect
2: uninstall Java 7
4: install Java SE 6 Update 38 (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
5: Within the Java 6 control panel settings, click the update tab to upgrade to the latest version of Java 7 (this has been tested with Java 7 update 9, 10 and 11)
6: Open a command prompt and enter the following: setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true
7: Login with AnyConnect and see if your Java apps start to work.