aspose file tools*
The moose likes Beginning Java and the fly likes ArrayIndexOutOfBoundsException in Chat#main method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ArrayIndexOutOfBoundsException in Chat#main method" Watch "ArrayIndexOutOfBoundsException in Chat#main method" New topic
Author

ArrayIndexOutOfBoundsException in Chat#main method

Paulo Cassiano
Greenhorn

Joined: Sep 02, 2006
Posts: 10
i'm trying to follow the book's chapter 2 chat sample, using eclipse indigo and activemq-5.5.0, but i cannot run the sample app...

my console (inside eclipse) shows:


Factory, Topic, or username missing
java.lang.ArrayIndexOutOfBoundsException: 0
at ch02.chat.RunChat.main(RunChat.java:x)

how can i setup my eclipse properly, in order to follow book's samples?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38881
    
  23
Please don’t add new questions to an old thread.

Where are you suffering that Exception? What are you passing as the command-line arguments? Where are you using args[0]?
Paulo Cassiano
Greenhorn

Joined: Sep 02, 2006
Posts: 10
i'm trying to follow o'reilly java message service's book (2nd edition)...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ArrayIndexOutOfBoundsException in Chat#main method