You need to give the server name in the connection string
instead of localhost, mention your database server name
here are some example
Building the Connection URL | Microsoft Docs[
^]
According to this your connection string should be like this
myconObj = DriverManager.getConnection("jdbc:derby://192.168.25.36:1527/MainUserData", "jacovanstryp", "Password1234");
or mention server name directly instead of IP