{"id":40046,"date":"2021-01-19T00:04:40","date_gmt":"2021-01-19T07:04:40","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/premier-developer\/?p=40046"},"modified":"2021-01-11T10:28:56","modified_gmt":"2021-01-11T17:28:56","slug":"working-with-azure-storage-blobs-with-a-java-azure-function","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/working-with-azure-storage-blobs-with-a-java-azure-function\/","title":{"rendered":"Working with Azure Storage Blobs with a Java Azure Function"},"content":{"rendered":"<p><a class=\"x-hidden-focus\" href=\"https:\/\/www.linkedin.com\/in\/bryansoltis\/\" target=\"_blank\" rel=\"noopener noreferrer\">Bryan Soltis<\/a> shows how to create a simple Java Azure Function to work with Azure Storage files.<\/p>\n<hr \/>\n<div class=\"blogperex\">If you\u2019ve spent much time around me, you know that I\u2019m a huge fan of Azure Functions. Being able to code stand-alone, serverless functions to handle tasks is an extremely powerful addition to any application. While my preference is C#, Azure Functions supports a number of other languages, allowing developers of all flavors to use the platform. In this article, I\u2019ll show you how to create a simple Java Azure Function to work with Azure Storage files.<\/div>\n<div class=\"blogcontent\">\n<p>In my role as a Microsoft Cloud Solution Architect, I work with a lot of different companies, all with different skillsets and development stacks. While my forte is certainly the .NET stack, most companies use a blend of platforms to build their solutions. With a lineage back to 1991, Java has one of the largest followings, due to its immense versatility and capability. To help me work with clients who specialize in Java, I decided to create an Azure Function using Java to work with Azure Storage blobs.<\/p>\n<h4>NOTE<\/h4>\n<p>This blog is in no way an \u201cexpert\u201d level article on Java programming. I\u2019m just sharing some stuff I learned to hopefully help the next C# dev find their way.<\/p>\n<h2>Setup<\/h2>\n<p>To get going, I add Java support to Visual Studio Code. Now, there are a lot of IDE\u2019s available for Java, and\u00a0<a href=\"https:\/\/www.jetbrains.com\/idea\/\" target=\"_blank\" rel=\"noopener noreferrer\" data-new-window=\"true\"><strong>IntelliJ<\/strong><\/a>\u00a0is probably one of the best. Just for fun, I wanted to see VS Code could do. Luckily, there\u2019s a collection of extensions you can install to get up and going with Java quickly:\u00a0<a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=vscjava.vscode-java-pack\" target=\"_blank\" rel=\"noopener noreferrer\" data-new-window=\"true\"><strong>The<\/strong>\u00a0<strong>Java Extension Pack<\/strong><\/a>.<\/p>\n<p>Check out the step-by-step example <a href=\"https:\/\/soltisweb.com\/blog\/detail\/2020-06-09-workingwithazurestorageblobsinajavaazurefunction\">here<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>As a long-time C# developer, working with Java is a big change. It\u2019s a completely new way to package files, include dependencies, and host applications. Luckily, the code syntax is very similar. Hopefully, this blog helps anyone looking to make a similar transition and work with Azure Functions using multiple languages.<\/p>\n","protected":false},"author":582,"featured_media":40047,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25],"tags":[10605,54],"class_list":["post-40046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure-storage","tag-java"],"acf":[],"blog_post_summary":"<p>As a long-time C# developer, working with Java is a big change. It\u2019s a completely new way to package files, include dependencies, and host applications. Luckily, the code syntax is very similar. Hopefully, this blog helps anyone looking to make a similar transition and work with Azure Functions using multiple languages.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/40046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=40046"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/40046\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/40047"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=40046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=40046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=40046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}