aspose file tools*
The moose likes Beginning Java and the fly likes Variable value is not considered while executing a command. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Variable value is not considered while executing a command." Watch "Variable value is not considered while executing a command." New topic
Author

Variable value is not considered while executing a command.

sudheer raj shetty
Greenhorn

Joined: Sep 02, 2009
Posts: 16
In the below program am using the image path as input parameters for function imagecompare. In this function am trying to compare two images using compare command.

But when i try to execute this code, it is considering "sourceone" itself as parameter, actually i want its value (i,e) "c:\\autobanner\\GoldImage\\mybanner1.jpg"; to be considered. How to resolve this issue?

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Shouldn't be


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
sudheer raj shetty
Greenhorn

Joined: Sep 02, 2009
Posts: 16
Thanks Maneesh..!!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

Actually, because there will be problems when either path has a space in them, it should be this:
Or, alternatively, use a String array:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Oops.
Forgot about white spaces.
Thanks Rob.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Variable value is not considered while executing a command.