First step - install ImageMagick :
For installation download file from for your OS and simple run it.
(for Unbuntu OS run command: apt-get install imagemagick --fix-missing)
Second step - install jMagick :
For installation download files from and follow by instructions
(for Unbuntu OS run command: sudo apt-get install jmagick --fix-missing)
Make sure that jmagick binary files (jmagick*.so or jmagick*.dll for windows os) are accessible for jvm. This files mast be present in /usr/lib for linux os or in java_home/bin folders. If this files are absent simple copy it from jmagick installation package.
среда, 13 октября 2010 г.
четверг, 30 сентября 2010 г.
среда, 23 июня 2010 г.
Java Parameters
For debugging many project use next too helpful java parameters:
-verbose:class - Display information about each class loaded.
-Dproperty=value - Set a system property value.
for example: -Djava.endorsed.dirs=C:/jboss-5.1.0.GA/lib/endorsed/ sets endorsed libon JBoss startup
For more information see http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html
-verbose:class - Display information about each class loaded.
-Dproperty=value - Set a system property value.
for example: -Djava.endorsed.dirs=C:/jboss-5.1.0.GA/lib/endorsed/ sets endorsed libon JBoss startup
For more information see http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html
четверг, 24 декабря 2009 г.
Spring and file uploading
There are many guide how to upload file in spring framework. For example you can use ref .
But when you use it remember:
But when you use it remember:
- Add multipartResolver bean to spring.xml file!
- Add fileupload.jar and commons-io.jar from http://commons.apache.org/downloads/download_fileupload.cgi
- You can use Yahoo uploader or something that. If you do it add parameter name to request.
For example in yahoo widget use:
uploader.upload(fileID, url, "post", {}, "file"); - Remember! SWF can not support cookies. That meens you droped current session. For resolve it simple add ;jsessionid=valuees to upload url.
Example:
var url="/reports/uploadFile;jsessionid=F34C5040A029C61658E8CC7A73841CCC" - Don't forget return response 200 from controller.
Example:
1 @RequestMapping(value = "/reports/uploadFile", method = RequestMethod.POST)
2 public void uploadFile(@RequestParam("file") MultipartFile file, HttpServletResponse response) throws IOException {
3
4 reportStorageService.saveFile(file.getName(), file.getContentType(), file.getSize(), file.getBytes());
5
6 response.setStatus(HttpServletResponse.SC_OK);
7
8 }
пятница, 18 декабря 2009 г.
Debuging Hadoop applications in Eclipse (Linux & Windows)
- Install Java 1.6.x, ssh and download Haddop. For windows need also install Cygwin.
- Then configure environments for running haddop in standeloune mode. See Hadoop quick start guide for how to do it.
- Go to ${hadoop}/bin folder and create hdebug file using existing hadoop file (simple copy and rename).
- In the hdebug file find strings:
1 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR"and add new:
2 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE"
3 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
4 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.id.str=$HADOOP_IDENT_STRING"
5 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}"
6 if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
7 HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"
8 fi
1 HADOOP_OPTS="$HADOOP_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y"you can get something like:
1 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR"
2 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.file=$HADOOP_LOGFILE"
3 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.home.dir=$HADOOP_HOME"
4 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.id.str=$HADOOP_IDENT_STRING"
5 HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.root.logger=${HADOOP_ROOT_LOGGER:-INFO,console}"
6 HADOOP_OPTS="$HADOOP_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y"
7 if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
8 HADOOP_OPTS="$HADOOP_OPTS -Djava.library.path=$JAVA_LIBRARY_PATH"
9 fi - Run your application using hdebug file instead of hadoop. Example start command:
1 ${hadoop}/bin/hdebug jar your-app.jarYou can see log:
- Open Eclipse. Go to menu Run->Debug configurations... and create new Remoute Java Application configuration.
On Connect tab: choice your project, select Standart connection type, set host (local), set Port: 8001.
On Source tab: Add your project.
- Starts debug, and enjoy :)
среда, 30 сентября 2009 г.
среда, 11 марта 2009 г.
Eclipse 3.4.*. Управление плагинами.
В новой версии эклипса измененно управление плагинами. Теперь их нельзя дизейблить используя Help->Software Updates.
Для включения и отключения плагинов используйте окно Window->Preferences закладка General->Startup and Shutdown
Для включения и отключения плагинов используйте окно Window->Preferences закладка General->Startup and Shutdown
Подписаться на:
Сообщения (Atom)

