How to change the update center URL via code?
Apache NetBeans Wiki Index
Note: These pages are being reviewed.
Use UpdateUnitProviderFactory http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-autoupdate-services/org/netbeans/api/autoupdate/UpdateUnitProviderFactory.html
List<UpdateUnitProvider> updateUnitProviders = UpdateUnitProviderFactory.getDefault().getUpdateUnitProviders(true);
for (int i = 0; i < updateUnitProviders.size(); i++) {
UpdateUnitProvider pr = updateUnitProviders.get(i);
String name = pr.getDisplayName();
if("MyUpdateCenter".equals(name)){
pr.setProviderURL(new URL("http://example.com/updateCenter"));
pr.refresh(ProgressHandle.createHandle("UpdateCenter refresh"), true);
break;
}
}
or
Taken from platform-dev-mailing list 14.04.2016