GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing cloudinary.com — Java SDK – Java Upload + Image, Video Transformations | Documentation
Menu
Java SDKLast updated: Nov-04-2026 The Cloudinary Java SDK provides simple, yet comprehensive image and video upload, transformation, optimization, and delivery capabilities through the Cloudinary APIs, that you can implement using code that integrates seamlessly with your existing Java application.
SDK security upgrade, June 2025
We recently released an enhanced security version of this SDK that improves the validation and handling of input parameters. We recommend upgrading to the latest version of the SDK to benefit from these security improvements. How would you like to learn?
InstallThe easiest way to start using Cloudinary's Java library is to use Maven.
Note
We recommend updating the version number shown below to use the latest version of the Java SDK.PrerequisitesIf you don't already have Maven installed:
Choose the right Cloudinary packageThe Maven repository includes several Cloudinary Java packages ("artifacts"). Choose the package(s) that fit your application type:
Add Cloudinary to your project
ConfigureSet required configuration parametersTo use the Cloudinary Java library, you have to set at least your You can set the configuration parameters globally using one of the options shown below, or programmatically in each call to a Cloudinary method. Parameters set in a call to a Cloudinary method override globally set parameters.
Notes
Option 1: Environment variable configuration (with Singleton)To define the
For example: Once the environment variable is configured, retrieve a Cloudinary singleton instance in your code. This is the recommended option if you're using JSP tag libraries, as they require an instance to be available in the Singleton. Option 2: Direct instance creationCreate a Cloudinary instance directly with your configuration parameters. This approach creates a regular instance without using the singleton pattern. Use this for simple applications where you don't need JSP tag library support. Option 3: Manual singleton registrationIf you need to manually register a Cloudinary instance as a singleton (for example, when using JSP tag libraries without environment variables):
Tip
You may also want to check out the API Keys and Credentials video tutorial.Set additional configuration parametersIn addition to the required configuration parameters, you can define a number of optional configuration parameters if relevant. The following example shows appending UseOnce you've installed and configured the Java SDK, import the package and then you can use it for:
Import the packageWhen using in Java code, import the package: When using in a JSP view, import the tag library: Quick example: File uploadThe following Java code uploads the
Learn more about upload
Quick example: Transform and optimizeTake a look at the following transformation code and the image it delivers: This relatively simple code performs all of the following on the original front_face.jpg image before delivering it:
And here's the URL that's automatically generated and included in an image tag from the above code: In a similar way, you can transform a video.
Learn more about transformations
Quick example: Get details of a single assetThe following Java example uses the Admin API resource method to return details of the image with public ID Sample response
Learn more about managing assets
Java-specific featuresYou can use Cloudinary's Java SDK for any Java application. However, this SDK also provides some extra Java-specific functionality:
Sample projectsTake a look at the Java sample projects page to help you get started integrating Cloudinary into your Java application.
Related topics
✔️ Feedback sent!
✖️
*
Cloudinary is committed to protecting your information security. For details, see our privacy policy. For additional assistance, open a support request. ErrorUnfortunately there's been an error sending your feedback. Rate this page: | ||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |