Skip to content

couchapp for Java language views


cloudant hosted account (sign up at!/solutions/cloud), couchapp (installation instructions at


This is a simple example couchapp that uploads a java language view. The is part of the couchjava project.

To specify that the language of the view is java, there is a file "language" containing the term "java" in the top level directory.

As with all couchapps, the view is defined in the view folder. In this case, there is a view call "title" with a map and reduces classes defined:


There is also an example of a SearhView for use with Cloudant's search application: views/index/ views/index/

Any jar files that you want to upload should be place in the _attachments directory (note -- you can place multiple jar files there). If you want to work with the deafult javaviews.jar file created by the couchjava project, create a symoblic link to couchjava/dist/javaviews.jar

mkdir _attachments
ln -s ../../dist/javaviews.jar _attachments/javaviews.jar

If you wish to specify a default database for this view, modify the .couchapprc file:

cat > .couchapprc {"env":{"default":{"db":"http://<user>:<pass>@<user><your_db>"}}} ^C that last line means hit *CTRL-C***

the you can install the view with:

couchapp push

Otherwise, you can specify the database in the couchapp call:

couchapp push http://<user>:<pass>@<user><your_db>


Cloudant folks are usually hanging out in IRC. Freenode, channel #cloudant. We may also be reached:

Something went wrong with that request. Please try again.