• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DoInBAckgroundWorker doesn't work

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,

I have created a small BAckGroundWorker for testing a pdf file. Everything works fine until the code catches the path for the pdf file. I really don't know why it isn't working -.-

 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly does "not working" mean?
 
Tom Hat
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave Tolls wrote:What exactly does "not working" mean?



Oh sry... I think the path is not correctly processed to start the pdf check test. I put a system.out before and between and to check where could be the error. The second system.out doesn't give me an output...

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
doInBackground unfortunately isn't helpful when an exception is thrown from it. Try wrapping the entire method body in a try-catch block:
Note: you should remove this when you've found the cause of the problem. I wouldn't put code like this in production if not needed.
 
Tom Hat
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:doInBackground unfortunately isn't helpful when an exception is thrown from it. Try wrapping the entire method body in a try-catch block:
Note: you should remove this when you've found the cause of the problem. I wouldn't put code like this in production if not needed.




aaaah thank you. Now I get Unsupported major.minor version 52.0

I find out what it is and try to fix the problem. Thank you for your help!
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unsupported version usually means you are using a newer version of javac to compile the code than the version of java you execute the code with.
You can often cure that by moving the Java® installation path to the beginning of your System PATH.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic