URL.openStream throws java.lang.NullPointerException

URL url= new URL(url);
url.openStream();

      

I will catch the exception:

java.lang.NullPointerException
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:727)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:654)
    at COM.ibm.JEmpower.applet.http.HttpURLConnection.getInputStream(HttpURLConnection.java:411)
    at java.net.URL.openStream(URL.java:1022)
    at ImageOptimizer.saveURL(Unknown Source)

      

I am running Java code on a laptop via IBM Notes. This is security related, so I can't open a stream with another server?

+3


source to share


2 answers


I found a problem for my business.

I checked the Java version in Lotus Notes and it was 1.5 as soon as I started before 1.6. Previously, I couldn't change the java version because adding a variable to notes.ini required adding a variable:



JavaCompilerTarget=1.6

      

After adding this variable to notes.ini, you can install any Java available in Designer.

+1


source


  • Close Notes / Designer
  • Open Task Manager in Windows
  • Find and kill all IBM Lotus Notes / Domino processes
  • Try again


0


source







All Articles