I've installed the new sdk and have already fixed any problems with deprecated methods. I'm getting another error though. In BlueJ, it says my class uses unchecked or unsafe operations. When I compile from the command prompt:
C:\>java d:\programming\java programs\jtunes2\MainFrame.java
Exception in thread "main" java.lang.NoClassDefFoundError: d:\programming\java
I get the same error on one other class as well, but everything else compiles fine.
Here's the other class that won't compile. It's simple, and I can't see what problems it would have.
Code:import java.util.Vector; import java.io.Serializable; public class AlbumMix implements Serializable { private String name; private Vector songs = new Vector(); private double totalSize = 0.0; public AlbumMix(String n) { name = n; } public AlbumMix() { name = "New Mix"; } public void addSong(MP3 song) { songs.add(song); } public Vector getList() { return songs; } /* * Returns number of songs in album */ public int getSize() { return songs.size(); } public String toString() { return name; } public void addToTotalSize(double size) { totalSize += size; } public void subtractFromTotalSize(double size) { totalSize -= size; } /* * Returns the size of the album in Kbytes * Album size determined by all the file sizes that * make up this album */ public double getSizeKB() { return totalSize; } }


Reply With Quote


Bookmarks