File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

priortiy

 
abalfazl hossein
Ranch Hand
Posts: 635
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


When I run this code , this massage shows :

compile:
run:
Exception in thread "main" java.lang.IllegalArgumentException
at java.lang.Thread.setPriority(Thread.java:1015)
at priority.Main.main(Main.java:23)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)


How can I fix it?I use netbeans and windows
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The priority value needs to fall into the range [Thread.MIN_PRIORITY, Thread.MAX_PRIORITY] - you're using a value that does not.
 
abalfazl hossein
Ranch Hand
Posts: 635
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right! I mistake!zero isn't
 
Srikkanth Mohanasundaram
Ranch Hand
Posts: 240
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this resolve the issue?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic