hey folks! Does anyone using the java client know ...
# community-help
n
hey folks! Does anyone using the java client know how to create a new instance from the client following this example?
Copy code
ArrayList<Node> nodes = new ArrayList<>();
nodes.add(
  new Node(
    "http",       // For Typesense Cloud use https
    "localhost",  // For Typesense Cloud use <http://xxx.a1.typesense.net|xxx.a1.typesense.net>
    "8108"        // For Typesense Cloud use 443
  )
);

Configuration configuration = new Configuration(nodes, Duration.ofSeconds(2),"<API_KEY>");

Client client = new Client(configuration);
it is not working for me as the
Client
has a package protected constructor. this is the error I am getting:
error: Client(Configuration) is not public in Client; cannot be accessed from outside package
j
Hmmm, it's been a long time since I wrote Java, but I wonder why the constructor is not public... @Harisaran - any thoughts on this?
k
I will be fixing the client today.
n
thank you!!