0

I am using Eclipse for Java. When trying to connect to a HTTP proxy, I receive this error for this code:

Proxy httpProxy = new Proxy(Proxy.Type.HTTP, addr);

Type cannot be resolved or is not a field

Any ideas? Thanks.

1 Answer 1

2

The Proxy class you imported may not be "java.net.Proxy", check your package declaration.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks that worked. I imported the incorrect package on accident.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.