File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

working with Image classes

 
Thomas Goorden
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was working on a class to automatically resize jpg's (for use in a servlet). It all works great in a command line program (Win2K) , but it doesn't seem to do work when I use it in a servlet and run it on a linux machine (apache; tomcat) within a servlet.

The method code:

I import : com.sun.image.codec.jpeg.*; java.awt.image.BufferedImage; java.awt.Graphics2D; java.awt.Image;
Appearantly the Imaging toolkit uses native methodes, which might be the problem. Is there a way around this? Or maybe you know a better way to tackle the resizing problem?
Thanks,
Thomas
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It seems that you need to include sun.awt.Motif package in your jar file or at least place it on your server.
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic