It appears that the Linux machine either does not have java VM installed
(unlikely) or the CF installation is not properly configured to use it.

I just tested that code snippet on my Linux box and it works!

======================================
Stop spam on your domain, Anti-spam solutions
http://www.clickdoug.com/mailfilter.cfm
For hosting solutions http://www.clickdoug.com
======================================
If you woke up breathing, congratulations! You have been given another chance!

  ----- Original Message -----
  From: Les Mizzell
  To: CF-Talk
  Sent: Saturday, March 13, 2004 5:53 PM
  Subject: Wordaround for Linux...

  This works perfectly on an IIS server running CF5:

  1. <cfset myImage = ExpandPath("gallpics/#CJ_PHOTO#")>
  2.    <cfset imgFile =
  createObject("java","javax.swing.ImageIcon").init(myImage)>
  3.    <cfset imgFile.getImage()>
  4.    <cfset imgWidth = imgFile.getIconWidth()>

  Basically, it gets the dimensions of an image and then picks the page
  layout based on the image size...

  However, the site using this just got moved to a Linux server running CF
  MX, and line #2 is breaking everything.

  "An exception occurred when instantiating a java object."

  I obviously know crap about Java objects on Linux! Anybody know of a
  workaround that will run on Linux?

  This is actually quite interesting - I'm getting a Linux crash course
  right now - it's *way* more picky about file naming conventions and
  stuff than Windoze - which isn't a bad thing - it's forcing me to be
  more precise about everything...

  --
  Les Mizzell
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to