• 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

newbie javax.sound.midi/head first java question

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic