{"id":10494,"date":"2015-08-29T00:28:00","date_gmt":"2015-08-29T04:28:00","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/?p=10494"},"modified":"2015-08-24T10:31:44","modified_gmt":"2015-08-24T14:31:44","slug":"exec-java-provides-static-methods-for-running-external-processes-from-applications","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=10494","title":{"rendered":"Exec.java Provides static methods for running external processes from applications."},"content":{"rendered":"<pre>import java.io.*;\r\n\r\n\/** A class that eases the pain of running external processes\r\n\u00a0*\u00a0 from applications. Lets you run a program three ways:\r\n\u00a0* \u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 \u00a0\r\n\u00a0\u00a0\u00a0 exec: Execute the command, returning\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 immediately even if the command is still running.\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 This would be appropriate for printing a file.\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 \u00a0\r\n\u00a0\u00a0\u00a0 execWait: Execute the command, but don?t\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return until the command finishes. This would be\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 appropriate for sequential commands where the first\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 depends on the second having finished (e.g.,\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 javac followed by java).\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 \u00a0\r\n\u00a0\u00a0\u00a0 execPrint: Execute the command and print the\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 output. This would be appropriate for the Unix\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 command ls.\r\n\u00a0\u00a0\u00a0\u00a0 * \u00a0\r\n\r\n\r\n\u00a0*\u00a0 Note that the PATH is not taken into account, so you must\r\n\u00a0*\u00a0 specify the full pathname to the command, and shell\r\n\u00a0*\u00a0 built-in commands will not work. For instance, on Unix the\r\n\u00a0*\u00a0 above three examples might look like:\r\n\u00a0* \u00a0\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0 \u00a0\r\n\r\n\u00a0\u00a0\u00a0 Exec.exec(\"\/usr\/ucb\/lpr Some-File\");\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0 \u00a0\r\n\r\n\u00a0\u00a0\u00a0 Exec.execWait(\"\/usr\/local\/bin\/javac Foo.java\");\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Exec.execWait(\"\/usr\/local\/bin\/java Foo\");\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0 \u00a0\r\n\r\n\u00a0\u00a0\u00a0 Exec.execPrint(\"\/usr\/bin\/ls -al\");\r\n\r\n\r\n\u00a0\u00a0\u00a0\u00a0 * \u00a0\r\n\r\n\r\n\u00a0*\r\n\u00a0*\u00a0 Taken from Core Web Programming from\r\n\u00a0*\u00a0 Prentice Hall and Sun Microsystems Press,\r\n\u00a0*\u00a0 .\r\n\u00a0*\u00a0 \u00a9 2001 Marty Hall and Larry Brown;\r\n\u00a0*\u00a0 may be freely used or adapted.\r\n\u00a0*\/\r\n\r\npublic class Exec {\r\n\r\n\u00a0 private static boolean verbose = true;\r\n\r\n\u00a0 \/** Determines if the Exec class should print which commands\r\n\u00a0\u00a0\u00a0 * are being executed, and prints error messages if a problem\r\n\u00a0\u00a0\u00a0 * is found. Default is true.\r\n\u00a0\u00a0\u00a0 *\r\n\u00a0\u00a0\u00a0 * @param verboseFlag true: print messages, false: don?t.\r\n\u00a0\u00a0\u00a0 *\/\r\n\r\n\u00a0 public static void setVerbose(boolean verboseFlag) {\r\n\u00a0\u00a0\u00a0 verbose = verboseFlag;\r\n\u00a0 }\r\n\r\n\u00a0 \/** Will Exec print status messages? *\/\r\n\r\n\u00a0 public static boolean getVerbose() {\r\n\u00a0\u00a0\u00a0 return(verbose);\r\n\u00a0 }\r\n\r\n\u00a0 \/** Starts a process to execute the command. Returns\r\n\u00a0\u00a0\u00a0 * immediately, even if the new process is still running.\r\n\u00a0\u00a0\u00a0 *\r\n\u00a0\u00a0\u00a0 * @param command The full pathname of the command to\r\n\u00a0\u00a0\u00a0 * be executed. No shell built-ins (e.g., \"cd\") or shell\r\n\u00a0\u00a0\u00a0 * meta-chars (e.g. \"&gt;\") are allowed.\r\n\u00a0\u00a0\u00a0 * @return false if a problem is known to occur, but since\r\n\u00a0\u00a0\u00a0 * this returns immediately, problems aren?t usually found\r\n\u00a0\u00a0\u00a0 * in time. Returns true otherwise.\r\n\u00a0\u00a0\u00a0 *\/\r\n\r\n\u00a0 public static boolean exec(String command) {\r\n\u00a0\u00a0\u00a0 return(exec(command, false, false));\r\n\u00a0 }\r\n\r\n\u00a0 \/** Starts a process to execute the command. Waits for the\r\n\u00a0\u00a0\u00a0 * process to finish before returning.\r\n\u00a0\u00a0\u00a0 *\r\n\u00a0\u00a0\u00a0 * @param command The full pathname of the command to\r\n\u00a0\u00a0\u00a0 * be executed. No shell built-ins or shell metachars are\r\n\u00a0\u00a0\u00a0 * allowed.\r\n\u00a0\u00a0\u00a0 * @return false if a problem is known to occur, either due\r\n\u00a0\u00a0\u00a0 * to an exception or from the subprocess returning a\r\n\u00a0\u00a0\u00a0 * nonzero value. Returns true otherwise.\r\n\u00a0\u00a0\u00a0 *\/\r\n\r\n\u00a0 public static boolean execWait(String command) {\r\n\u00a0\u00a0\u00a0 return(exec(command, false, true));\r\n\u00a0 }\r\n\r\n\u00a0 \/** Starts a process to execute the command. Prints any output\r\n\u00a0\u00a0\u00a0 * the command produces.\r\n\u00a0\u00a0\u00a0 *\r\n\u00a0\u00a0\u00a0 * @param command The full pathname of the command to\r\n\u00a0\u00a0\u00a0 * be executed. No shell built-ins or shell meta-chars are\r\n\u00a0\u00a0\u00a0 * allowed.\r\n\u00a0\u00a0\u00a0 * @return false if a problem is known to occur, either due\r\n\u00a0\u00a0\u00a0 * to an exception or from the subprocess returning a\r\n\u00a0\u00a0\u00a0 * nonzero value. Returns true otherwise.\r\n\u00a0\u00a0\u00a0 *\/\r\n\r\n\u00a0 public static boolean execPrint(String command) {\r\n\u00a0\u00a0\u00a0 return(exec(command, true, false));\r\n\u00a0 }\r\n\r\n\u00a0 \/** This creates a Process object via Runtime.getRuntime.exec()\r\n\u00a0\u00a0\u00a0 * Depending on the flags, it may call waitFor on the process\r\n\u00a0\u00a0\u00a0 * to avoid continuing until the process terminates, and open\r\n\u00a0\u00a0\u00a0 * an input stream from the process to read the results.\r\n\u00a0\u00a0\u00a0 *\/\r\n\r\n\u00a0 private static boolean exec(String command,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 boolean printResults,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 boolean wait) {\r\n\u00a0\u00a0\u00a0 if (verbose) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 printSeparator();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(\"Executing '\" + command + \"'.\");\r\n\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0 try {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Start running command, returning immediately.\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 Process p\u00a0 = Runtime.getRuntime().exec(command);\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Print the output. Since we read until there is no more\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ input, this causes us to wait until the process is\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ completed.\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 if(printResults) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 BufferedReader buffer = new BufferedReader(\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 new InputStreamReader(p.getInputStream()));\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 String s = null;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while ((s = buffer.readLine()) != null) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(\"Output: \" + s);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 buffer.close();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (p.exitValue() != 0) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (verbose) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 printError(command + \" -- p.exitValue() != 0\");\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return(false);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } catch (Exception e) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Ignore read errors; they mean the process is done.\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ If not printing the results, then we should call waitFor\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ to stop until the process is completed.\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 } else if (wait) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(\" \");\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 int returnVal = p.waitFor();\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (returnVal != 0) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (verbose) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 printError(command);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return(false);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } catch (Exception e) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (verbose) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 printError(command, e);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return(false);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0 } catch (Exception e) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 if (verbose) {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 printError(command, e);\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 return(false);\r\n\u00a0\u00a0\u00a0 }\r\n\u00a0\u00a0\u00a0 return(true);\r\n\u00a0 }\r\n\r\n\u00a0 private static void printError(String command,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Exception e) {\r\n\u00a0\u00a0\u00a0 System.out.println(\"Error doing exec(\" + command + \"): \" +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 e.getMessage());\r\n\u00a0\u00a0\u00a0 System.out.println(\"Did you specify the full \" +\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"pathname?\");\r\n\u00a0 }\r\n\r\n\u00a0 private static void printError(String command) {\r\n\u00a0\u00a0\u00a0 System.out.println(\"Error executing ?\" + command + \"?.\");\r\n\u00a0 }\r\n\r\n\u00a0 private static void printSeparator() {\r\n\u00a0\u00a0\u00a0 System.out.println\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 (\"==============================================\");\r\n\u00a0 }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>import java.io.*; \/** A class that eases the pain of running external processes \u00a0*\u00a0 from applications. Lets you run a program three ways: \u00a0* \u00a0 \u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0 \u00a0 \u00a0\u00a0\u00a0 exec: Execute the command, returning \u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 immediately even if the command is still running. \u00a0\u00a0\u00a0\u00a0 *\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 This would be appropriate for printing a file. \u00a0\u00a0\u00a0\u00a0 &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=10494\">Continue reading<\/a><\/p>\n","protected":false},"author":130,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1417,1424],"tags":[706,308,285],"class_list":["post-10494","post","type-post","status-publish","format-standard","hentry","category-code-programming-samples--","category-javaj2eej2me","tag-code","tag-java","tag-285","item-wrap"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":26952,"url":"http:\/\/bangla.sitestree.com\/?p=26952","url_meta":{"origin":10494,"position":0},"title":"Exec.java Provides static methods for running external processes from applications. #Programming Code Examples #Java\/J2EE\/J2ME #Basic Java","author":"Author-Check- Article-or-Video","date":"May 6, 2021","format":false,"excerpt":"import java.io.*; \/** A class that eases the pain of running external processes * from applications. Lets you run a program three ways: * * exec: Execute the command, returning * immediately even if the command is still running. * This would be appropriate for printing a file. * execWait:\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":22130,"url":"http:\/\/bangla.sitestree.com\/?p=22130","url_meta":{"origin":10494,"position":1},"title":"SCJP: Topics and Resources : will be continued #SCJP","author":"Sayed","date":"March 10, 2021","format":false,"excerpt":"SCJP topics and related resources are provided. I have skimed through the resources at least one time.Garbage Collection Test area:Given a code example, recognize the point at which an object becomes eligible for garbage collection, determine what is and is not guaranteed by the garbage collection system, and recognize the\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26988,"url":"http:\/\/bangla.sitestree.com\/?p=26988","url_meta":{"origin":10494,"position":2},"title":"Application that reports all command-line arguments #Programming Code Examples #Java\/J2EE\/J2ME #Basic Java","author":"Author-Check- Article-or-Video","date":"May 7, 2021","format":false,"excerpt":"****************** ShowArgs.java Application that reports all command-line arguments. ****************** *\/ public class ShowArgs { public static void main(String[] args) { for(int i=0; i<args .length; i++) { System.out.println(\"Arg \" + i + \" is \" + args[i]); } } } \/* Note: Brought from our old site: http:\/\/www.salearningschool.com\/example_codes\/ on Jan 2nd,\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10523,"url":"http:\/\/bangla.sitestree.com\/?p=10523","url_meta":{"origin":10494,"position":3},"title":"Application that reports all command-line arguments","author":"","date":"August 29, 2015","format":false,"excerpt":"****************** ShowArgs.java Application that reports all command-line arguments. ****************** \u00a0*\/ public class ShowArgs { \u00a0 public static void main(String[] args) { \u00a0\u00a0\u00a0 for(int i=0; i","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10113,"url":"http:\/\/bangla.sitestree.com\/?p=10113","url_meta":{"origin":10494,"position":4},"title":"DatabaseUtilities.java: Several general-purpose utilities discussed and used in the chapter.","author":"","date":"August 4, 2015","format":false,"excerpt":"package cwp; import java.sql.*; \/** Three database utilities: \u00a0*\u00a0\u00a0 1) getQueryResults. Connects to a database, executes \u00a0*\u00a0\u00a0\u00a0\u00a0\u00a0 a query, retrieves all the rows as arrays \u00a0*\u00a0\u00a0\u00a0\u00a0\u00a0 of strings, and puts them inside a DBResults \u00a0*\u00a0\u00a0\u00a0\u00a0\u00a0 object. Also places the database product name, \u00a0*\u00a0\u00a0\u00a0\u00a0\u00a0 database version, and the names of all\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65977,"url":"http:\/\/bangla.sitestree.com\/?p=65977","url_meta":{"origin":10494,"position":5},"title":"Writing your first Spring application #Java Short Notes","author":"Author-Check- Article-or-Video","date":"July 18, 2021","format":false,"excerpt":"Requirements: JDK 1.4.2 (or above), Tomcat 5.0+, Ant 1.6.1+ Also, you can use cygwin in windows to emulate linux like commands set JAVA_HOME, ANT_HOME, CATALINA_HOME environment variables - paths to the installed software Add to PATH: JAVA_HOME\/bin, ANT_HOME\/bin, CATALINA_HOME\/bin You can start with the minimal application like struts-blanke.war or webapp-minimal\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/130"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10494"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10494\/revisions"}],"predecessor-version":[{"id":10496,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/10494\/revisions\/10496"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10494"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}