O'Reilly Forums: Chapter 11 Minimusiccmdline - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 11 Minimusiccmdline

#1 User is offline   mrjoshiemoto 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 08-February 12

Posted 08 February 2012 - 10:50 AM

Hey there, I've been trying to get this code to work
Spoiler

I first typed it up on my own and finally copied and pasted the code and I get "Don't forget the instrument and note args"
If I'm not mistaken I DO have less than 2 arguments in my code thank you very much.
It wont let my type in the string for the instrument or note . Can anyone help me?
0

#2 User is offline   rh55 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 07-February 12

Posted 08 February 2012 - 11:46 AM

What are you typing at the command line to run the program?

>I DO have less than 2 arguments

If you have less than 2 arguments you will get that message. You need to supply 2 arguments.

eg:

F:\>java MiniMiniMusicCmdLine 102 30
0

#3 User is offline   mrjoshiemoto 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 08-February 12

Posted 08 February 2012 - 05:45 PM

View Postrh55, on 08 February 2012 - 11:46 AM, said:

What are you typing at the command line to run the program?

>I DO have less than 2 arguments

If you have less than 2 arguments you will get that message. You need to supply 2 arguments.

eg:

F:\>java MiniMiniMusicCmdLine 102 30


It wont LET me put anything. I run it and it just gives that line nothing else. There is no, MiniMiniMusicCmdLine. Just
"Don't forget the instrument and note args"
But what I mean is that I do have 2 arguments in my CODE not in the command line. Sorry for not clarifying.
0

#4 User is offline   rh55 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 07-February 12

Posted 09 February 2012 - 12:14 AM

View Postmrjoshiemoto, on 08 February 2012 - 05:45 PM, said:

It wont LET me put anything. I run it and ....


Yes, but how do you run it?
0

#5 User is offline   Roger Dorfield 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 12-February 12

Posted 12 February 2012 - 01:57 AM

Add this code to the end of the try block...
After player.start();

Thread.sleep(2000);
player.close();
System.exit(0);
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users