IllegalArgumentException when opening an URL

Hi,
I am trying to open a URL which has some kind of special character inside.
This special character causes a IllegalArgumentException when I try to open it with Java while it works fine opening it in my Firefox Browser.
The code is:
String url = "http://www.flunk.de/webkatalog/forum/rtl-und-coca-cola-heimspiel-wg-ich-brauch-h%EDlfe-t335.html";
URL urlObj = new URL(url);
try {
  InputSource source = new InputSource(url.openStream());
} catch (IOException e) {
  e.printStackTrace();
}This causes an exception with the following StackTrace:
java.lang.IllegalArgumentException
at sun.net.www.ParseUtil.decode(Unknown Source)
at sun.net.www.ParseUtil.toURI(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)The Problem seems to be the "%ED" part of the URL. If I delete that part, no exception occures which doesn't help me, since the url is no more correct and I don't reach the correct website with it.
Does anybody know, how I can avoid that?
Thanks,
Henrik

Oh sorry - of course I tried this one:
String url = "http://www.flunk.de/webkatalog/forum/rtl-und-coca-cola-heimspiel-wg-ich-brauch-h%EDlfe-t335.html";
URL urlObj = new URL(url);
try {
  InputSource source = new InputSource(urlObj.openStream());
} catch (IOException e) {
  e.printStackTrace();
}Message was edited by:
HenrikH

Similar Messages

  • Adobe Reader freezes all browsers when opening a url to a PDF containing form fields...

    There is an issue we are currently experienceing with Adobe Acrobat 9 (updated to the latest version) where ALL BROWSERS (Internet Explorer, Firefox, Chrome and Safari) on each of two different systems (a MacBook Pro with Mac OSX Leopard and a Sony Vaio Laptop with Windows Vista) where the application will freeze up and crash the browser when we view a .pdf file from a url if the .pdf file iteself contains form fields.
    At first I though it may have been specific to Mac OSX and this MacBook we were trying to view the document on, but the same issue is now occuring with a new Sony Vaio laptop (running Windows Vista) as well.
    It seems like it is able to open .pdf documents containing form fields when they are stored locally, but when trying to access them via a url, the program will freeze up.  Sometimes it will eventually work if you had previously opened a .pdf prior to opening it via the url link and sometimes it doesn't.  And it seems to only be related to .pdfs containing fillable form fields (others open fine when accessing them by a url)
    Obviously it's become quite irratating and I'm hopeing I can find some insight on this support forum as to what may be causing this issue.
    Previous versions of Acrobat (installed on the MacBook) opened this very same .pdf file (url) fine before upgrading to version 9.
    Any help is greatly appreciated.  Thanks!

    From: Ankit_Jain [email protected]
    Sent: Monday, February 27, 2012 8:58 AM
    To: TAGold
    Subject: Adobe Reader X internal error when opening PDF that worked with 9
    Re: Adobe Reader X internal error when opening PDF that worked with 9
    created by Ankit_Jain <http://forums.adobe.com/people/Ankit_Jain>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/4232243#4232243

  • When opening certain URLs (not all), the nuisance error message appears incorrectly saying I don't have latest Java RunTime installed and activated.

    The "Add-ons Manager" shows Java Platform SE 6 6.0.240.7 is enabled. But when I open certain websites the error message "We have detected that no Java Runtime is installed on your system or you are using an old version..." appears. But I can't see that it has any effect. It just delays the opening while the detection program runs. Something seems contradictory!

    Have you tried installing the latest version of Java, there have been 2 updates since your version. You can get the latest version from http://java.com/

  • Prompt choice when opening an URL-based intent?

    I know that there's this (https://support.mozilla.org/en-US/questions/977330?esab=a&as=aaq) but it takes way too long for the actual website to load before I get to the little Android icon. Is there a way to make it so that it prompts me in the first place before loading the page?

    The Android Gingerbread and earlier browser did this if you did not set a default browser and it sucked. The intent dialog would appear for each clicked link and often several times due to redirects.
    If a site or intent gives Firefox a URI that it can load as a web page we treat it as such. Firefox is a web browser.

  • 4.0 flashes or sustains a glaring white screen when opening a new tab 0r a new url-can this be corrected to show a dark transition screen instead?

    We have a special color theme which we use for all your previous versions of Firefox so as to eliminate all white screen glare which has been successful until we installed 4.0. When opening a new tab the screen now flashes a stark white eye-strain glaring white light, and much worse when opening a url site this condition does not flash but lingers as long as it takes (sometimes very long) to load a new url. Since this never happened with previous versions, how can this be corrected without having to return to Firefox 3.6?

    You can cause a new tab to display the site of your choice by installing the following Add-on:
    *https://addons.mozilla.org/en-US/firefox/addon/newtaburl/
    *after installing, set the options by going to Add-ons > Extensions >New TabURL > Options
    Also see --> https://addons.mozilla.org/en-US/firefox/addon/new-tab-homepage/
    *If you have multiple home pages, the first one is automatically chosen by this Add-on
    Future versions of Firefox will/may have this option without an Add-on.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Running Windows XP service pack 3. Updated Firefox from 8.0 to 9.0. Now when Firefox opens "The URL is not valid and cannot be loaded" is displayed in a window and no home page appears. What's wrong?

    Running Windows XP service pack 3. Updated Firefox from 8.0 to 9.0. Now when Firefox opens "The URL is not valid and cannot be loaded" is displayed in a window and no home page appears. What's wrong?

    That issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Avast detects URL:MAL when opening firefox.No issue with IE or Chrome,after troubleshooting realized problem is NoScript addon.Can it have been infected?

    avast -network shield
    Infection Details
    URL: http://188.24.140.190/
    Process: C:\Program Files (x86)\Mozilla Firefox\firefox.exe
    Infection: URL:Mal

    Hi Tyler,
    Thanks for quick reply
    Initially after some troubleshooting I noticed that I could make infection pop up disappear:
    From Configure how firefox connects to the internet -> changed from "use system proxy settings" to "auto-detect proxy settings" or "no proxy"
    With this option modified, the pop up from avast didn't appear any longer when opening Firefox.
    However I noticed that both Chrome and IE were set to work on the same "use system proxy settings" and they weren't causing problems...so I assumed the problem still has to be with firefox.
    After changing back the option in firefox to "use system proxy" I got again the notice, but saw that when opening firefox in safe mode the issue was gone again.
    I tracked it to the no script addon, after removing it, the issue disappear regardless of proxy config settings...when I reinstall it, it appears again.
    I am now running in depth virus scans to see were the actual infection is.
    It seems to me it is expoiting a vulnerability in this addon, I will try the reset also.

  • I have a MacBook Air OSX, Version 10.7.5 and when open my Apple Calendar, I get the alert "encountered HTTP error 404. Make sure the URL is correct. Anyone?

    I have a MacBook Air OS X, Version 10.7.5 and when open my Apple Calendar, I get the alert "encountered HTTP error 404. Make sure the URL is correct. Anyone? The error message comes very often but my calendar DOES still work.

    I went to System Preferences; Mail, Contacts, Calendars; Under my mail address I unchecked "Calendars and Reminders" then rebooted the system. When it restarted I went back and checked "Calendars and Reminders" again and now it is working again.

  • Hiding/changing URL when opening new window

    Any guidance on the following would be greatly appreciated.
    I have a club website which is hosted on my freespace and addressed by redirection.
    All the main pages show the URL at the top with the name of the club - as I would want.
    However, if I set a link within one of those pages to open in a new window, then the URL shown at the top is the url to the page's location in my freespace and not the club.
    Is there any way to specify what is shown in the URL area when opening a link in a new window in this way?
    Thanks for any thoughts.

    I have the the same problem bulvide has with version 3.6.9 (and with 4 beta 5). Instead of the gray page problem, now sometimes a new window won't open after clicking on the firefox icon on the taskbar (in the case of windows 7 64 bit, middle clicking, in vista left clicking). This only happens when I am watching a flash video stream from ustream for example.
    A temporary fix for the problem is to disable OOPP in about:config. You can do this by typing about:config in the URL bar, typing dom.ipc in the filter bar and toggling the 4 true values to false.
    Unlike bulvide, I don't have an issue with the speed of flash.

  • Use firefox cannot open cpanel of a domain name and cannot see all image of a url when use firefoz to open that url

    Use firefox to open one cpanel of a domain name but can open at safari or IE
    Use firefox browser to open one url, all the image of this url cannot see but can see at safari or IE?
    Vivien Chan
    [email protected]

    You can use these steps to check if images are blocked:
    *Open the web page that has the images missing in a browser tab.
    *Click the website favicon ([[Site Identity Button]]) on the left end of the location bar.
    *Click the "More Information" button to open the "Page Info" window with the Security tab selected (also accessible via "Tools > Page Info").
    *Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    *Select the first image link and scroll down through the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.
    *http://kb.mozillazine.org/Images_or_animations_do_not_load
    *https://support.mozilla.com/kb/Images+or+animations+do+not+show
    See also:
    *http://kb.mozillazine.org/Error_loading_websites
    *https://support.mozilla.com/kb/Error+loading+web+sites

  • How can I stop my Firefox browser from preventing Click Earner, a program that opens email ads on safelists, from opening the URL's in the email ads?

    Hello fellow-users of Mozilla Firefox,
    I send email ads using 20 different safelists every day. To get credits for sending those ads I click email ads sent by other subscribers.
    Since early this year I've been using Click Earner -- http://www.clickearner.net/ -- to help speed up this task. Click Earner "fetched"
    the emails from each safelist and opened each URL advertised in each email. This was a very quick job and all I did was close each tab
    displaying the URL. Credits for clicking the URL were added to my safelists accounts.
    Since a week ago, without me doing anything at all, my Click Earner stopped opening the emails automatically as was the case for
    several months since I started using it. Click Earner support claimed Firefox prevented the program from opening the URL in a new tab each time it fetched an email ad. True enough, yesterday when I watched Click Earner in action I saw a pop-up from Firefox saying something like "Firefox prevented..." I couldn't read the rest as the pop-up disappeared immediately. And that was the only
    time I saw it.
    Right now I have to open each URL manually to see the ad and earn credits. This is a very slow process, just the same as when I open the emails in my gmail account. It's useless for me to subscribe to Click Earner. And it takes forever for me to earn credits from all the safelists.
    I'd appreciate it very much if any one of you folks would help me overcome this glitch. I look forward to hearing from you and thank you very much in anticipation.
    Regards,
    Tom Graciano

    You could try turning off Firefox's pop-up blocker.
    "3-bar" menu button (or Tools menu) > Options > Content
    There you will find a checkbox for "Block pop-up windows". Assuming it's checked, uncheck it.
    Does that return to the behavior you want?

  • How to open text URL in the new tab

    Hi guys,
    We know that when we click on a hyperlink it will directly open the linked web site, e.g.
    www.bing.com
    But sometimes we may find some URL in plain text that we couldn't click on it, e.g. www.bing.com
    I'll have to select the URL and copy&paste it to a new tab to open it, this is time wasting.
    The time IE 9 came out, I found a wonderful add-on, Open URL in New Tab (with Preview)
    This will do the trick to open the text URL in the new tab by right click on it.
    http://www.iegallery.com/us/addons/detail.aspx?id=3614
    But I don't like two things of it.
    1st, it will try to preview the web site when I using it which is undesired.
    2nd, it will open the link through another site and then jump back to the link I need to open. But I'd like to open the link directly. Which will open the link more quickly also save my time.
    Questions:
    Is there any other way to open the plain text URL directly? I mean without copy and past it to another page.
    It would be great if I can open the URL by dragging it like the other...

    Is there any other way to open the plain text URL directly? I mean without copy and past it to another page.
    In these forums?  If you are using the NNTP Bridge you could view your message in your News reader's Plain text mode and then see that your two examples worked equivalently.   <eg>
    Otherwise, in general, I agree there are some pretty obvious "accelerators" which could have been provided.  
    I suspect much of the problem will be due to "security".   E.g. Windows used to have a functionality called text scraps, where you could select some text and drag and drop it just about anywhere to create a scrap file.   That's
    not working for me any more either.   If it were we could at least drag it to the Address bar and press Enter...
    http://technet.microsoft.com/en-us/magazine/2008.02.windowsconfidential.aspx
    (Microsoft search for
       text scraps
    <quote>
    virus writers loved this
    </quote>
    QED

  • Captivate 7 Click box and bottons not able to open an URL on a new window

    I inserted a button and a click box in CP7 to open an URL on a new window. The URL opens but in a New Tab. There is an issue that the URL cannot be opened on a NEW WINDOW, I am using IE and Chrome. Do you have any ideas about this issue and how to troubleshoot it? I tried with Safari and it works fine.
    Thanks, Jorge - Adobe Captivate 7 user.

    Hi Jorge
    It's my understanding that all you can do is to configure the link to open in a new "whatever". Whether you get the link opening in a tab or a window is left up to the browser and how the particular user has their browser configured. For example, I use Firefox and when I look at its settings here is what I see.
    I'm guessing there must be a way to force a new window, because I do see new windows appear. But I think in those cases folks are doing it by using JavaScript.
    Cheers... Rick

  • Open doc URL: unable to open the report in same window

    Hi
    I'm trying to open a report using open doc url with "swindow=same" but still it opens in a separate window. This happens only when I use JAVA viewer. it works fine in ActiveX and HTML but I want this in JAVA viewer as i'm including this page in my JAVA application and it should open the report in the same window. I tried using "<a>URL</a>" and also target="_self" by HTML interpretation for that object but still the same problem. I'm unable to open the report in the same window by using JAVA viewer for Crystal Reports in info view. Please help me!!!
    Envirorment Details: Crystal Reports 2008 SP3, BOE XI R3 SP3
    regards
    Raghavendra.G

    I have tested that myself and It seems that HTML interpretation does not work with the Java viewer.
    I have also tried using a hyperlink containing javascript
    eg.
    javascript:window.location.href='http://www.sap.com'
    but the java viewer seems always to launch a new window before processing the command.
    I would recommend to open a case by SAP support ( httP://service.sap.com/support )
    Regards,
    Stratos

  • How to pass # (Not Assigned) in open doc url ??

    I am unable to pass # (Not Assigned) in open doc URL. I am also try %23 ( encoded form of #) but it show MDX error and when i supply directly # then my WebI report pull all the data i.e. my filter doesn't work. Please give me some way to pass # in opendoc..

    http://boseimdev60:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AQgEkeXDfo5PpR_IFC.rse0&sIDType=CUID&sType=wid&sRefresh=Y&mode=full&sRefresh=Y&lsSCalendarYear%2fMonthTo=032010&lsSCalendarYear%2fMonthFrom=032010&lsSInfoprovider (Multiple Required)=ZPUR_C15&lsSPlant(SelectionOptions%2cOptional)From=&lsSPlant(SelectionOptions%2cOptional)To=&lsSPur Doc Category (Optional)=K&lsSPlant=%23
    Here Plant=%23 i.e. in last i increase this prompt in WebI level so its work.

Maybe you are looking for