Affect the order of NetworkInterface.getNetworkInterfaces enumeration in Java 6 on Linux

What is the order in which NetworkInterface.getNetworkInterfaces() returns an enumeration of network interfaces? Is there a way to affect that on JVM level or on Linux OS level?


According to the source of the OpenJDK (found in src/solaris/native/java/net/NetworkInterface.c, method enumInterfaces) it will return IPv4 interfaces first (method enumIPv4Interfaces), followed by IPv6 interfaces (method enumIPv6Interfaces).

The order within those categories seems to be the same that the OS uses (it uses the SIOCGIFCONF ioctl).

Note that this is implementation dependent and not defined, so any implementation can very easily do it differently.

Need Your Help

Unit testing c++ console application in Visual Studio 2012

c++ unit-testing visual-studio-2012 vs-unit-testing-framework

I am trying to create a unit test project in Visual Studio. The code I want to test is in c++ and I want to write the tests in C++. Is this possible?

show spinner activity until it load the audio file IOS7

ios audio progress-bar spinner

Hi in my application I have audio URL to play the audio using the URL its taking too much time to play but so i want to load a spinner or progress bar like loading to show for the user until this a...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.