Just when I run this code:
Configuration azureConfig = ManagementConfiguration.configure( new URI("https://management.core.windows.net/"), "asdasdasd", "server.keystore", "asdasdasd", KeyStoreType.jks ); ManagementClient client = ManagementService.create(azureConfig); LocationsListResponse response = client.getLocationsOperations().list(); ArrayList locations = response.getLocations(); for( int i=0; i<locations.size(); i++){ System.out.println(((LocationsListResponse.Location)locations.get(i)).getDisplayName()); }
I get this:
00:52:04 [SEVERE] java.lang.RuntimeException: Service or property not registered: com.microsoft.windowsazure.management.ManagementClient interface com.microsoft.windowsazure.management.ManagementClient 00:52:04 [SEVERE] at com.microsoft.windowsazure.core.DefaultBuilder.build(DefaultBuilder.java:197) 00:52:04 [SEVERE] at com.microsoft.windowsazure.Configuration.create(Configuration.java:113) 00:52:04 [SEVERE] at com.microsoft.windowsazure.management.ManagementService.create(ManagementService.java:46) 00:52:04 [SEVERE] at {LINE OF CODE THAT CONTAINS ManagementClient client = ManagementService.create(azureConfig);}
On the Internet there is only one question about this, about Android and does not have a clear answer ... Has someone solved this problem?
I run it under OpenLogic 6.5 (based on CentOS) in a virtual machine from Azure with Java 1.8.
EDIT: I created a new project and started it from eclipse. I get the correct results, but when I run it from the command line (java -jar test.jar), I get exactly the same error.
source share