• Post Reply Bookmark Topic Watch Topic
  • New Topic

newbie javax.sound.midi/head first java question  RSS feed

 
Barbara Norway
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm working through the Head First Java book and I am getting this error when compiling chapter 11's Ready Bake Code (miniMiniMusicApp.java):
Package javax.sound.midi not found in import
Does this always indicate a problem with the classpath setting? I am doing the exercises on a Sun box (Solaris 8). Has this not been a problem for me before because this is the first time I am importing a javax package?
Thanks in advance for your time.
 
don cline
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
farmkitty,
Package javax.sound.midi is part of the standard Java API's for java 1.3 and up. It is not part of java 1.2. The first thing I would check is the version of java I am running. This can be done with the command
java -version
If that doesn't work, I would check that the import statement is formatted correctly, something like:
import javax.sound.midi.*;
Also be sure you are running J2SE (standard edition).
Good Luck
Don
 
Barbara Norway
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Don. I work with a number of systems (OS X, linux, windows servers) and thought I was at JDK 1.4 because I've installed it so many times. But, I checked and it was JDKv1.2.2 on this server. Thanks again for answering such a newbie question, you saved me a lot of time.
Barbara (a.k.a. farmkitty)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!