Ready to Start Your Career?

A Beginner's Guide to Java Samples and SDKs on Azure

chenshemtov's profile image

By: chenshemtov

November 8, 2019

Azure offers remote access to enterprise-grade Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Database as a Service (DBaaS), and Software as a Service (SaaS). Azure’s data centers are spread across 54 regions, and its infrastructure is hybrid-ready, backed by over 90 compliance certifications, and provides a built-in backup1 module. This article provides a review of Java samples and SDKs created for use in Azure.

Begin FREE Microsoft Azure Fundamentals Course >>

Getting Started with Java on Azure—Microsoft Azure Samples

The following Java sample libraries for Azure were created and are maintained by Microsoft. Each sample performs a different function and shows you how to run different tasks for Azure services. Below, you’ll find a brief review of two Azure services and a few samples that demonstrate how to perform different tasks with Java. You can find more information in the official documentation of each library.

Active Directory (Azure AD)

Azure AD is a cloud-based identity and access management (IAM) service, which provides controls for managing access to Azure resources and services. You can use AD to set up users, define roles and privileges, and add single sign-on (SSO) to applications.Here are some Azure Active Directory SDK libraries for Java:

SDK 

What It Does

Authentication2 in Azure Management Libraries for Java

Create an authenticated client

Getting Started with Graphrbac3

Lets you manage user groups and roles in Java

Integrating Azure AD into a Java web application4 

Create a secure call between a secured web app user and Microsoft Graph

Integrate a Java console5 application with AD 

Create a secure call between a Java console and Microsoft Graph

App Service

A PaaS that integrates Azure services and third-party tools into one centralized platform. That’s where you’ll build, host and deploy your applications.Here are some Azure App Service SDK libraries for Java:

SDK 

What It Does

Azure App Service deployment sources6 configuration for Java applications

Use one App Service to deploy four different deployment sources (FTP, local Git repo, public Git repo, and continuous Git repo deployment)

Manage web app slots7 in Java

The sample runs three web apps for three regions

Manage web app with Domain Ssl8 in Java

Use one App Service to create two web apps that use one wildcard SSL certificate

Manage Linux web app with Traffic Manager9 in Java

Use a traffic manager to increase the capacity of your app service plans

You can find a comprehensive list of Java samples here10

Implementing Java on Azure—Microsoft Azure SDKs

The following Java SDK Libraries for Azure are created and maintained by Microsoft. Each SDK has a different function and can help you run different tasks within each Azure service. Management SDKs are used for creating Azure resources. Client SDKs are used for running Azure resources. Below, you’ll find a review of key Azure services, their uses, and a link to their Java SDKs. You can find more information in the README.md file of each SDK, and practical tutorials in the Azure for Java Developers11 page.App ConfigurationCentralized management of application settings and feature flags. Once you sign up to the App Configuration service (through the Azure portal), you can start saving templates of your preferred configuration for any application. App Configuration is especially helpful for microservices, containerized apps, serverless apps, and continuous deployment pipelines. You can find the Azure app configuration client SDK for Java here12.Event HubsA platform for big data streaming that includes an event ingestion service. Event Hubs receive and process millions of events in the span of a second. You can integrate Event Hubs with analysis tools, and run real-time data analytics. You can also use this service for data archiving, transaction processing, streaming device telemetry, and fraud detection. You can find the Event Hubs client SDK for Java here13.Azure Key VaultA security service for encrypting cryptographic keys and secrets. The Key Vault ensures that the cryptographic components that secure your information are secure. It does that by providing a tokenization system, secret and keys management controls (for example, encrypting authentication keys), certificate management (such as SSL and TLS), and hardware security modules (HSMs) for backing secrets. You can find the Key Vault Keys client SDK for Java here14.Azure Blob StorageCloud-based object storage, typically used for storing huge amounts of unstructured data, such as binary and text data. Blob storage has public and private modules, which you can use for backup purposes, streaming media (including heavy video files), serving files directly to browsers, and storing data for analysis. You can find the Storage Blobs client SDK for Java here15.

It’s a Wrap!

Like other cloud providers, Microsoft Azure provides numerous cloud computing services. Azure’s edge is in its enterprise-grade and hybrid-ready services. In recent years, Azure has created sample libraries and SDKs especially for use with Java. These sample libraries are best for educational purposes, and the SDKs are created for use in development. Remember that these files are public, and may contain vulnerabilities. To ensure the security of your devices, systems, and users—scan the libraries before you use them.  References:1. https://cloud.netapp.com/blog/5-considerations-before-you-backup-on-azure2. https://github.com/Azure/azure-libraries-for-java/blob/master/AUTH.md 3. https://github.com/Azure-Samples/aad-java-manage-users-groups-and-roles4. https://github.com/Azure-Samples/active-directory-java-webapp-openidconnect5. https://github.com/Azure-Samples/active-directory-java-native-headless6. https://docs.microsoft.com/en-us/azure/java/java-sdk-configure-webapp-sources?view=azure-java-stable&WT.mc_id=devto-blog-yoterada7. https://azure.microsoft.com/en-us/resources/samples/app-service-java-manage-staging-and-production-slots-for-web-apps/8. https://azure.microsoft.com/en-us/resources/samples/app-service-java-manage-web-apps-with-custom-domains/9. https://azure.microsoft.com/en-us/resources/samples/app-service-java-scale-web-apps-on-linux/10. https://dev.to/azure/azure-sdk-for-java-link-for-contents-and-samples-1nk611. https://docs.microsoft.com/en-us/azure/java/?view=azure-java-stable12. https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/appconfiguration/azure-data-appconfiguration/README.md13. https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/azure-messaging-eventhubs/README.md14. https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/keyvault/azure-keyvault-keys/README.md15. https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/storage/azure-storage-blob/README.md
Schedule Demo