Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[embed-cdt-dev] InputStreamReader from URL fails

I have a weird problem with reading the Keil CMSIS Packs index.

The code is at:

(the strange looking code for the index.idx case is a hack to avoid malformed xmls used in ealy Keil versions; ignore it, the actual case uses the else path).

The problem is with reading from the URL stream.

The code worked perfectly for several years, but recently Keil moved the packs to Azure and added a new redirection. The offending URL is

I don't know what is wrong with this redirection, but is not followed.

The strange thing is that I isolated the code in a separate java file, and... it can follow the redirect.

Description: Binary data

In both cases I configured Eclipse to use Java 1.8, so this should not be caused by an incompatibility.


Do you have any idea why the InputStreamReader & co. would behave differently when invoked inside Eclipse compared to a separate program?

My guess is that some defaults are set differently inside Eclipse, but it is just a hunch, I have no evidence; if so, I probably have to explicitly set the connection to follow redirects.

Any suggestions on how to approach this?



Back to the top