Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8283979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:56:03+00:00 2026-06-08T10:56:03+00:00

Some days ago I run into a severe problem that gives me a headache:

  • 0

Some days ago I run into a severe problem that gives me a headache:

All Java based tools (Eclipse, Maven, Android SDK loader…) have problems downloading certain files: the download just stops at random.

I already described my problem at Superuser but nobody was able to help me with my problem. Therefore started to perform some tests myself and ended up with the sample code at the end of this question.

The interesting part is that the buffer size has an small influence on the problem. If I reduce the buffer size to 1024 the download completes in most cases.

Does this code only make problems on my Windows system?

To make it clear: I don’t want to develop a download program with Java – therefore fixing the sample code does not help me – the code is only for demonstrating the problem.

public static void main(String[] args) {
    try {
        URL url = new URL("http://mirror.netcologne.de/maven2/com/google/android/android/2.3.3/android-2.3.3.jar");

        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        InputStream in = conn.getInputStream();
        byte[] buffer = new byte[10485760]; // 10MiB
        long read = 0;
        while (true) {
            int bytes = in.read(buffer, 0, buffer.length);
            if (bytes < 0)
                break;
            read += bytes;
            System.out.println("Bytes read: " + read);
        }
        conn.disconnect();
        System.out.println("Finished");
    } catch (Exception e) {
        e.printStackTrace();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:56:05+00:00Added an answer on June 8, 2026 at 10:56 am

    The problem you are facing is caused by Java 7 – in detail that to gives IPv6 a higher priority than IPv4.

    This problem affects all Java based software but only occurs on some computers (may depend on the used Internet connection and/or local network components like switches, router…)

    You can change it back to IPv4 as it was used in Java 6 by setting the system property java.net.preferIPv4Stack=true

    Setting this property is different for each application. For Eclipse you have to set it in the eclipse.ini.

    For Andoird SDK manager you have to edit the file tools\android.bat and add the parameter -Djava.net.preferIPv4Stack=true to the Java call near the end of the file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Eclipse is downloaded some days ago from http://www.eclipse.org/downloads/ and the type is Eclipse
Some days ago, I decided that it would be fun to write a streambuf
I've installed Eclipse on a Windows machine some time ago. A couple of days
since some days ago I have a problem with VS2008 in a daily task.
Just some days ago I started looking into a unit test framework called check,
Some days ago I realized that PrintWriter (as well as PrintStream ) never throw
I encountered a problem some days ago while working with Generic TList in the
I have .NET assembly with ComVisible class. Some days ago (I can find that
Some days ago I installed the ASP.NET MVC 3 Tools Update for Visual Studio
some days ago I've published an app on Google Play. When I log into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.