I am new to database handling. I am creating a karaoke player in Java, where I need to have a database. I don't have to get material (sound and text file) directly from hard disk, but I want a database (SQL Server, Oracle, etc) to store them, so that I can have an object, which can refer/point to them. Is it possible??
public class SoundPlayer extends JComponent
{
String windowName;
Clip clip;Clip clip2;
public static void main(String[] args) throws UnsupportedAudioFileException,
IOException, LineUnavailableException, InterruptedException
{
JFrame f=new JFrame("hh");
f.getContentPane();
f.pack();
f.setVisible(true);
}
private String String;
public SoundPlayer(File file) throws UnsupportedAudioFileException, IOException, LineUnavailableException, InterruptedException {
AudioInputStream ain=AudioSystem.getAudioInputStream(file);
try
{
DataLine.Info info=new DataLine.Info(Clip.class,ain.getFormat());
AudioFormat inFormat = ain.getFormat();
clip=(Clip) AudioSystem.getLine(info);
//rest code
The object should be available in my program, so that I can access it.