<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-43307342340991394</id><updated>2024-10-25T11:26:46.119+02:00</updated><category term="Java"/><category term="Python"/><category term="Apache maven"/><category term="Java File"/><category term="Windows"/><category term="Eclipse IDE"/><category term="Browser"/><category term="Django"/><category term="Flask"/><category term="Google Products"/><category term="JUnit"/><category term="Linux"/><category term="Mozilla Firefox"/><category term="Prolog"/><category term="Virtual Box"/><category term="Web Server"/><title type='text'>Hit n Trail</title><subtitle type='html'>Collection of things I learnt with &quot;Hit n Trail&quot;.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-4486824326766594155</id><published>2012-08-19T15:43:00.001+02:00</published><updated>2012-09-26T15:53:40.573+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Products"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Google Drive - Language Change issue.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This post is not something which is related to Programming. It&#39;s the issue I had with the newly launched Google Drive. I have my windows 7 in French but with some tweaks now its in English. The issue I had with Google Drive was that no matter how many times I installed/re-installed the application on windows, it always was with French as language. There is no option in the settings of Google Drive to change it. And I prefer to have it in English. So here is the trick to solve this issue.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Close Google Drive from the system tray and do following:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;Solution 1 (Need to be done every time you restart windows and that&#39;s annoying):&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Step 1: Go to command prompt. (Run -&amp;gt; cmd).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Step 2: run the following command:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;C:\&amp;gt;set LANG=&quot;en_US&quot;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;C:\Program Files\Google\Drive\&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Courier New, Courier, monospace; font-size: 13px;&quot;&gt;googledrive.exe&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;u&gt;Solution 2 (Easy and not Annoying):&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Set a new environment variable with variable name &quot;LANG&quot; and value &quot;en_US&quot; (In case if you don&#39;t know how to set enviornment variable in Windows check my old post on &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/06/setting-up-windows-environment-variable.html&quot;&gt;Windows Environment Variable&lt;/a&gt;).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once all this is done start Google drive again and Voila.. problem solved.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Hope this helped you.&amp;nbsp;&lt;/span&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/4486824326766594155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/4486824326766594155' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4486824326766594155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4486824326766594155'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/08/google-drive-language-change-issue.html' title='Google Drive - Language Change issue.'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-4203752653366548400</id><published>2012-08-09T17:21:00.000+02:00</published><updated>2012-08-11T00:22:02.700+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java File"/><title type='text'>Writing in a File using Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In my previous posts I talked about how to &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/creating-file-in-java.html&quot;&gt;Create&lt;/a&gt; and &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/delete-file-using-java.html&quot;&gt;Delete&lt;/a&gt;
 files using Java. Now, once you have created a file the next step is to
 write some content in those files and that can be achieved by using:&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://docs.oracle.com/javase/1.4.2/docs/api/java/io/BufferedWriter.html&quot;&gt;BufferedWriter&lt;/a&gt;, or &lt;br /&gt;&lt;pre class=&quot;brush:java&quot;&gt;FileWriter writer = new FileWriter(fileToWriteIn);
BufferedWriter bufferedWriter = new BufferedWriter(writer);
bufferedWriter.write(toWrite);
bufferedWriter.close();&lt;/pre&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://docs.oracle.com/javase/1.4.2/docs/api/java/io/FileOutputStream.html&quot;&gt;FileOutputStream&lt;/a&gt;.&lt;pre class=&quot;brush:java&quot;&gt;FileOutputStream stream = new FileOutputStream(fileToWriteIn);
stream.write(toWrite.getBytes());
stream.flush();
stream.close();&lt;/pre&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;There are classes like &lt;a href=&quot;http://docs.oracle.com/javase/1.4.2/docs/api/java/io/FileWriter.html&quot;&gt;FileWriter &lt;/a&gt;available
 to perform write operation on a file but since writer sends its output 
immediately to the underlying character or byte stream. So that is why 
until prompt output is required, it is recommended to wrap a 
BufferedWriter around it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Here is an example with full code and main method:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:java; gutter: false;&quot;&gt;package home.flicker.java.io.file;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class WriteInFile {
    File file = null;
&amp;nbsp; &amp;nbsp; /**
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Method to create a file with the given name.
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&amp;nbsp; &amp;nbsp; public boolean createFile(String fileName) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean result = false;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file = new File(fileName);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // creating the new File. The Method createNewFile() returns TRUE if file is successfully created else it returns FALSE.
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = file.createNewFile();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException e) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&quot;Error while creating file!!! &quot; + e.getMessage());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; /**
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Method to read content from user and write it in given file using BufferedReader.
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&amp;nbsp; &amp;nbsp; public boolean writeInFileWithBufferedWriter(File fileToWriteIn){
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean result = false;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String toWrite = readFromUser(&quot;Data to write&quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileWriter writer = new FileWriter(fileToWriteIn);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedWriter bufferedWriter = new BufferedWriter(writer);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bufferedWriter.write(toWrite);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bufferedWriter.close();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = true;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException e) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&quot;Error while writing in file!!! &quot; + e.getMessage());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;
&amp;nbsp; &amp;nbsp; }

&amp;nbsp; &amp;nbsp; /**
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Method to read content from user and write it in given file using FileOutputStream.
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&amp;nbsp; &amp;nbsp; public boolean writeInFileWithFileOutputStream(File fileToWriteIn) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean result = false;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String toWrite = readFromUser(&quot;Data to write&quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileOutputStream stream = new FileOutputStream(fileToWriteIn);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.write(toWrite.getBytes());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.flush();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream.close();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = true;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (FileNotFoundException e) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&quot;Error: File not found!!! How the hell I am supossed to write &amp;nbsp; :P &quot; + e.getMessage());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException e) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&quot;Error while writing in file!!! It&#39;s stupid &amp;nbsp; x( &quot; + e.getMessage());
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return result;
&amp;nbsp; &amp;nbsp; }

&amp;nbsp; &amp;nbsp; /**
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Reads input from user as string and puts the label as question.
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&amp;nbsp; &amp;nbsp; public static String readFromUser(String label) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Scanner scanner = new Scanner(System.in);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(label + &quot;: &quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String input = scanner.next();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return input;
&amp;nbsp; &amp;nbsp; }

&amp;nbsp; &amp;nbsp; /**
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Main method.
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&amp;nbsp; &amp;nbsp; public static void main(String args[]) throws IOException{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WriteInFile example = new WriteInFile();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String fileName = readFromUser(&quot;Enter File name&quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; example.createFile(fileName);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; example.writeInFileWithBufferedWriter(example.file); &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; example.writeInFileWithFileOutputStream(example.file);
&amp;nbsp; &amp;nbsp; }
}&lt;/pre&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;
&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The
 thing with these methods is that they over-write the content which is 
already in the file. To avoid that you need to append data. Will cover 
that some other time.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;I hope this post helps you. Share your experience or issues... &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/4203752653366548400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/4203752653366548400' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4203752653366548400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4203752653366548400'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/08/writing-in-file-using-java_9.html' title='Writing in a File using Java'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-4463576817685392695</id><published>2012-08-04T22:47:00.001+02:00</published><updated>2012-08-04T22:49:01.432+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JUnit"/><title type='text'>JUnit: Basic Annotations</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;What is JUnit?&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;background-color: white; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;JUnit 4.x is a test framework which uses annotations to identify methods that are test methods. JUnit assumes that all test methods can be executed in an arbitrary order. Therefore tests should not depend on other tests.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;To write a test with JUnit&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;itemizedlist&quot; style=&quot;background-color: white; line-height: 24px;&quot;&gt;
&lt;ul class=&quot;itemizedlist&quot; type=&quot;disc&quot;&gt;
&lt;li class=&quot;listitem&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Annotate a method with @org.junit.Test&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;listitem&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Use a method provided by JUnit to check the expected result of the code execution versus the actual result&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 24px;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You can use Eclipse or the&amp;nbsp;&lt;code class=&quot;code&quot;&gt;org.junit.runner.JUnitCore&lt;/code&gt;&amp;nbsp;class to run the test.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; line-height: 24px;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Various Annotations of JUnit:&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;@Test&lt;/b&gt;: This annotations tells which method is a test method.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@Test&lt;br /&gt;public void methondName(){&lt;br /&gt;...........&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You can some parameters with this annotations.&lt;/span&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;b&gt;@Test (expected = Exception.class)&lt;/b&gt;:&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;Fails, if the method does not throw the named exception.&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;&lt;b&gt;@Test(timeout=1000)&lt;/b&gt;:&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; line-height: 18px;&quot;&gt;Fails, if the method takes longer than 100 milliseconds.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;ol&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/span&gt;&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;@Before&lt;/b&gt;: The method which this annotation will execute before each test method. For example in cases where you need to initialize new class or read input data.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@Before&lt;br /&gt;public void methodName(){&lt;br /&gt;........&lt;br /&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;@After&lt;/b&gt;: This annotation signifies the method which executes after each test. For example where you need to roll back changes done by tests.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@After&lt;br /&gt;public void methodName(){&lt;br /&gt;........&lt;br /&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;@BeforeClass&lt;/b&gt;: Method with this annotations executes only once before the start of all tests. This can be used in case where you need a database connection for the tests and you create it only once in the beginning.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@BeforeClass&lt;br /&gt;public void methodName(){&lt;br /&gt;........&lt;br /&gt;}&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;@AfterClass&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;: This annotation signifies the method which executes only once and that too at the end of all tests for example to close the data connection.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@AfterClass&lt;br /&gt;public void methodName(){&lt;br /&gt;........&lt;br /&gt;}&lt;/span&gt;
&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;@Ignore&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;: Will ignore the test method. You can use it in cases where your code has changed and the test is not yet adapted to&amp;nbsp;accommodate&amp;nbsp;those changes.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;@Ignore&lt;br /&gt;public void methodName(){&lt;br /&gt;........&lt;br /&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/4463576817685392695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/4463576817685392695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4463576817685392695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4463576817685392695'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/08/junit-basic-annotations.html' title='JUnit: Basic Annotations'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><thr:total>0</thr:total><georss:featurename>Avenue de Cannes, 06160 Antibes, France</georss:featurename><georss:point>43.573924160329632 7.0904731750488281</georss:point><georss:box>43.56242016032963 7.0707321750488283 43.585428160329634 7.1102141750488279</georss:box></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-3997109524672362021</id><published>2012-07-29T21:21:00.000+02:00</published><updated>2012-07-29T21:32:31.105+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java File"/><title type='text'>Delete File using Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In&amp;nbsp;continuation&amp;nbsp;to my last post, &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/creating-file-in-java.html&quot;&gt;Creating a File in Java&lt;/a&gt;, I am writing this post to show how to d&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;elete a file. It&#39;s very simple, you just use the &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;delete()&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt; method of the File class and done. The method returns a &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;boolean&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;, &lt;i&gt;true &lt;/i&gt;if the file is successfully deleted otherwise &lt;i&gt;false&lt;/i&gt;. Here is an example:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;package home.flicker.java.io.file;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import java.io.File;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;* @author fLiCkEr&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;* Example to show how to delete a file.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class FileDeletion {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; public static void main(String[] args) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; File fileToDelete = new File(&quot;test.txt&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (fileToDelete.delete()) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;System.out.println(&quot;File deleted!!!&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;System.out.println(&quot;Can&#39;t delete file!!!&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; } catch (Exception e) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Error deleting file: &quot; + e.getMessage());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;


&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/3997109524672362021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/3997109524672362021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/3997109524672362021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/3997109524672362021'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/delete-file-using-java.html' title='Delete File using Java'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-5655450862524275150</id><published>2012-07-29T03:00:00.001+02:00</published><updated>2012-07-29T03:08:14.457+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Java File"/><title type='text'>Creating a file in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Until now, the posts I wrote were on setting up development&amp;nbsp;environment but for the first time I am gonna write something about coding. It&#39;s a simple tutorial on how to create files in Java. It&#39;s nothing fancy but just a point for me to start and take you into a bit of programming. So let&#39;s get started.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;There are many times when you need a file during development may be to write some data (could be a txt or csv or your own format). It&#39;s very simple to create a file. You simply need to use the &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;File&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt; class from the Java IO. It has many methods and one of them is &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;File.&lt;span style=&quot;background-color: white;&quot;&gt;createNewFile().&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The steps are:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Create a File object:&amp;nbsp;&lt;/span&gt;&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;File fileToCreate = new File(&quot;nameOfFile&quot;);&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The second step is to create the file:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ileToCreate.creatNewFile()&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And that&#39;s all. Here is example code:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;package home.flicker.java.io.file;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import java.io.File;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import java.io.IOException;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import java.util.Scanner;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/**&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;* @author flicker&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;* Example to create a file with user given name.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class FileCreation {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; public static void main(String[] args) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Scanner scanner = new Scanner(System.in);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; System.out.println(&quot;Enter name of File you want to create: &quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; String fileName = scanner.next();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; File fileToCreate = new File(fileName);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;if(fileToCreate.createNewFile()){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;File created!!!&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;else{&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Can&#39;t create new file as it already exists!!!&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; } catch (IOException e) {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;System.out.println(&quot;Error while creating file!!! &quot; + e.getMessage());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here is a screen-shot of the output:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfMRB3M4zxDejIwemRGHYx3I2IM77Idi6ZLf__UOaXA3QxjqQpXdu9vbMVwloL2McCmdfG6QMDNDJOQwYo5Az-frkeVZd_QQWENnJtqnFyD9Qoe_hf61AFSy7G4vKSS0DMUKI8J9zq8g/s1600/shot3.png&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfMRB3M4zxDejIwemRGHYx3I2IM77Idi6ZLf__UOaXA3QxjqQpXdu9vbMVwloL2McCmdfG6QMDNDJOQwYo5Az-frkeVZd_QQWENnJtqnFyD9Qoe_hf61AFSy7G4vKSS0DMUKI8J9zq8g/s400/shot3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The example code is pretty simple and self explanatory. Share your issues or confusions.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I will be posting more on File reading, writing and other file related operations.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/5655450862524275150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/5655450862524275150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/5655450862524275150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/5655450862524275150'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/creating-file-in-java.html' title='Creating a file in Java'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfMRB3M4zxDejIwemRGHYx3I2IM77Idi6ZLf__UOaXA3QxjqQpXdu9vbMVwloL2McCmdfG6QMDNDJOQwYo5Az-frkeVZd_QQWENnJtqnFyD9Qoe_hf61AFSy7G4vKSS0DMUKI8J9zq8g/s72-c/shot3.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-8303267138654523198</id><published>2012-07-18T17:54:00.000+02:00</published><updated>2012-07-18T20:45:42.298+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Flask"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Server"/><title type='text'>Say Hello to Python Flask Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;


What is Flask Server?&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;From the official Flask &lt;a href=&quot;http://flask.pocoo.org/&quot;&gt;website&lt;/a&gt;, Flask is a micro web development framework for Python based on &lt;a href=&quot;http://werkzeug.pocoo.org/&quot;&gt;Werkzeug&lt;/a&gt; (a WSGI utility library for Python),&amp;nbsp; &lt;a href=&quot;http://jinja.pocoo.org/docs/&quot;&gt;Jinja 2&lt;/a&gt; (a modern and designer friendly templating language for Python) and good intentions. It&#39;s released under &lt;a href=&quot;http://flask.pocoo.org/docs/license/&quot;&gt;BSD license&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Some of the features of flask are:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Built-in development server and debugger.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Integrated support for unittesting support.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;RESTful request dispatching.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Uses Jinja 2 templating.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Support for secure Cookies.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;100% WSGI 1.0 complaint.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Unicode based.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Extensively documented. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;So, enough of the theoretical detail, lets start with the practical :).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;


&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;Installation&lt;/span&gt;&amp;nbsp; &lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Flask depends on two external libraries, Werkzeug and Jinja2. So how do we get it to our local machine? There are many ways to do it but I did it with virtualenv. Now, for someone like me who is new to Python, the next question is &lt;i&gt;&quot;What the hell is a virtualenv?&quot;&lt;/i&gt;. Well virtualenv is a tool to create isolated Python environments. You can find more details on the &lt;a href=&quot;http://www.virtualenv.org/en/latest/index.html#&quot;&gt;official website&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;So how do we get virtualenv. Well that&#39;s very simple.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Note:&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. The installation I did was on a 
Linux Fedora 14 machine with root privileges, there is a possibility that few of the commands can 
differ from one version of Linux to another.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Another thing, I am considering that you already have Python, python-setup-tools and python-pip installed on your machine. In case you don&#39;t have it and don&#39;t know how to get it see my last post &quot;&lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/getting-ready-with-python-pip.html&quot;&gt;Getting Ready with Python-PIP&lt;/a&gt;&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Installing Virtualenv &lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You can get virtualenv package using easy_install or python-pip. In my case, I used python-pip. fire up a shell and run following commands:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;pip-python install virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This command will give you this:&lt;/span&gt; &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[root@localhost dev]# pip-python install virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Downloading/unpacking virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Downloading virtualenv-1.7.tar.gz (2.1Mb): 2.1Mb downloaded&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Running setup.py egg_info for package virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;warning: no previously-included files matching &#39;*.*&#39; found under directory &#39;docs/_templates&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Installing collected packages: virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Running setup.py install for virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;warning: no previously-included files matching &#39;*.*&#39; found under directory &#39;docs/_templates&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Installing virtualenv script to /usr/bin&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Successfully installed virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Cleaning up...&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[root@localhost dev]# &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once the virualevn installation is done the next step is to setup a virtual environment.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Setting up virtual environment with virtualenv&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;To setup a virtual environment for python with virutalenv is very simple.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Step 1 is to create a folder in which you want to have python virtual environment and then create&amp;nbsp; virtualenv folder within it. Run following commands:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mkdir flaskTestServer&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cd flaskTestServer&lt;br /&gt;virtualenv venv&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The above set of commands will give you following:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[root@localhost Dev]# mkdir flaskTestServer&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[root@localhost Dev]# cd flaskTestServer/&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[root@localhost flaskTestServer]# ll&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;total 0&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[root@localhost flaskTestServer]# virtualenv venv&lt;br /&gt;New python executable in venv/bin/python&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Installing setuptools............done.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Installing pip...............done.&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once that&#39;s done you just have to activate the virtual environment you just created:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;[root@localhost flaskTestServer]# . venv/bin/activate&lt;br /&gt;(venv)[root@localhost flaskTestServer]#&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And you are all set to install you flask server in your own virtual environment.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Installing Flask Server&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Simply run following command:&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(venv)[root@localhost flaskTestServer]# pip install flask&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And you are all set to start developing your own flask server and run it.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;

&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Example&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now lets make a flask web server to say hello to the world. It&#39;s very simple, very very simple.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Make a python script, lets say &lt;i&gt;flaskHelloWorld.py&lt;/i&gt; and put in following code:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;from flask import Flask&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;app = Flask(__name__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;@app.route(&#39;/&#39;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;def hello_world():&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &#39;Hello World!&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if __name__ == &#39;__main__&#39;:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.run()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;So, what did we do here:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;ol class=&quot;arabic simple&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;li&gt;First we imported the &lt;span class=&quot;xref py py-class docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Flask&lt;/span&gt;&lt;/span&gt; class.  An instance of this
class will be our WSGI application.  The first argument is the name of
the application’s module.  If you are using a single module (as in this
example), you should use &lt;cite&gt;__name__&lt;/cite&gt; because depending on if it’s started as
application or imported as module the name will be different (&lt;span class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;&#39;__main__&#39;&lt;/span&gt;&lt;/span&gt;
versus the actual import name).  For more information, have a look at the
&lt;a class=&quot;reference internal&quot; href=&quot;http://flask.pocoo.org/docs/api/#flask.Flask&quot; title=&quot;flask.Flask&quot;&gt;&lt;span class=&quot;xref py py-class docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;Flask&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; documentation.&lt;/li&gt;
&lt;li&gt;Next we create an instance of this class.  We pass it the name of the module
or package.  This is needed so that Flask knows where to look for templates,
static files, and so on.&lt;/li&gt;
&lt;li&gt;We then use the &lt;a class=&quot;reference internal&quot; href=&quot;http://flask.pocoo.org/docs/api/#flask.Flask.route&quot; title=&quot;flask.Flask.route&quot;&gt;&lt;span class=&quot;xref py py-meth docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;route()&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; decorator to tell Flask what URL
should trigger our function.&lt;/li&gt;
&lt;li&gt;The function is given a name which is also used to generate URLs for that
particular function, and returns the message we want to display in the
user’s browser.&lt;/li&gt;
&lt;li&gt;Finally we use the &lt;a class=&quot;reference internal&quot; href=&quot;http://flask.pocoo.org/docs/api/#flask.Flask.run&quot; title=&quot;flask.Flask.run&quot;&gt;&lt;span class=&quot;xref py py-meth docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;run()&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; function to run the local server
with our application.  The &lt;span class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;&#39;__main__&#39;:&lt;/span&gt;&lt;/span&gt; makes sure the
server only runs if the script is executed directly from the Python
interpreter and not used as imported module.&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And run it with Python.&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(venv)[root@localhost flaskTestServer]# &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;python flaskHelloWorld.py&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;* Running on http://127.0.0.1:5000/&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now open up a browser and go to the address&amp;nbsp;&lt;/span&gt; &lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;http://localhost:5000/&lt;/i&gt; or &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;http://127.0.0.1:5000/&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt; and flask will say hello to you like in the screen-shot below:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimva13XWtlvMW5yX563axI6edMWPT5i-Y34V1h3510PyitM3w9cz5bBwwLln4sRfAApJr97W-JzVWlJICzI6YursNgGgsXYCw8bwpNIm72r3ZZZGsUCxDLR7y_qV_4CjF9w6LGSZTZ3g/s1600/flask2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimva13XWtlvMW5yX563axI6edMWPT5i-Y34V1h3510PyitM3w9cz5bBwwLln4sRfAApJr97W-JzVWlJICzI6YursNgGgsXYCw8bwpNIm72r3ZZZGsUCxDLR7y_qV_4CjF9w6LGSZTZ3g/s400/flask2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And that&#39;s it. Wasn&#39;t that easy :).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/8303267138654523198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/8303267138654523198' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8303267138654523198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8303267138654523198'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/say-hello-to-python-flask-server.html' title='Say Hello to Python Flask Server'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimva13XWtlvMW5yX563axI6edMWPT5i-Y34V1h3510PyitM3w9cz5bBwwLln4sRfAApJr97W-JzVWlJICzI6YursNgGgsXYCw8bwpNIm72r3ZZZGsUCxDLR7y_qV_4CjF9w6LGSZTZ3g/s72-c/flask2.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-8389829747882824722</id><published>2012-07-17T21:26:00.000+02:00</published><updated>2012-07-23T15:32:18.268+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache maven"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Maven Repositories and configuration</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;I have recently started writing about Apache Maven. What I wrote till now and what I am going to write in this post are quite basic stuff about Maven, the must know kind of stuff.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;So till now I have written about the &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/apache-maven-setting-up-what-is-apache.html&quot;&gt;Apache Maven - Setting Up&lt;/a&gt; and &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/configuring-maven-local-repository.html&quot;&gt;Configuring Maven Local Repository&lt;/a&gt; in my previous posts. What I am going to write now is about the different types of repositories in Maven. How you can configure them and some basic theoretical explanation on this. From my point of view, these are some of the basic stuff one should know before getting their hands dirty with Apache Maven.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;




What is Repository?&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;A repository in maven is like a library in real world. Its a place where all the build artifacts and dependencies of varying types are stored. According to Apache Maven documentation, there are strictly two types of repository, local and remote.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;




Different types of Maven Repositories&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;So, to start with, there are 3 types of Maven repositories:&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;h3&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;


Maven Local Repository. &lt;/span&gt;&lt;/h3&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Maven local 
repository is like a library we have at home with books which only 
concern us. Here in this case, it&#39;s a place on our own machine where all
 the dependency libraries&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;of your project&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;which
 have been downloaded using Maven are stored. These files usually 
include plugin jars. It acts as a cache of the remote downloads.&amp;nbsp;&lt;/span&gt; &lt;/span&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;


Maven Remote Repository.&lt;/span&gt;&lt;/h3&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Now, the Remote Repository is like
 a public libraries in real world. Anyone can access it. In Maven&#39;s 
case, it refers to any repository which one can access using variety of 
protocols like file:// or http://. Now these repositories can be at 
least two types:&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ul&gt;
&lt;li&gt;


&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;


&lt;b&gt;Third-Party public repository&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;

&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
These are truly remote repository which are completely public, set up by
 a third party to provide their artifacts for downloading like &lt;a href=&quot;http://repo.maven.apache.org/maven2/org/apache/maven/plugins/&quot;&gt;maven2 repo&lt;/a&gt;.Also, you can search for dependencies &lt;a href=&quot;http://search.maven.org/#browse&quot;&gt;here&lt;/a&gt;. You need an internet connection to connect to these repositories.&lt;br /&gt;
&lt;/span&gt;&lt;h4&gt;






&lt;/h4&gt;
&lt;/li&gt;
&lt;li&gt;


&lt;b&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Internal Repositories&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;

&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
These are internal repositories set up within an organization with 
limited access to their own network. It&#39;s used to share private 
artifacts between development teams and for releases. You need at least a network connection (not internet specifically until and unless the repository is at another geographical location) to connect to these repositories.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
How to use/configure repositories?&lt;/span&gt;&lt;/h2&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;h3&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Maven Local repositories.&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
In general, there is no need to do anything with the local repository on regular basis, until and unless you are required to free some disk space and you need to do a clean up or you can erase it provided you are willing to download everything from beginning.&lt;br /&gt;
For configuring the local repository see my old post &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/configuring-maven-local-repository.html&quot;&gt;Configuring Maven Local Repository&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;h3&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Maven Remote repository.&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;/span&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;


&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Central and Third Party Repository&lt;/b&gt;: &lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;You can use these to download dependencies and sometime upload provided you have permission to do so.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;Maven Central Repository&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Downloading a dependency in Maven is triggered as a result of missing dependency in the local repository. By default, Maven will look for dependency in the &lt;i&gt;central repository&lt;/i&gt; which is set to look in &lt;a href=&quot;http://repo1.maven.org/maven2/&quot;&gt;maven2 repo&lt;/a&gt;.&lt;br /&gt;The central repository is managed by Maven community. You can edit the &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;setting.xml&lt;/span&gt; for maven to globally use some other repository or you can edit in the project&#39;s &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;pom.xml&lt;/span&gt;, which will only work for that project.&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Now let&#39;s see how can we configure Maven (pom.xml) to look for a dependency in a remote repository (not the central repository).&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;tag&quot;&gt;&amp;lt;project&amp;gt; 
   .....
   &amp;lt;dependencies&amp;gt;
      &amp;lt;dependency&amp;gt;
         .....
      &amp;lt;/dependency&amp;gt;
      .....
   &amp;lt;dependencies&amp;gt;
   .....
   &amp;lt;repositories&amp;gt;
      &amp;lt;repository&amp;gt;
         &amp;lt;id&amp;gt;organization-name.lib1&amp;lt;/id&amp;gt;
         &amp;lt;url&amp;gt;http://download.organization-name.org/maven2/lib1&amp;lt;/url&amp;gt;
      &amp;lt;/repository&amp;gt;
      &amp;lt;repository&amp;gt;
         &amp;lt;id&amp;gt;organization-name.lib2&amp;lt;/id&amp;gt;
         &amp;lt;url&amp;gt;http://download.organization-name.org/maven2/lib2&amp;lt;/url&amp;gt;
      &amp;lt;/repository&amp;gt;
      .....
   &amp;lt;/repositories&amp;gt;
   .....
&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;span class=&quot;tag&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;


&lt;b&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Maven Internal Repository: &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Using the internal repository is quite simple. You just add the repository element and mention the location of internal repository. Something like this:&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;&amp;lt;project&amp;gt;
  ...
  &amp;lt;repositories&amp;gt;
    &amp;lt;repository&amp;gt;
      &amp;lt;id&amp;gt;my-internal-site&amp;lt;/id&amp;gt;
      &amp;lt;url&amp;gt;http://myserver/repo&amp;lt;/url&amp;gt;
    &amp;lt;/repository&amp;gt;
  &amp;lt;/repositories&amp;gt;
  ...
&amp;lt;/project&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;If your internal repository requires authentication, an id element can be used in the settings file to specify login information. &lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;&amp;lt;settings xmlns=&quot;http://maven.apache.org/SETTINGS/1.0.0&quot;
  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation=&quot;http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd&quot;&amp;gt;
  ...
  &amp;lt;servers&amp;gt;
    &amp;lt;server&amp;gt;
      &amp;lt;id&amp;gt;server001&amp;lt;/id&amp;gt;
      &amp;lt;username&amp;gt;my_login&amp;lt;/username&amp;gt;
      &amp;lt;password&amp;gt;my_password&amp;lt;/password&amp;gt;
      &amp;lt;privateKey&amp;gt;${user.home}/.ssh/id_dsa&amp;lt;/privateKey&amp;gt;
      &amp;lt;passphrase&amp;gt;some_passphrase&amp;lt;/passphrase&amp;gt;
      &amp;lt;filePermissions&amp;gt;664&amp;lt;/filePermissions&amp;gt;
      &amp;lt;directoryPermissions&amp;gt;775&amp;lt;/directoryPermissions&amp;gt;
      &amp;lt;configuration&amp;gt;&amp;lt;/configuration&amp;gt;
    &amp;lt;/server&amp;gt;
  &amp;lt;/servers&amp;gt;
  ...
&amp;lt;/settings&amp;gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;After studying a little a about Maven, in my opinion it&#39;s not that difficult. What do you think? Share your experience and issues related to maven.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/8389829747882824722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/8389829747882824722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8389829747882824722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8389829747882824722'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/maven-repositories-and-configuration.html' title='Maven Repositories and configuration'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><thr:total>0</thr:total><georss:featurename>Juan-les-Pins, 06160 Antibes, France</georss:featurename><georss:point>43.569246 7.10836</georss:point><georss:box>43.557741 7.0886190000000004 43.580751 7.128101</georss:box></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-7059652924817939736</id><published>2012-07-17T17:41:00.002+02:00</published><updated>2012-07-20T09:31:14.650+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Getting Ready with Python-PIP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
As I mentioned in my earlier post on Python in Eclipse [PyDev Plugin for Eclipse], that I am new to Python. I decided to post the issues I face during my Python experience. And for this post the motivation was &lt;a href=&quot;http://pypi.python.org/pypi/pip/&quot;&gt;python-pip&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;
&lt;h2 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;








What is Python-pip?&lt;/h2&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;i&gt;pip&lt;/i&gt; is a tool for installing and managing Python packages, like the ones which can be found under the Python Package Index. It&#39;s a replacement for a previous tool, &lt;i&gt;easy_install&lt;/i&gt;. More details can be found &lt;a href=&quot;http://pypi.python.org/pypi/pip/&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;








Dependencies of Python-pip&lt;/h2&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;li&gt;Python 2.7: If you don&#39;t have python installed then you can follow the instruction from &lt;a href=&quot;http://www.tutorialspoint.com/python/python_environment.htm&quot;&gt;Tutorial Point&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Python setup tools. &lt;br /&gt;In case if you don&#39;t have python-setup-tools then:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Download the RPM installer package for python-setup-tools. In my case I am on Linux Fedora 14 and downloaded the RPM package file from &lt;a href=&quot;http://rpm.pbone.net/index.php3/stat/4/idpl/15505606/dir/fedora_14/com/python-setuptools-0.6.14-3.fc14.noarch.rpm.html&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Once you have downloaded the python-setup-tools RPM package file. Install it with RPM command from shell:&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;rpm -i python-setuptools-0.6.14-3.fc14.noarch.rpm&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;And its done for python-setup-tools.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;








Installing Python-pip&lt;/h2&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
After getting all the dependencies, you are all set to install the python-pip package. The first thing to do now is to download the python-pip RPM installer for your linux version. As mentioned earlier that I am using Fedora 14, I downloaded the rpm package file for python-pip from &lt;a href=&quot;http://rpm.pbone.net/index.php3/stat/4/idpl/16661058/dir/fedora_14/com/python-pip-0.8.3-1.fc14.noarch.rpm.html&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;rpm -i python-pip-0.8.3-1.fc14.noarch.rpm&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
After this, the you are ready to use python-pip to install python packages.&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;








Using Python-pip&lt;/h2&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
The list of package that can be installed using python-pip can be found &lt;a href=&quot;http://pypi.python.org/pypi&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;h3 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;








To get packages: &lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
To get and install a package using python-pip, simply run following command:&amp;nbsp;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
$&lt;i&gt; pip install {package_name}&lt;package_name&gt;&lt;/package_name&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;or if that doesn&#39;t work then try:&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
$ &lt;i&gt;pip-python install &lt;/i&gt;&lt;i&gt;{package_name}&lt;/i&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJWMpCphHDpD82EYYTUjW3iGkxhXQTVFQYjzfYcpsVsggZjTJeUeSy4E03awngUBVVhAUYuXG6q3zXsoAdS0oMRw8xelywOTvqN9T3WoxiMedsmrUdIWUD7xEwzFrBCvpUTx487wlkUw/s1600/4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJWMpCphHDpD82EYYTUjW3iGkxhXQTVFQYjzfYcpsVsggZjTJeUeSy4E03awngUBVVhAUYuXG6q3zXsoAdS0oMRw8xelywOTvqN9T3WoxiMedsmrUdIWUD7xEwzFrBCvpUTx487wlkUw/s1600/4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;131&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJWMpCphHDpD82EYYTUjW3iGkxhXQTVFQYjzfYcpsVsggZjTJeUeSy4E03awngUBVVhAUYuXG6q3zXsoAdS0oMRw8xelywOTvqN9T3WoxiMedsmrUdIWUD7xEwzFrBCvpUTx487wlkUw/s400/4.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h3 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
To uninstall a package:&lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
To remove a python package, run following command:&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
$&lt;i&gt; pip-python uninstall &lt;/i&gt;&lt;i&gt;{package_name}&lt;/i&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;h3 style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;








To upgrade a package:&lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: left;&quot;&gt;
To remove a python package, run following command:&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
$&lt;i&gt; pip-python --upgrade &lt;/i&gt;&lt;i&gt;{package_name}&lt;/i&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;I hope this helps you. Feel free to share your experience/issues.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/7059652924817939736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/7059652924817939736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/7059652924817939736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/7059652924817939736'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/getting-ready-with-python-pip.html' title='Getting Ready with Python-PIP'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJWMpCphHDpD82EYYTUjW3iGkxhXQTVFQYjzfYcpsVsggZjTJeUeSy4E03awngUBVVhAUYuXG6q3zXsoAdS0oMRw8xelywOTvqN9T3WoxiMedsmrUdIWUD7xEwzFrBCvpUTx487wlkUw/s72-c/4.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-8136548085894634005</id><published>2012-07-15T00:38:00.001+02:00</published><updated>2012-07-23T15:19:13.843+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache maven"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Configuring Maven Local Repository</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;










&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;
What is Maven Local Repository?&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Maven local repository is the place on your machine where all the dependency libraries&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;of your project&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;which have been downloaded using Maven are stored. These files usually include plugin jars.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;











&lt;span style=&quot;background-color: white; font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Maven Configuration File:&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana,sans-serif;&quot;&gt;Maven local repository is defined in it&#39;s configuration file which is usually located under directory &lt;i&gt;&lt;m2_home&gt;\conf&lt;/m2_home&gt;&lt;/i&gt; with name &lt;i&gt;settings.xml&lt;/i&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;










&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;
Changing Default Maven Repository:&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;By default on windows 7, the maven local repository is set for &lt;i&gt;C:\Users\user_name\.m2\&lt;/i&gt;. You can change this by editing the &lt;i&gt;settings.xml&lt;/i&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;In the settings.xml look for the commented&amp;nbsp;&lt;b&gt;localRepository&lt;/b&gt;&amp;nbsp;definition which looks like:&lt;/span&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglbTpcTAHZ7PxGX6xcSZIwo_4D0y2H4YvXlgbwv68CfiXiBKr-S-DtfnTbGMAcfwyI5y1oaSoVTBRjVWkYAsTuo-IMxHa0EN95LffdeTBRAG6XLhdppiW_KTv-ygGHyVR8766WiAR3kw/s1600/4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; font-family: Verdana, sans-serif; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;76&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglbTpcTAHZ7PxGX6xcSZIwo_4D0y2H4YvXlgbwv68CfiXiBKr-S-DtfnTbGMAcfwyI5y1oaSoVTBRjVWkYAsTuo-IMxHa0EN95LffdeTBRAG6XLhdppiW_KTv-ygGHyVR8766WiAR3kw/s400/4.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Either un-comment it or add the following line:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;,Courier,monospace;&quot;&gt;&lt;localrepository&gt;D:/dev/maven_repo&lt;/localrepository&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Save the file and you are done. Now all the future dependencies will be downloaded to the path you set.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Refer to the &lt;/span&gt;&lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/maven-repositories-and-configuration.html&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Maven Repositories and Configuration&lt;/a&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; post to see what types of Maven repositories are there and how you can configure them. &lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/8136548085894634005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/8136548085894634005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8136548085894634005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8136548085894634005'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/configuring-maven-local-repository.html' title='Configuring Maven Local Repository'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglbTpcTAHZ7PxGX6xcSZIwo_4D0y2H4YvXlgbwv68CfiXiBKr-S-DtfnTbGMAcfwyI5y1oaSoVTBRjVWkYAsTuo-IMxHa0EN95LffdeTBRAG6XLhdppiW_KTv-ygGHyVR8766WiAR3kw/s72-c/4.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-4096236863738216280</id><published>2012-07-12T15:04:00.002+02:00</published><updated>2012-07-17T21:16:29.549+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Browser"/><category scheme="http://www.blogger.com/atom/ns#" term="Mozilla Firefox"/><title type='text'>Translate This for Firefox</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Like most of the people (internet users), I spend a lot of time surfing internet. And one of the important part of surfing internet is?? Any guesses&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;A WEB BROWSER (ta da).&lt;br /&gt;
&lt;br /&gt;
There are many browsers which are available out in the market like the ancient INTERNET EXPLORER, THE MOZILA FIREFOX and the latest GOOGLE CHROME. I started my internet surfing life with MS Internet Explorer and then moved to the mighty FOX and finally moved to CHROME and stayed to it for a long time because of many of its nice features but since last few days chrome started eating up a lot of memory and it makes my PC F**KING slow and to be honest, I hate that. Also, what&#39;s with the frequent crashes, and its making me loose the love I have for Chrome.&lt;br /&gt;
&lt;br /&gt;
But even with all this bulls**t, I stayed with chrome and that was because of one reason which I miss in Firefox or Internet Explorer and that is Chrome&#39;s Web Page Translation feature. Its very handy and lets you break the barrier of language. I tried to look for some Add-ons for Firefox which can provide this web page translation feature but all of them are not as good as Chrome&#39;s web page translation.&lt;br /&gt;
&lt;br /&gt;
Then I came across a Firefox addon which I find better than other available addon is &quot;Translate This&quot;. It&#39;s easy to install with no restart required to your Firefox and by using a simple shortcut you can get your page opened in the same tab or another tab translated to your language. At the end, it uses the Google Translate website.&lt;br /&gt;
&lt;br /&gt;
You can get this plugin from &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/translate-this/&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWlQ2NwlZKHqNxm8Ahe1zdigS2weuVr7ZxDINXGX7Guy8nlx9d733ZmTXanmcvzeD7WiDQcKG5hrL1ocO-E69uOoYLYMpCY2AwVXFB0acBVXCcE-lq3LoXFHO-HVJ2yZpzyaR2zQGieQ/s1600/Shot31.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;91&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWlQ2NwlZKHqNxm8Ahe1zdigS2weuVr7ZxDINXGX7Guy8nlx9d733ZmTXanmcvzeD7WiDQcKG5hrL1ocO-E69uOoYLYMpCY2AwVXFB0acBVXCcE-lq3LoXFHO-HVJ2yZpzyaR2zQGieQ/s400/Shot31.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Once it&#39;s downloaded and installed, you can see it&#39;s icon at the status bar of Firefox&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0obSXWCI9uvN7ZnXgtegQUkZnU3wB0niYIJz_7Mtu-_kc7Zo_axc97WBPCXiKgtlxbg0MRfI14wjxt23qeH1iqKbwSuA4dhmVrmTtZcrVGiN_14nii_L29ovvmQtootC4qxwRUP43gw/s1600/Shot30.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0obSXWCI9uvN7ZnXgtegQUkZnU3wB0niYIJz_7Mtu-_kc7Zo_axc97WBPCXiKgtlxbg0MRfI14wjxt23qeH1iqKbwSuA4dhmVrmTtZcrVGiN_14nii_L29ovvmQtootC4qxwRUP43gw/s400/Shot30.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Hold the SHIFT button and then right click on the &quot;Translate This&quot; icon on status bar and the following window will appear. Configure the addon based on your preference.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3RgpfRer1-tuxog9K51mOxP_oP-64aEx8-eVf556Zxsoe0mV3XktS1AfozU47kUmihtirD3NuCXlMR3StD5bsvfSxjgHUWnQJoUanXnSHWW43A0PRUI9EK1ZSQk87Aw46TibWPuWsnA/s1600/Shot32.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3RgpfRer1-tuxog9K51mOxP_oP-64aEx8-eVf556Zxsoe0mV3XktS1AfozU47kUmihtirD3NuCXlMR3StD5bsvfSxjgHUWnQJoUanXnSHWW43A0PRUI9EK1ZSQk87Aw46TibWPuWsnA/s400/Shot32.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Now everything is set and you just need to use the shortcut to translate a page. In my case I opened a french website &quot;lemonde.fr&quot; and after using the shortcut (CTRL+ ALT + t), I get this:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRri0OpzX9141IxFj8Th4P9xsF1RuYpht0kdUqZgudRSxYSHV7LEkUymEYhjevx88vSg2LWfBikNyiJUiPobeaHEcIvSwsy2d1d8POUp2v9qg3il8c-H2hjwdHisQiRInIXVuSC5YUNg/s1600/Shot33.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRri0OpzX9141IxFj8Th4P9xsF1RuYpht0kdUqZgudRSxYSHV7LEkUymEYhjevx88vSg2LWfBikNyiJUiPobeaHEcIvSwsy2d1d8POUp2v9qg3il8c-H2hjwdHisQiRInIXVuSC5YUNg/s400/Shot33.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/4096236863738216280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/4096236863738216280' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4096236863738216280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/4096236863738216280'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/translate-this-for-firefox.html' title='Translate This for Firefox'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWlQ2NwlZKHqNxm8Ahe1zdigS2weuVr7ZxDINXGX7Guy8nlx9d733ZmTXanmcvzeD7WiDQcKG5hrL1ocO-E69uOoYLYMpCY2AwVXFB0acBVXCcE-lq3LoXFHO-HVJ2yZpzyaR2zQGieQ/s72-c/Shot31.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-6377155079728786270</id><published>2012-07-06T13:49:00.000+02:00</published><updated>2012-07-17T21:23:06.355+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Virtual Box"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>VirtualBox Guest Additions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;







What is VirtualBox Guest Additions?&lt;/h2&gt;
&lt;div&gt;
VirtualBox Guest Additions are a package of programs and drivers which are installed on a guest OS running in VM. It helps to improve guest&#39;s performance and make integration much more seamless. There are many other features like Host/Guest Time sync, shared folders, Mouse pointer enhancements and many more.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Here, I will focus on how to install VirtualBox Guest Additions and how to configure Shared Folder for a Fedora virtual machine?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;







Installing&amp;nbsp;VirtualBox Guest Additions&lt;/h2&gt;
&lt;div&gt;
All the commands here are run with &lt;b&gt;root&lt;/b&gt;&amp;nbsp;privileges. Get the root privileges by logging in as &lt;b&gt;root &lt;/b&gt;or use &lt;b&gt;sudo &lt;/b&gt;in the beginning of the commands.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;







Getting required packages:&amp;nbsp;&lt;/h3&gt;
&lt;div&gt;
Once you have the Linux guest machine installed on virtual machine, install some additional packages required for VirtualBox Guest Additions like &lt;b&gt;dkms, kernel-devel, etc.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
To install all the packages required run the following command:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;yum install dkms binutils gcc make patch libgomp glibc-headers kernel-headers kernel-devel&lt;/span&gt;&lt;/blockquote&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;







Mount the VirtualBox Guest Additions&lt;/h3&gt;
&lt;div&gt;
Once the package installation is done and we have the packages required by Guest Additions, lets start installing the actual thing.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Mount the Guest Additions ISO from VM menu using Device -&amp;gt; Install Guest Addition.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH8QgLwFhyphenhyphenAdjP0T_I1jjXU9hHpNhDq65BDKR_-2KwD4gTlPNUBpVMdq_aFjyK7MMm8qzP3SEphih_T2LPUFXEzwjlLCw22h6aU_iaJN2-iH98xXVRz_FOI0VBsgYI1woAE8Bd-GeHAw/s1600/Shot21.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH8QgLwFhyphenhyphenAdjP0T_I1jjXU9hHpNhDq65BDKR_-2KwD4gTlPNUBpVMdq_aFjyK7MMm8qzP3SEphih_T2LPUFXEzwjlLCw22h6aU_iaJN2-iH98xXVRz_FOI0VBsgYI1woAE8Bd-GeHAw/s400/Shot21.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Make sure there is no other CD already mounted on your virtual machine, if there is one, then unmount it.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;







Install the&amp;nbsp;VirtualBox&amp;nbsp;Guest Additions&lt;/h3&gt;
&lt;div&gt;
Once the mount is done, go to the shell and open the mounted Guest Additions ISO.&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg16xHP_cH8CvLghr3yEh79iqhWqaMmO9GHkMhm8myhzVJWvR4FLp-kWnzYcucRyMllde181XsOPRvHKaY3zpyALsfw4mdGb3mN49AquQymf43livkuwO02Ab4yCieg8x10rXGqqay3-Q/s1600/Shot22.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;38&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg16xHP_cH8CvLghr3yEh79iqhWqaMmO9GHkMhm8myhzVJWvR4FLp-kWnzYcucRyMllde181XsOPRvHKaY3zpyALsfw4mdGb3mN49AquQymf43livkuwO02Ab4yCieg8x10rXGqqay3-Q/s640/Shot22.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can see different installer files, run the one which suits your requirement with following&amp;nbsp;command:&amp;nbsp;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sh VBoxLinuxAdditions.run&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
Restart the machine and we are almost there...&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;







Setting up the Shared Folder&lt;/h3&gt;
&lt;div&gt;
Shared Folder functionality is one of the features that comes with the VBox Guest Additions. Once VBox Addition is well installed, the next is to setup a shared folder with the host machine.&lt;/div&gt;
&lt;div&gt;
First you need to setup shared folder. From the VBox menu open: &amp;nbsp;Devices -&amp;gt; Shared Folder.&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzzm5lpaEIN6QWIGiiFStO1uTangb4s3FsciSQxh-hc3oCsRYB9QMBZzoKmdGTf2oK7o66F3hzPn1JJilxvoU_ISG_eMnzg9FAsUBzQmnC0PCCBBgdeqhyH6zAqU0yhMn20BOeCRNnNQ/s1600/Shot23.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzzm5lpaEIN6QWIGiiFStO1uTangb4s3FsciSQxh-hc3oCsRYB9QMBZzoKmdGTf2oK7o66F3hzPn1JJilxvoU_ISG_eMnzg9FAsUBzQmnC0PCCBBgdeqhyH6zAqU0yhMn20BOeCRNnNQ/s400/Shot23.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Then choose the folder from the host machine to share with your guest machine (in my case host is Windows and guest is Linux Fedora 9).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhImbqxNGtLXMmfdVbMbbehdrTX7g2tqusz2x2VyDPH8RtYfzmWpYbsi0a9zL09nHd6nJZTAlumpcv0svgYFmf_usoBI3UO-p_aNjyaCa0-GWK2CSq1owx5pz1nIdvGUl-q2wnceSuZ0Q/s1600/Shot25.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhImbqxNGtLXMmfdVbMbbehdrTX7g2tqusz2x2VyDPH8RtYfzmWpYbsi0a9zL09nHd6nJZTAlumpcv0svgYFmf_usoBI3UO-p_aNjyaCa0-GWK2CSq1owx5pz1nIdvGUl-q2wnceSuZ0Q/s320/Shot25.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
After this, you need to mount the shared folder on Linux guest machine.&lt;/div&gt;
&lt;div&gt;
Create a folder where you want to mount the shared folder by&amp;nbsp;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mkdir share-host&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
then mount the folder onto the shared folder &lt;b&gt;share-host&lt;/b&gt;.&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mount -t vboxsf &lt;shared folder=&quot;&quot; name=&quot;&quot;&gt; share-host&lt;/shared&gt;&lt;/span&gt;&lt;/blockquote&gt;
&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikVcb6AZVejewPHAls9pEGOv3cTXiorVJoODETCtRUvcj8vbHjKMLo6w_xmHjW69tQjNt4wd0fcDXUFUEZolGgw7CBcXWShKFzWI160UJKE79JGDAT07HczbPhg8Vzd1xQqGMvk5zs3g/s1600/Shot24.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;97&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikVcb6AZVejewPHAls9pEGOv3cTXiorVJoODETCtRUvcj8vbHjKMLo6w_xmHjW69tQjNt4wd0fcDXUFUEZolGgw7CBcXWShKFzWI160UJKE79JGDAT07HczbPhg8Vzd1xQqGMvk5zs3g/s640/Shot24.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To do an auto-mount on each boot put the command in the &lt;b&gt;/etc/rc.local&lt;/b&gt;&amp;nbsp;or whichever script is run at the end of boot processes.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/6377155079728786270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/6377155079728786270' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/6377155079728786270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/6377155079728786270'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/virtualbox-guest-additions.html' title='VirtualBox Guest Additions'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH8QgLwFhyphenhyphenAdjP0T_I1jjXU9hHpNhDq65BDKR_-2KwD4gTlPNUBpVMdq_aFjyK7MMm8qzP3SEphih_T2LPUFXEzwjlLCw22h6aU_iaJN2-iH98xXVRz_FOI0VBsgYI1woAE8Bd-GeHAw/s72-c/Shot21.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-3647639074103156747</id><published>2012-07-01T23:44:00.001+02:00</published><updated>2012-07-23T15:17:59.422+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache maven"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Apache Maven - Setting up</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;










&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
What is Apache Maven?&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;In simple words Maven is a build automation tool for Java projects.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;There are many things which can be written for maven but to get more theoretical&amp;nbsp;details &amp;nbsp;visit &lt;a href=&quot;http://en.wikipedia.org/wiki/Apache_Maven&quot;&gt;Apache Maven-Wikipedia&lt;/a&gt; page or can refer to the &lt;a href=&quot;http://maven.apache.org/&quot;&gt;official Apache Maven&lt;/a&gt; website.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;



&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Setting-up Apache Maven:&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;










&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Setup - Windows:&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;First download the latest version maven form &lt;a href=&quot;http://maven.apache.org/download.html&quot;&gt;here&lt;/a&gt;. For this tutorial, I have downloaded &lt;a href=&quot;http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.zip&quot;&gt;maven-3.0.4&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Unzip the downloaded&amp;nbsp;&lt;i&gt;apache-maven-3.0.4-bin.zip&lt;/i&gt;. In my case, unzipped it in &lt;i&gt;C:\dev\maven3.0.4&lt;/i&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Set a new environment variable &lt;/span&gt;&lt;i style=&quot;background-color: white;&quot;&gt;M2_HOME&lt;/i&gt;&lt;span style=&quot;background-color: white;&quot;&gt; pointing to the directory where maven is installed or &amp;nbsp;unzipped. In case if you don&#39;t know how to set an environment variable in windows, follow the &lt;/span&gt;&lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/06/setting-up-windows-environment-variable.html&quot; style=&quot;background-color: white;&quot;&gt;link&lt;/a&gt;&lt;span style=&quot;background-color: white;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Set another environment variable &lt;i&gt;M2&lt;/i&gt;&amp;nbsp;with value &lt;i&gt;%M2_HOME%\bin&lt;/i&gt;. In the same way create/update the &lt;i&gt;PATH &lt;/i&gt;variable with value &lt;i&gt;%M2%&lt;/i&gt; so that Maven can be accessed from command line.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Check if the &lt;i&gt;PATH &lt;/i&gt;variable also has the value of JAVA_HOME pointing to the installed jdk.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Open command prompt (&lt;i&gt;WinKey + R&lt;/i&gt; and type &lt;i&gt;cmd&lt;/i&gt;) and execute the command &lt;i&gt;mvn --version&lt;/i&gt; to see if its installed well.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;










&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Setup - Eclipse:&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;For this there is a plugin for Eclipse called M2E which can be used to launch Maven builds from within Eclipse and other stuff which maven can do.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Follow the steps given below to get M2E on eclipse:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Open Eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;From the eclipse menu list, go to &lt;i&gt;help -&amp;gt; Install New Software...&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Get maven from the update site &quot;&lt;i&gt;maven - http://download.eclipse.org/technology/m2e/releases&lt;/i&gt;&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Add the maven update site and get the list of plugins provided by it.&lt;br /&gt;&lt;i&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlcrFkZymUNCdOpE5FCNfFK3o-rH8YNncFbICKyN7BLtPT8EwkbQt93EgEiIC-1EDZKPoKO2xJZDtrgIZYE4E5JkOi3tOCJG8b1vsSQJxDsVvoaReETGiIp2NHFnhWMj7r_QcHsq2yaA/s1600/Shot15.jpg&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-style: normal; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlcrFkZymUNCdOpE5FCNfFK3o-rH8YNncFbICKyN7BLtPT8EwkbQt93EgEiIC-1EDZKPoKO2xJZDtrgIZYE4E5JkOi3tOCJG8b1vsSQJxDsVvoaReETGiIp2NHFnhWMj7r_QcHsq2yaA/s400/Shot15.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/i&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Select the plugin &lt;i&gt;Maven Integration for Eclipse &lt;/i&gt;and press next and next.&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Pm35GTh4vvR1r0DTwOKqc6oEAKekHS53rFxW0T4Tf6JbuYFJmkeWRCvH-ef4fe7vcg3CafqOGVKMmpPrHF4f9VmYH77BmipECwEUZlsJpB6Z98bAB5-lUHGPepdeoQ09tjO-5b0WDQ/s1600/Shot16.jpg&quot; imageanchor=&quot;1&quot; style=&quot;background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;341&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Pm35GTh4vvR1r0DTwOKqc6oEAKekHS53rFxW0T4Tf6JbuYFJmkeWRCvH-ef4fe7vcg3CafqOGVKMmpPrHF4f9VmYH77BmipECwEUZlsJpB6Z98bAB5-lUHGPepdeoQ09tjO-5b0WDQ/s400/Shot16.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Read and accept the terms of license agreement and press finish.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkLVomYEJq8IYapCYGplR3AZl5Lg5nDI_-06TG3wr0kwcU-6QHwABOZ5EURe64JrrhaxpTZYuM10UgTMryRci5i_4kJ60jEm3umh_MPUVhUki6vRZ0pr3g5gZ8pLTqklqUDf_g0nNiQ/s1600/Shot17.jpg&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvkLVomYEJq8IYapCYGplR3AZl5Lg5nDI_-06TG3wr0kwcU-6QHwABOZ5EURe64JrrhaxpTZYuM10UgTMryRci5i_4kJ60jEm3umh_MPUVhUki6vRZ0pr3g5gZ8pLTqklqUDf_g0nNiQ/s400/Shot17.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn2-wdhWyA12a3fW8_kWh1M-37l1A4PPu5ZOS-6WxkSotNG9FYzahggoktitwDPyWYh3TtpTYRwzQscWs0ejOm6KYoU2k3YNSBc5C7VCf7RfQ2jaZfaSEv_jp6_53qa2x-O5nnbD7tnA/s1600/Shot18.jpg&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;302&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn2-wdhWyA12a3fW8_kWh1M-37l1A4PPu5ZOS-6WxkSotNG9FYzahggoktitwDPyWYh3TtpTYRwzQscWs0ejOm6KYoU2k3YNSBc5C7VCf7RfQ2jaZfaSEv_jp6_53qa2x-O5nnbD7tnA/s400/Shot18.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Restart eclipse.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;More on Maven:&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/configuring-maven-local-repository.html&quot;&gt;Configuring Maven Local Repository.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Refer to the &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/maven-repositories-and-configuration.html&quot;&gt;Maven Repositories and Configuration&lt;/a&gt; post to see what types of Maven repositories are there and how you can configure them. &lt;/li&gt;
&lt;/ul&gt;
Feel free to share your experience/issues.&amp;nbsp; &lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/3647639074103156747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/3647639074103156747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/3647639074103156747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/3647639074103156747'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/07/apache-maven-setting-up-what-is-apache.html' title='Apache Maven - Setting up'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlcrFkZymUNCdOpE5FCNfFK3o-rH8YNncFbICKyN7BLtPT8EwkbQt93EgEiIC-1EDZKPoKO2xJZDtrgIZYE4E5JkOi3tOCJG8b1vsSQJxDsVvoaReETGiIp2NHFnhWMj7r_QcHsq2yaA/s72-c/Shot15.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-6931976821610340861</id><published>2012-06-28T23:50:00.000+02:00</published><updated>2012-07-17T21:24:07.510+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Windows Environment Variable</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;







Setting Up Windows Environment Variable&lt;/h2&gt;
&lt;div&gt;
Following steps are for Windows 7.&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Open system properties either by using shortcut &lt;i&gt;WinKey + Pause&lt;/i&gt; or right click on &lt;i&gt;My Computer -&amp;gt; Properties&lt;/i&gt;.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpW4TGVKBai21aBvXty6O0rcwGy0l8kMKDUx4xHgN_PN_F-ZCZb7xmRr5Ac_GD1V9tzjBIzXCpfIqU9unCnfBX75wYIholzkrIEqP8uGgdL3wY67E6wOw8eklEC6W3PTw6a_gqt3gfNw/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;235&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpW4TGVKBai21aBvXty6O0rcwGy0l8kMKDUx4xHgN_PN_F-ZCZb7xmRr5Ac_GD1V9tzjBIzXCpfIqU9unCnfBX75wYIholzkrIEqP8uGgdL3wY67E6wOw8eklEC6W3PTw6a_gqt3gfNw/s320/1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;i&gt;Advanced System Setting&lt;/i&gt;.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Go to the &lt;i&gt;Advanced&amp;nbsp;&lt;/i&gt;&amp;nbsp;tab.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg684ixplF8T0E2FBAHpNNxVqB8NgFpKxNV4kw6dRTMcDblVVVMRMAZggip-M7nZEErAOxf-zCa3vKvk5CP_C1opb4HvVwVJNxy934pFBqul8NEnjrbfUhdPe9-dNu3Cz_6gBeVVv30Ng/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg684ixplF8T0E2FBAHpNNxVqB8NgFpKxNV4kw6dRTMcDblVVVMRMAZggip-M7nZEErAOxf-zCa3vKvk5CP_C1opb4HvVwVJNxy934pFBqul8NEnjrbfUhdPe9-dNu3Cz_6gBeVVv30Ng/s320/2.jpg&quot; width=&quot;287&quot; /&gt;&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Open Environment Variable. by using the button at the bottom right with the same name.&lt;/li&gt;
&lt;li&gt;Now depending on your requirement either add a new variable or use the existing one.&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8AFh3LCGX15N8gWi3n0dL4g_Jop8_-1jK_Tl4uSsVFOEvROFp4TtLaOwGl6qwJk_xFBQ_t5gmgq7xOsqiiBwN1FDkxYXLo6Iy7qbBIxTEBRo_dmHmLsh7f6YFsh12eO-pFBa_UL7Lvw/s1600/3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8AFh3LCGX15N8gWi3n0dL4g_Jop8_-1jK_Tl4uSsVFOEvROFp4TtLaOwGl6qwJk_xFBQ_t5gmgq7xOsqiiBwN1FDkxYXLo6Iy7qbBIxTEBRo_dmHmLsh7f6YFsh12eO-pFBa_UL7Lvw/s320/3.jpg&quot; width=&quot;292&quot; /&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
And that&#39;s done.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Cheers,&lt;/div&gt;
&lt;div&gt;
fLiCkEr.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/6931976821610340861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/6931976821610340861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/6931976821610340861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/6931976821610340861'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/06/setting-up-windows-environment-variable.html' title='Windows Environment Variable'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpW4TGVKBai21aBvXty6O0rcwGy0l8kMKDUx4xHgN_PN_F-ZCZb7xmRr5Ac_GD1V9tzjBIzXCpfIqU9unCnfBX75wYIholzkrIEqP8uGgdL3wY67E6wOw8eklEC6W3PTw6a_gqt3gfNw/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-2083405407321638480</id><published>2012-06-26T14:52:00.000+02:00</published><updated>2012-07-17T21:25:25.771+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Python in Eclipse [PyDev plugin for Eclipse]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;While learning python, one question I had was, which python IDE to use? There are many options but being a Java developer I wanted to have something like Eclipse and it turned out that there is a plugin for eclipse which can be used for Python development with the auto-suggest, run, debug and many other features.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The plugin for eclipse is called PyDev and it&#39;s very easy to configure.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Note:&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;I work on a windows machine, so all the instructions are around a windows machine.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Get Python:&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Download the recent version of python from &lt;/span&gt;&lt;a href=&quot;http://www.python.org/download/&quot; style=&quot;background-color: white;&quot;&gt;python.org&lt;/a&gt;&lt;span style=&quot;background-color: white;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;Run the setup file (python-&lt;x.y.z&gt;.msc) and follow the install insrtuction.&amp;nbsp;&lt;/x.y.z&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;Once the installation is complete, set the windows&amp;nbsp;environment&amp;nbsp;variable to point to the python installation folder.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;Right click on &quot;My Computer&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;Select &quot;properties&quot;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;Click on the button &quot;Environment Variables&quot; under the tab &quot;Advanced&quot;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia7SmYwGH1KaUdqcOMtdlX51AOHdbCbAfdDQwEFA6ayqgeJoicZfSvIL3UrpOE3IgAzLPRrhPk3MrtVbHyhQV8_pugcvImdqDJkhKnpdhfXgHgMUPFah25RMmDbYsD7n5S3SGSSB7xuA/s1600/Shot1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia7SmYwGH1KaUdqcOMtdlX51AOHdbCbAfdDQwEFA6ayqgeJoicZfSvIL3UrpOE3IgAzLPRrhPk3MrtVbHyhQV8_pugcvImdqDJkhKnpdhfXgHgMUPFah25RMmDbYsD7n5S3SGSSB7xuA/s320/Shot1.jpg&quot; width=&quot;275&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Add the path of python installation to the PATH variable, in my case its &quot;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;D:\Python27\&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMQSvhiORKvLp3LfIVjYye9T_Ccai8oVi0Fy5_PpgvqBc89cf7OqRTMAWHfumjbQSILFdSGg3NO5i3cjX8CuiMo3K4MdDIasE6mrr9mq8EMIcV6tF6nBnqs6lLx6qvHxWmIivgFVLmYw/s1600/Shot3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMQSvhiORKvLp3LfIVjYye9T_Ccai8oVi0Fy5_PpgvqBc89cf7OqRTMAWHfumjbQSILFdSGg3NO5i3cjX8CuiMo3K4MdDIasE6mrr9mq8EMIcV6tF6nBnqs6lLx6qvHxWmIivgFVLmYw/s320/Shot3.jpg&quot; width=&quot;286&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn72jjc2pRVy7L4tjO1tIyrZaM_Twx9hpJ146YmD_v8JiFrImdAKTjRWhecE48lFn12wAFRkotti0ggoVV7tp9ynjx-cpjwbBBIrqrZPd1rLzkC4-7VtwzEXQ7_cZEsFATWrMo0UGZsQ/s1600/Shot4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;134&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn72jjc2pRVy7L4tjO1tIyrZaM_Twx9hpJ146YmD_v8JiFrImdAKTjRWhecE48lFn12wAFRkotti0ggoVV7tp9ynjx-cpjwbBBIrqrZPd1rLzkC4-7VtwzEXQ7_cZEsFATWrMo0UGZsQ/s320/Shot4.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Go to dos command line and type the command &quot;&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;python&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&quot;, if it takes you to the python command line, then it works.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk4e8k3DmA-vW9Tm9d3z24N9XtB7TRU-o27MMVeI-8AdBFM5gBcc2MneQHZNbQ_80l37D-QIHRDaO9aEYWM_wsVohkJh006N1OSq9PhPyFcAtItBbhF3Bm-2VbGU63np_xVOgBe0Wrfw/s1600/Shot0.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk4e8k3DmA-vW9Tm9d3z24N9XtB7TRU-o27MMVeI-8AdBFM5gBcc2MneQHZNbQ_80l37D-QIHRDaO9aEYWM_wsVohkJh006N1OSq9PhPyFcAtItBbhF3Bm-2VbGU63np_xVOgBe0Wrfw/s320/Shot0.jpg&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Get Eclipse and install the PyDev plugin.&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Download a version of Eclipse IDE from &lt;a href=&quot;http://www.eclipse.org/downloads/&quot;&gt;here&lt;/a&gt;&amp;nbsp;do the setup you need for other dev.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now from Eclipse menu go to &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Help -&amp;gt; Install New Software&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Add the PyDev update site &lt;a href=&quot;http://pydev.org/updates&quot;&gt;http://pydev.org/updates&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxbBa-5_ARXy_N48GeGqTyMPszx1BsnwtZsVAi9kdbyBhyvNILSyb3ml_eJ61JoP0od3JSghSJyjycg5PUiWHg2rTVYeQShoq0xnZKut8cQCbIZhXMZ5QlkvREo-mP0IaOC-58lkVcAQ/s1600/Shot7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxbBa-5_ARXy_N48GeGqTyMPszx1BsnwtZsVAi9kdbyBhyvNILSyb3ml_eJ61JoP0od3JSghSJyjycg5PUiWHg2rTVYeQShoq0xnZKut8cQCbIZhXMZ5QlkvREo-mP0IaOC-58lkVcAQ/s320/Shot7.jpg&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Install the plugin.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Configuration of Eclipse.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;From eclipse menu, open &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Window -&amp;gt; Preferences&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Look for &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;PyDev -&amp;gt; Interepreter - Python&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_bgOuXK8zaiYIeeNZ_O-6sGeRjtBfz8Vjn9GAuE2ZCmYpFJ-NlhGdJXbPw4hyphenhyphenejEYlBEkUAHx1sd0YKPk3xmQcf8-sG_fFAVLrpF8ArFT8wKmOMwvhGKEs1xXJlONNsKAEHtmE_RXRQ/s1600/Shot8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;259&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_bgOuXK8zaiYIeeNZ_O-6sGeRjtBfz8Vjn9GAuE2ZCmYpFJ-NlhGdJXbPw4hyphenhyphenejEYlBEkUAHx1sd0YKPk3xmQcf8-sG_fFAVLrpF8ArFT8wKmOMwvhGKEs1xXJlONNsKAEHtmE_RXRQ/s320/Shot8.jpg&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Click on new and add the &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;i&gt;python.exe&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For windows, it was under the python installation i.e. &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;d:\python27&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For linux, find it by running the command &lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;gt;which python&lt;/span&gt;&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWjm_9U9bD1Fo0EIaVOwEBOebwLVcjHNr7abB89I7b7F-Lz5DbGu2N5KOcVqo8OlILhdDvudHnl81sH-PPd8XXQ88WT4vltnplECWaFTD5YuZS2nXZclcNfP2PgDw5ZP1HnqcN9dzNfw/s1600/Shot9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;261&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWjm_9U9bD1Fo0EIaVOwEBOebwLVcjHNr7abB89I7b7F-Lz5DbGu2N5KOcVqo8OlILhdDvudHnl81sH-PPd8XXQ88WT4vltnplECWaFTD5YuZS2nXZclcNfP2PgDw5ZP1HnqcN9dzNfw/s320/Shot9.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC5Ob7AJhrupk6JNfQrjc0nIgWwuzL3ApCVjCWUyI7JxMyHAlXX9DziQ9elUmNNLWK-Ka3FegzZd12tgOyvRDjtDwhH7CNJVoS6yILv4icKBw3ZwV_df9EF5VBFMSi5Ss0ykoIf5vynw/s1600/Shot11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC5Ob7AJhrupk6JNfQrjc0nIgWwuzL3ApCVjCWUyI7JxMyHAlXX9DziQ9elUmNNLWK-Ka3FegzZd12tgOyvRDjtDwhH7CNJVoS6yILv4icKBw3ZwV_df9EF5VBFMSi5Ss0ykoIf5vynw/s320/Shot11.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSAdLNOH304pXI0jCuhdel7S1CrbIssigvDkSjol_zTlE4rfz3wvdUq72XHBKREg33HYvo8t15R1hjUuE1ohaV-s4I4xJrrE75duR9SdSbS91ah2GZjZ7z3liYZuSigA-33e5Jee6mOQ/s1600/Shot12.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;254&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSAdLNOH304pXI0jCuhdel7S1CrbIssigvDkSjol_zTlE4rfz3wvdUq72XHBKREg33HYvo8t15R1hjUuE1ohaV-s4I4xJrrE75duR9SdSbS91ah2GZjZ7z3liYZuSigA-33e5Jee6mOQ/s320/Shot12.jpg&quot; width=&quot;320&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;And all done, you are good to go... Play with python in eclipse.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Also check out my &lt;a href=&quot;http://flicker-technical.blogspot.fr/2012/07/getting-ready-with-python-pip.html&quot;&gt;new post&lt;/a&gt; on Python-pip tool.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/2083405407321638480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/2083405407321638480' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/2083405407321638480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/2083405407321638480'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/06/python-in-eclipse-pydev-plugin-for.html' title='Python in Eclipse [PyDev plugin for Eclipse]'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia7SmYwGH1KaUdqcOMtdlX51AOHdbCbAfdDQwEFA6ayqgeJoicZfSvIL3UrpOE3IgAzLPRrhPk3MrtVbHyhQV8_pugcvImdqDJkhKnpdhfXgHgMUPFah25RMmDbYsD7n5S3SGSSB7xuA/s72-c/Shot1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-5980692464698189293</id><published>2012-06-21T22:48:00.001+02:00</published><updated>2012-07-17T21:25:38.221+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Django"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Django - Overview</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;border-bottom: solid #4F81BD 1.0pt; border: none; mso-border-bottom-themecolor: accent1; mso-element: para-border-div; padding: 0cm 0cm 4.0pt 0cm;&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;




&lt;b&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;DJango &lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoTitle&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;




&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Overview&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;




&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;What is Django&amp;nbsp;?&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin: 7.2pt 0cm 12pt;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Django is high-level Python Web framework that was
released under BSD license in 2005. It emphasizes re-usability, rapid
development and DRY (don’t repeat yourself) principle. There are a lot of great
web development frameworks available, like Ruby on rails and Codeigniter for
PHP that follow same principles so we could say that Django is just another
fast development web framework but with different flavor.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt; With the help of
Django, a developer can build and maintain high-quality Web applications with
minimal effort.&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-position: initial initial; background-repeat: initial initial; line-height: 13.5pt; margin: 7.2pt 0cm 12pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;




&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Why use Django?&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; text-indent: -18pt;&quot;&gt;Django is fast and stable.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white; text-indent: -18pt;&quot;&gt;It’s very scalable.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white; text-indent: -18pt;&quot;&gt;Let’s you work outside the scope of the framework as
required.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white; text-indent: -18pt;&quot;&gt;Fast
development and code readability.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white; text-indent: -18pt;&quot;&gt;Very well documented.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white; text-indent: -18pt;&quot;&gt;And the list goes on about Django’s pros over other
web development frameworks.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;




&lt;span lang=&quot;EN-US&quot; style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Required
Knowledge&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo2; text-indent: -18.0pt;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: Verdana, sans-serif; text-indent: -18pt;&quot;&gt;Should have the basic understanding of procedural and
object-oriented programming: control structures (e.g. if, while, for), data
structures (lists, hashes/dictionaries), variables, classes, objects, etc.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;At least hands on experience with programming in Python
and understanding of how libraries work. If you don’t know python, click &lt;/span&gt;&lt;a href=&quot;http://www.tutorialspoint.com/python/index.htm&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/5980692464698189293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/5980692464698189293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/5980692464698189293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/5980692464698189293'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2012/06/django-overview.html' title='Django - Overview'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-43307342340991394.post-8857923516780526100</id><published>2009-08-07T14:03:00.001+02:00</published><updated>2012-07-17T21:20:46.770+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Prolog"/><title type='text'>Implementation of Java Interface to Prolog (JPL)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Following post is the outcome of the time I spent trying to connect a module written in Prolog with another module written in Java.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Steps for implementing Java Prolog Interface - JPL&lt;/strong&gt;         &lt;br /&gt;
&lt;hr size=&quot;1&quot; style=&quot;color: white;&quot; /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;      &lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;I was trying to interface Java and Prolog using JPL(Java Interface to Prolog). I faced many problem and finally got it working. So I am posting this reply so that if someone else is trying to do this may be it will help him/her.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;b&gt;The following implementation is for windows XP.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;A string (&quot;an english sentence&quot;) was read from user on an HTML page (form) as input using a Java servlet which then passesthe input to a Prolog module which parses the sentence and returns the output.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Setup:&lt;/b&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;To start with, first we hav to install few things:&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;1. Install  &lt;a href=&quot;http://www.swi-prolog.org/download/stable&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;SWI-Prolog Version 5.6.64&lt;/a&gt; . It contains the JPL package so, no need to download it separately.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;2. I used &lt;a href=&quot;http://www.eclipse.org/downloads/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Eclipse IDE for Java EE Developers&lt;/a&gt;  for my implementation.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;3. Look for &quot;&lt;b&gt;jpl.dll&lt;/b&gt;&quot; file in the bin directory of prolog, in my case it was &quot;&lt;b&gt;c:\pl\bin&lt;/b&gt;&quot;. copy-paste it to &quot;&lt;b&gt;c:\windows\system32&lt;/b&gt;&quot; or set the windows path variable to the &quot;&lt;b&gt;c:\pl\bin&lt;/b&gt;&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;4. Now look for the &quot;&lt;b&gt;jpl.jar&lt;/b&gt;&quot; in the prolog installation folder. Most probably it&#39;ll be in &quot;&lt;b&gt;lib&lt;/b&gt;&quot; folder of prolog installation. For me it was &quot;&lt;b&gt;c:\pl\lib&lt;/b&gt;&quot; and add it to the java library when creating the webproject in eclipse.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;So , now we are ready to call a prolog code from java.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;I am giving a simple example in which we call a prolog code from java and get the output.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;import jpl.Atom;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;import jpl.Query;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;import jpl.Term;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;import jpl.Variable;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;public class J2pl1{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; public static void main(String[] args) {&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;// creating a query to consult the prolog program&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;if (!Query.hasSolution(&quot;consult(&#39;D:/PROLOG/learn/familytree.pl&#39;).&quot;)) {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;System.out.println(&quot;Consult failed&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;} else {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;test3a(&quot;ria&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;static void test3a(String sent) {&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;// a variable which will get the output.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Variable X=new Variable(&quot;X&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;//creating query object to make a query to prolog code.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Query q3 =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;new Query(&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&quot;parent&quot;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;new Term[] {X,new Atom(sent)&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;System.out.println(&quot;Parent of &quot;+sent+&quot; is &quot;+q3.oneSolution().get(&quot;X&quot;));//get the value stored in X&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;The prolog code which was called was:&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;% parent(C,P) is true when C has a parent called P&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(charles1, james1).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(elizabeth, james1).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(charles2, charles1).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(catherine, charles1).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(james2, charles1).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(sophia, elizabeth).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(george1, sophia).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;parent(catherine,ria).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;So this was a simple implementation for JPL.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Now what we tried to do here was to pass an English sentence to Prolog and get the output. In my case, the output was a XML file.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;Now in the above java code the arguments of the predicate was passed as atom.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;Query q3 =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;new Query(&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&quot;parent&quot;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;new Term[] {&lt;/span&gt;&lt;b style=&quot;background-color: white;&quot;&gt;X,new Atom(sent)&lt;/b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;So, in case if your prolog code starts with accepting a list as argument in your predicate the above will not work and I think there is no method in JPL to pass a list to prolog.&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;But no need to worry as it can be done by a simple&amp;nbsp;tweak.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;So what we can do? We&#39;ll pass the sentence as an atom. So, no need to change the java code.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;What we have to do is to include one more predicate which accepts an atom as input, convertes it into chars or code and then calls ur main fucntion using the builtin predicates &lt;/span&gt;&lt;b style=&quot;background-color: white;&quot;&gt;&quot;atom_chars(?Atom,?Charlist)&quot; or &quot;atom_codes(?Atom,?String)&quot;&lt;/b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;. To get more details,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://gollem.science.uva.nl/SWI-Prolog/Manual/manipatom.html&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white;&quot; target=&quot;_blank&quot;&gt;Check this out&lt;/a&gt;&lt;span style=&quot;background-color: white;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;So, it&#39;ll be like as if a predicate is called &quot;mycode(String)&quot; to start ur prolog execution. Add following:&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;start(Atom):-atom_codes(Atom,String),mycode(String).&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;And it&#39;s done.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;I hope it&#39;s clear enough.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;Enjoy,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;fLiCkEr&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span id=&quot;intelliTxt&quot;&gt;   &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://flicker-technical.blogspot.com/feeds/8857923516780526100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/43307342340991394/8857923516780526100' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8857923516780526100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/43307342340991394/posts/default/8857923516780526100'/><link rel='alternate' type='text/html' href='http://flicker-technical.blogspot.com/2009/08/implementation-of-java-interface-to.html' title='Implementation of Java Interface to Prolog (JPL)'/><author><name>fLiCkEr</name><uri>http://www.blogger.com/profile/14969522068085787241</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='21' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxi35oT8dyGHL6c-yfVxYXSnrJzMtZYOPGVyFzsBrcbVtwWGp1KgS-tWAaGyVKPOi0JUk4JW_ILqFHPvJrYemSBfDY5MiaGVIwDhV47rLI-KJOYsTKakdx7mUWLXL5K58/s220/IMG_007.jpg'/></author><thr:total>2</thr:total></entry></feed>