“java.lang.UnsupportedOperationException: Not supported yet.”

前端 未结 5 868
鱼传尺愫
鱼传尺愫 2021-01-21 08:55

What I am trying to do :

I am trying to connect to Web Portal [that uses https]using Java. I have written code for supplying user credentials using Authenticator class.W

5条回答
  •  长发绾君心
    2021-01-21 09:40

    Have you seen this code fragment ?

        @Override
        public Result authenticate(HttpExchange he) {
            throw new UnsupportedOperationException("Not supported yet.");
        }
    

    It's precisely the one that will throw the aforementionned exception each time you try to authenticate.

    So, to my mind, the solution to your authentication problem is quite simple : implement this method.

提交回复
热议问题