bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/27630] New: Missing java.net.HttpURLConnection.setConnect


From: pere at hungry dot com
Subject: [Bug classpath/27630] New: Missing java.net.HttpURLConnection.setConnectTimeout()
Date: 16 May 2006 18:36:05 -0000

When trying to run the josm java program, it throws
java.lang.NoSuchMethodError: setConnectTimeout from
org.openstreetmap.josm.io.OsmServerReader.getReader(OsmServerReader.java:97).
The problem is that java.net.HttpURLConnection.setConnectTimeout() is
missing in GNU Classpath.  The problem can be demonstrated using this
test program:

  import java.net.HttpURLConnection;
  import java.net.URL;
  class testSetTimeout {
      public static void main(String args[]) {
          try {
          URL url = new URL("http://www.uio.no/";);
          HttpURLConnection activeConnection =
              (HttpURLConnection)url.openConnection();
          activeConnection.setConnectTimeout(15000);
          } catch (Exception e) {
          }
      }
  }

When I build it, I get this error:

  % javac testSetTimeout.java
  ----------
  1. ERROR in testSetTimeout.java
   (at line 10)
          activeConnection.setConnectTimeout(15000);
                           ^^^^^^^^^^^^^^^^^
  The method setConnectTimeout(int) is undefined for the type HttpURLConnection
  ----------
  1 problem (1 error)address@hidden:~/src/classpath$ cat testSetTimeout.java
  %

The josm java program source is available from
<URL:http://www.eigenheimstrasse.de/svn/josm/>.

It build just fine with SUN Java 1.5.


-- 
           Summary: Missing java.net.HttpURLConnection.setConnectTimeout()
           Product: classpath
           Version: 0.91
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pere at hungry dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27630





reply via email to

[Prev in Thread] Current Thread [Next in Thread]