| ||||||||||
Include jmusic the folder and jmusic/inst in your classpath. Mark Guzdial |
Here's what my classpaths looks like: |
What do your imports look like, Tom? Maybe they're not right? Mark Guzdial |
Sounds like your classpath isn't set up right – see the discussion with Tom above and the screenshots of what it should look like. Mark Guzdial |
JMC.CS4 – see page 28 in the course notes, the bullet list in the middle of the page. Mark Guzdial |
Check your imports. If you don't have the right imports, Java doesn't know where to look for those symbols. (If you want to type in any of the jMusic stuff in the interactions pane, you'll need to do the imports there, too, besides in your program.) Mark Guzdial |
Yup, those are right! Mark Guzdial |
Open the SongNode, SongPhrase, SongPart, and Song classes in the java-source directory and click compile all. That should fix the problem. Student24 |
Exactly as REMOVEDnny says! You're getting bit by the 1.5 vs. Java 1.4.2 bug. Just recompile and you'll be a happy camper! Mark Guzdial |
When it says something like this: "java.lang.UnsupportedClassVersionError: SongNode (Unsupported major.minor version 49.0)" it means that "SongNode.java" has to be recompiled. Open it, and click "Compile All." What file is it complaining about? Mark Guzdial |
What it's saying is that you have an error on line 21. "NullPointerException" typically means that you're using a variable that doesn't have a value yet–it's still "null". Mark Guzdial |
I updated the homework statement. If you use SongNode alone, you use showFromMeOn. If you use Song, you use show. Mark Guzdial |
Are you getting some kind of error? If you look at the code for repeat, you 'll see that it does NOT do an insertAfter–it simply slams in the copies. It'd be pretty easy to create a repeatAfter method that did insertAfter–I'd give extra credit for creating that method then using that. If you just use setNext, then you simply lose the rest of the list – it disappears. Think about using insertAfter instead of setNext–that will save the reference to the rest of the list, too. Mark Guzdial |
Yes but you wouldn't get the extra credit Student24 |
A phrase contains a sequence of notes defined in an array. Nodes are chained together to create a linked list. Each Node contains exactly one phrase. A SongPart contains the first node in a chain and an instrument to play the chain with. A Song contains 1 or 2 songParts. Student24 |