Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I solve this error?

 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using JDT (Java DICOM Toolkit) "http://wiki.trispark.com/dashboard.action" for reading a DICOM file using the following code, but getting an error in the following:



How can I solve this problem?





Thanks.
 
Rob Spoor
Sheriff
Pie
Posts: 20751
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the error? Is it a compiler error or an exception?
 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:What's the error? Is it a compiler error or an exception?


Thanks for your reply.

Actually, it is a "Compiler error" asking me to do something like creating a local variable "fin", although I have it.

So, yes, a compiler error not an exception.

Thanks.
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You declare fin inside a try block, so it's out of scope before you use it. You need to declare it outside the try, though you can set the value inside the try block as you do now. Note that fin will be null after the try-catch if there is a FileNotFoundException. You might want to do something about that as well.
 
Abder-Rahman Ali
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg Charles wrote:You declare fin inside a try block, so it's out of scope before you use it. You need to declare it outside the try, though you can set the value inside the try block as you do now. Note that fin will be null after the try-catch if there is a FileNotFoundException. You might want to do something about that as well.


Yes, exactly correct GReg, I didn't notice.

And, now, getting as output: Unable to find key file 'jdt.key' in classpath

I think this is due that the JARS I'm using are commercial and need a key for the evaluation version of the product.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic