975931 wrote:Are you sure? This sounds more like a runtime bug than a compile time bug!
I am using Java7 SDK to compile my Java Applet Code. Same code was perfectly working with Java1.6 JDK and JRE1.6 update 37.
But it stops working when I compile my code with Java7 SDK and on JRE 1.7 update 9.
Could anybody suggest what to do, it would be a great help.Which ever web server you are using will have some way of applying filters so just write a filter that looks for the Applet tag and inserts whatever you need.
1) Is this really a Java bug?No. Look closer. The bug is closed as a duplicate of another bug, which in turn is closed as not reproducible:
The issue is not reproducible too. This could be a firewall issue or some network configuration issue on the host machine/router.
2) Do we need at all this parameter(-Djava.net.preferIPv4Stack=true) to run our applet.No. There is no evidence in the original bug that IPv6 was being used at all. All the IP addresses logged are IPv4 addresses. See the Evaluation.
975931 wrote:That has nothing to do with applets specifically. Its a parameter which forces Java to prefer IPv4 where it normally prefers IPv6. If that isn't working properly its more a problem of your machine, not Java. Java 6 happened to prefer IPv4 which is why it worked, but Java 7 is of course prepared for the very near future; I would take the hint you're getting here and investigate what you need to do to make your network IPv6 ready.
If this is not a bug, why after putting this one line +(<PARAM NAME="java_arguments" VALUE="-Djava.net.preferIPv4Stack=true">)+ of code within APPLET tag everything works fine. Why this parameter is being exposed by Java?
If there would have been ever a problem with network issues with the host machine then thing should not work as well with JRE 1.6 and all its updates. This is happening only with JRE 1.7 and its update.
Right, there is no evidence but why it is not working is my question? What should I go a check for? Is there some thing I really need to change in java code?