To start, you need to install the following prerequisites:
* JDK 1.6 or higher
* Ant 1.7 or higher
* If you want to build the Mahout source, Maven 2.0.9 or 2.0.10
You also need this article's sample code (Download), which includes a copy of Mahout and its dependencies. Follow these steps to install the sample code:
1. unzip sample.zip
2. cd apache-mahout-examples
3. ant install
Step 3 downloads the necessary Wikipedia files and compiles the code. The Wikipedia file used is approximately 2.5 gigabytes, so download times will depend on your bandwidth. It also uncompresses the files. You need to have 10 GB of free space.
Occasionally, there may be an error.
You can try commenting the lines of download of 2.5 GB of wiki pages and download them separately with the link given. Then ant install will give you build failed. Do not worry. A folder named Wikipedia would have been created in the apache-mahout-examples directory. If not, create one. Place the downloaded content of wikipedia file there. Do ant install again. Now those files already downloaded will just uncompress and it will take about half an hour. Depending upon your system configuration, this may vary. The result will be installation of mahout.
Monday, September 6, 2010
Sunday, September 5, 2010
Installing ant
First, Please make sure you have the Latest jdk. Currently java1.6 with update 21 would be required.
Now download ant from http://ant.apache.org/
The binary edition of Ant is shipped with 3 different compression formats:
1. .zip - Recommended compression format for Windows, can also be used on other platforms. Supported by many programs and some operating systems natively.
2. .tar.gz - Uses the tar program to gather files together, and gzip to compress and uncompress.
3. .tar.bz2 - Uses the tar program to gather files together, and bzip2 to compress and uncompress..
Choose the format that is best supported for your platform.
Next step would be to extract the folder and place in the directory.
Set environmental variables JAVA_HOME to your Java environment, ANT_HOME to the directory you uncompressed Ant to, and add ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows) to your PATH.
Setting up environment Variables.
From the Start Menu, select Start > Settings > Control Panel.
Double-click System to open the System Properties window.
On the Advanced tab, select environmental variables .
Modify each environmental or system variable.
Set the PATH environment variable to include the directory where you installed the Ant bin directory:
1. Find the PATH environment variable in the list. If PATH is not listed, click on New under the System variables section.
2. Type %ANT_HOME%\bin;%JAVA_HOME%\bin;
Important: If there are other variables listed, create a new variable separated by a semicolon. Ensure there are no spaces before or after the semicolon.
Set the ANT_HOME environment variable to the directory where you installed Ant:
1. Click on New under the System variables section.
2. Type ANT_HOME in the variable name field.
3. Type the location where you extracted your ant in the variable value field.
Set the JAVA_HOME environment variable to the directory where you installed the J2SE SDK application:
1. Click on New under the System variables section.
2. Type JAVA_HOME in the variable name field.
3. Type C:\j2sdk1.4.2_13 in the variable value field.
Done!
You've just installed ant. To check, open command prompt and type ant -version.
If it shows you the version of ant you installed, everything went on fine.
Congrats.
Now download ant from http://ant.apache.org/
The binary edition of Ant is shipped with 3 different compression formats:
1. .zip - Recommended compression format for Windows, can also be used on other platforms. Supported by many programs and some operating systems natively.
2. .tar.gz - Uses the tar program to gather files together, and gzip to compress and uncompress.
3. .tar.bz2 - Uses the tar program to gather files together, and bzip2 to compress and uncompress..
Choose the format that is best supported for your platform.
Next step would be to extract the folder and place in the directory.
Set environmental variables JAVA_HOME to your Java environment, ANT_HOME to the directory you uncompressed Ant to, and add ${ANT_HOME}/bin (Unix) or %ANT_HOME%/bin (Windows) to your PATH.
Setting up environment Variables.
From the Start Menu, select Start > Settings > Control Panel.
Double-click System to open the System Properties window.
On the Advanced tab, select environmental variables .
Modify each environmental or system variable.
Set the PATH environment variable to include the directory where you installed the Ant bin directory:
1. Find the PATH environment variable in the list. If PATH is not listed, click on New under the System variables section.
2. Type %ANT_HOME%\bin;%JAVA_HOME%\bin;
Important: If there are other variables listed, create a new variable separated by a semicolon. Ensure there are no spaces before or after the semicolon.
Set the ANT_HOME environment variable to the directory where you installed Ant:
1. Click on New under the System variables section.
2. Type ANT_HOME in the variable name field.
3. Type the location where you extracted your ant in the variable value field.
Set the JAVA_HOME environment variable to the directory where you installed the J2SE SDK application:
1. Click on New under the System variables section.
2. Type JAVA_HOME in the variable name field.
3. Type C:\j2sdk1.4.2_13 in the variable value field.
Done!
You've just installed ant. To check, open command prompt and type ant -version.
If it shows you the version of ant you installed, everything went on fine.
Congrats.
Friday, August 27, 2010
Using Subeclipse Behind Proxy Server
I loaded the subeclipse plug-in in my eclipse. But it just wouldn't work. I realized this was due to the proxy server I was using. I had configured the proxy settings in Eclipse but surprisingly subeclipse doesn't take proxy from eclipse. Servers in the windows file have to be configured to do the same. Here's how...
- Open the servers file in your favorite text editor. For this, in RUN type %APPDATA%\Subversion\servers and press Enter. A dialog box appears asking you via which program you would like to open it. Click on any text editor.
- Scroll to the end of the file. You'll see a Global Section. In the Global section of the file uncomment http-proxy-host and http-proxy-port (and user name and password in case you are using it) and give the required values. That is where the subeclipse will take the settings to connect to the internet from.
- Now go back to the SVN Repository view in Eclipse and refresh the repository.
Friday, July 9, 2010
Changing From one Drive to another in Command Line
A quick post to document what came as a little surprising to me.
While using the Command line in Windows Vista Professional, I wanted to change my working directory from C to D. Any amateur would say just type D;\ but guess what, that didn't work for me.
A little googling gave me the solution. I needed to use /d flag.
y:\>cd /d x:\Folder1\Folder2
x:\Folder1\Folder2>
Good Luck!
While using the Command line in Windows Vista Professional, I wanted to change my working directory from C to D. Any amateur would say just type D;\ but guess what, that didn't work for me.
A little googling gave me the solution. I needed to use /d flag.
y:\>cd /d x:\Folder1\Folder2
x:\Folder1\Folder2>
Good Luck!
Thursday, July 8, 2010
App Engine Deploy Error 409: Solution
When deployment of an application through App Engine fails and you try to deploy it again, an error is encountered:
Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=jayati3644=1&
409 Conflict
Another transaction by user jayati07 is already in progress for this app and major version. That user can undo the transaction with appcfg.py’s “rollback” command.
See the deployment console for more details
Documentation given is not much help. But it's easy to do. Here's how...
Execute the appcfg.cmd(for Windows) appcfg.sh(for Linux) in the bin directory of your Appengine installation. These instructions are for the Java SDK. For a python one, you may use appcfg.py. Appengine is usually installed in the plugins directory of eclipse(if you are using Eclipse) or wherever you downloaded it.
APPENGINEDIR/bin/appcfg.sh rollback /YOURAPP/war
You will get output similar to the one in this screenshot. Now you are free to deploy as you want.
Unable to update app: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=jayati3644=1&
409 Conflict
Another transaction by user jayati07 is already in progress for this app and major version. That user can undo the transaction with appcfg.py’s “rollback” command.
See the deployment console for more details
Documentation given is not much help. But it's easy to do. Here's how...
Execute the appcfg.cmd(for Windows) appcfg.sh(for Linux) in the bin directory of your Appengine installation. These instructions are for the Java SDK. For a python one, you may use appcfg.py. Appengine is usually installed in the plugins directory of eclipse(if you are using Eclipse) or wherever you downloaded it.
APPENGINEDIR/bin/appcfg.sh rollback /YOURAPP/war
You will get output similar to the one in this screenshot. Now you are free to deploy as you want.
Sunday, June 13, 2010
Google Web Tool Kit on NetBeans IDE
http://code.google.com/webtoolkit/overview.html
Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. For Starting a project using GWT, you need the following:
1. You will need the Java SDK version 1.5 or later. If necessary, download and install the Java SE Development Kit (JDK) for your platform. Mac users, see Apple's Java developer site to download and install the latest version of the Java Developer Kit available for Mac OS X.
I had a Netbeans 6.8 installed so used it. This post is dedicated to using GWT on Netbeans.
2. Apache Ant is also necessary to run command line arguments. If you don't already have it, install Apache Ant.
Download the Google Web Tool Kit Software Development Kit (gwt-2.0.3.zip) and unzip it to gwt-2.0.3 in your working folder. GWT-SDK does not have an installer application. All the files you need to run and use the SDK are located in the extracted directory.
For using GWT on Netbeans, you have to download and install a plugin for netbeans : gwt4nb from https://gwt4nb.dev.java.net/. Optionally, you can download and install it directly from IDE's plugin Manager:
Chooze Tools>Plugins.
In the Dialog Box click on the available plugins tab and type gwt in the search box on the top-right side. The plugin would appear. Click on the check Box beside it. And click on the install button. The plugin gets installed. Click on close.
The next step is to Create the Source Structure of a GWT Application:
The source structure of the application you create must include the GWT JAR files, the GWT module project configuration file, as well as some standard artifacts such as the Java entry point. Since you are using an IDE, you should not need to manually create all these files. Instead, let a wizard do the work for you. Specifically, the final panel of the New Web Application wizard is very useful in the context of creating a GWT application.
1.Choose File > New Project (Ctrl-Shift-N; ⌘-Shift-N on Mac). Under Categories, select Web (or Java Web). Under Projects, select Web Application. Click Next.
2.In step 2, Name and Location, type HelloGWT in Project Name. You can also specify the location of the project by typing in a path on your computer in Project Location field. Click Next.
3.In the Server and Settings step, select any server that you have registered in the IDE. If you included Tomcat or GlassFish when installing the IDE, they display in the drop-down list.
To register a server in the IDE, click the Add button to open a wizard that guides you through the registration process.
4.Specify the Java version you are using. Click Next.
Note: This tutorial supports GWT version 1.5 and higher. GWT 1.4 does not support Java EE 5, so if you are using this version you must also set the Java EE Version to 1.4. Otherwise, for example, Java EE 5 annotations will cause compilation errors.
5.In the Frameworks step, select GWT.
When you select the GWT framework, the following fields become available:
1) GWT Installation Folder: Specify the path to the folder where you downloaded the Google Web Toolkit at the start of this tutorial. If an incorrect path is specified, a red error message displays and you are not able to complete the wizard.
2) GWT Module: Specifies the name and location of the project module that the IDE will generate when you complete the wizard. The project module is an XML file that configures a GWT application. For example, it is used to specify the class instantiated by GWT when the module is loaded. Note that this field in the wizard also determines the main package of the application. By default, the main package is org.yournamehere and the project module is Main. For purposes of this tutorial, leave the default entries unchanged.
Click Finish. The IDE creates the HelloGWT project. The project contains all of your sources, libraries, and project metadata, such as the project's Ant build script. The project opens in the IDE. You can view its file structure in the Files window and its logical structure in the Projects window.
In the Projects window, right-click the project node and choose Run. The application is built and a web archive (WAR) is created. It is deployed to the server. The server starts, if it is not running already. Your computer's default browser opens and the welcome page of the application is displayed.
Click the button and the text below it disappears.
We have got GWT working on Netbeans and have seen how a sample project can be deployed. Now you are free to play with this fantastic tool!
So Long...
Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. For Starting a project using GWT, you need the following:
1. You will need the Java SDK version 1.5 or later. If necessary, download and install the Java SE Development Kit (JDK) for your platform. Mac users, see Apple's Java developer site to download and install the latest version of the Java Developer Kit available for Mac OS X.
I had a Netbeans 6.8 installed so used it. This post is dedicated to using GWT on Netbeans.
2. Apache Ant is also necessary to run command line arguments. If you don't already have it, install Apache Ant.
Download the Google Web Tool Kit Software Development Kit (gwt-2.0.3.zip) and unzip it to gwt-2.0.3 in your working folder. GWT-SDK does not have an installer application. All the files you need to run and use the SDK are located in the extracted directory.
For using GWT on Netbeans, you have to download and install a plugin for netbeans : gwt4nb from https://gwt4nb.dev.java.net/. Optionally, you can download and install it directly from IDE's plugin Manager:
Chooze Tools>Plugins.
In the Dialog Box click on the available plugins tab and type gwt in the search box on the top-right side. The plugin would appear. Click on the check Box beside it. And click on the install button. The plugin gets installed. Click on close.
The next step is to Create the Source Structure of a GWT Application:
The source structure of the application you create must include the GWT JAR files, the GWT module project configuration file, as well as some standard artifacts such as the Java entry point. Since you are using an IDE, you should not need to manually create all these files. Instead, let a wizard do the work for you. Specifically, the final panel of the New Web Application wizard is very useful in the context of creating a GWT application.
1.Choose File > New Project (Ctrl-Shift-N; ⌘-Shift-N on Mac). Under Categories, select Web (or Java Web). Under Projects, select Web Application. Click Next.
2.In step 2, Name and Location, type HelloGWT in Project Name. You can also specify the location of the project by typing in a path on your computer in Project Location field. Click Next.
3.In the Server and Settings step, select any server that you have registered in the IDE. If you included Tomcat or GlassFish when installing the IDE, they display in the drop-down list.
To register a server in the IDE, click the Add button to open a wizard that guides you through the registration process.
4.Specify the Java version you are using. Click Next.
Note: This tutorial supports GWT version 1.5 and higher. GWT 1.4 does not support Java EE 5, so if you are using this version you must also set the Java EE Version to 1.4. Otherwise, for example, Java EE 5 annotations will cause compilation errors.
5.In the Frameworks step, select GWT.
When you select the GWT framework, the following fields become available:
1) GWT Installation Folder: Specify the path to the folder where you downloaded the Google Web Toolkit at the start of this tutorial. If an incorrect path is specified, a red error message displays and you are not able to complete the wizard.
2) GWT Module: Specifies the name and location of the project module that the IDE will generate when you complete the wizard. The project module is an XML file that configures a GWT application. For example, it is used to specify the class instantiated by GWT when the module is loaded. Note that this field in the wizard also determines the main package of the application. By default, the main package is org.yournamehere and the project module is Main. For purposes of this tutorial, leave the default entries unchanged.
Click Finish. The IDE creates the HelloGWT project. The project contains all of your sources, libraries, and project metadata, such as the project's Ant build script. The project opens in the IDE. You can view its file structure in the Files window and its logical structure in the Projects window.
In the Projects window, right-click the project node and choose Run. The application is built and a web archive (WAR) is created. It is deployed to the server. The server starts, if it is not running already. Your computer's default browser opens and the welcome page of the application is displayed.
Click the button and the text below it disappears.
We have got GWT working on Netbeans and have seen how a sample project can be deployed. Now you are free to play with this fantastic tool!
So Long...
Wednesday, June 9, 2010
Link 'em All!
I'd like to dedicate this post to something that had me bothered some time back.
I personally am on quite a number of social netoworking sites: Facebook, Twitter, LinkedIn, Orkut and more recently gmail has come up with a new feature called as Buzz!! There are a lot more but this post ain't about the over exploitation of the social needs of a social animal. It's an irony that the connectedness on-line is leaving rest everything disconnected, but I'd just save it for another discussion.
Managing all of accounts singlehandedly and maintaining a presence on all can drive one nuts. A great way of making this happen without losing much time and energy is "Linking 'em All".
Let's start by linking Twitter and Facebook. There are several applications using which one can do the same. The most recommended(by me ;)) is Selective Tweets. Through this one can update one's facebook status with one's latest tweet. The advantage of this application is you can control which tweet gets updated as your facebook status.
1) Click to open Selective Tweets.
2) Click Allow.
3) Enter your twitter username in the Text box.
4) Click save.
P.S. : If you're currently using the Twitter application or other application to update your status, remember to remove or disable it so that it doesn't keep updating with all your tweets.
I personally am on quite a number of social netoworking sites: Facebook, Twitter, LinkedIn, Orkut and more recently gmail has come up with a new feature called as Buzz!! There are a lot more but this post ain't about the over exploitation of the social needs of a social animal. It's an irony that the connectedness on-line is leaving rest everything disconnected, but I'd just save it for another discussion.
Managing all of accounts singlehandedly and maintaining a presence on all can drive one nuts. A great way of making this happen without losing much time and energy is "Linking 'em All".
Let's start by linking Twitter and Facebook. There are several applications using which one can do the same. The most recommended(by me ;)) is Selective Tweets. Through this one can update one's facebook status with one's latest tweet. The advantage of this application is you can control which tweet gets updated as your facebook status.
1) Click to open Selective Tweets.
2) Click Allow.
3) Enter your twitter username in the Text box.
4) Click save.
P.S. : If you're currently using the Twitter application or other application to update your status, remember to remove or disable it so that it doesn't keep updating with all your tweets.
Subscribe to:
Posts (Atom)