You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Optionally, change the image URL in the request body (`https://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Shorkie_Poo_Puppy.jpg/1280px-Shorkie_Poo_Puppy.jpg\`) to the URL of a different image from which to generate a thumbnail.
38
38
1. Open a command prompt window.
39
-
1. Paste the command from the text editor into the command prompt window, and then run the command.
39
+
1. Paste the command from the text editor into the command prompt window.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Computer-vision/QuickStarts/java-thumb.md
+53-46Lines changed: 53 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,56 +30,61 @@ To create and run the sample, do the following steps:
30
30
31
31
1. Create a new Java project in your favorite IDE or editor. If the option is available, create the Java project from a command line application template.
32
32
1. Import the following libraries into your Java project. If you're using Maven, the Maven coordinates are provided for each library.
1. Replace the `Main` public class with the following code.
57
-
1. Optionally, replace the value of `imageToAnalyze` with the URL of a different image for which you want to generate a thumbnail.
56
+
1. Add the rest of the sample code below, beneath the imports (change to your class name if needed).
57
+
1. Add your Computer Vision subscription key and endpoint to your environment variables.
58
+
1. Optionally, replace the value of `imageToAnalyze` with the URL of your own image.
58
59
1. Save, then build the Java project.
59
-
1. If you're using an IDE, run `Main`. Otherwise, open a command prompt window and then use the `java`command to run the compiled class. For example, `java Main`.
60
+
1. If you're using an IDE, run `GenerateThumbnail`. Otherwise, run from the command line (commands below).
@@ -161,4 +168,4 @@ Explore a Java Swing application that uses Computer Vision to perform optical ch
161
168
> [!div class="nextstepaction"]
162
169
> [Computer Vision API Java Tutorial](../Tutorials/java-tutorial.md)
163
170
164
-
* To rapidly experiment with the Computer Vision API, try the [Open API testing console](https://westcentralus.dev.cognitive.microsoft.com/docs/services/5adf991815e1060e6355ad44/operations/56f91f2e778daf14a499e1fa/console).
171
+
* To rapidly experiment with the Computer Vision API, try the [Open API testing console](https://westcentralus.dev.cognitive.microsoft.com/docs/services/5adf991815e1060e6355ad44/operations/56f91f2e778daf14a499e1fa/console).
0 commit comments