Music Player Using Java: A Micro Project On
Music Player Using Java: A Micro Project On
Micro Project
on
Music Player Using Java
Submitted in partial fulfillment of the requirement for the award of
Diploma of Engineering
in
Computer Engineering
By
Mayank Rai
Rahil Mehta
Vikash Nishad
Pratham Poojari
Vaishnavi Bhoir
Mr.Nikhil Asolkar
9.Vaishnavi Bhoir
13.Pratham Poojari
88.Mayank Rai
90.Vikash Nishad
107.Rahil Mehta
PART –A PLAN
1 Brief Introduction 1
3 Resources Required 2
PART –B OUTCOME
1 Brief Description 3
2 Aim of Micro-Project 4
PART-A PLAN
1.0 Brief Introduction
Java was originally developed by James Gosling at Sun Microsystems (which has since
been acquired by Oracle) and released in 1995 as a core component of Sun Microsystems' Java
platform. The original and reference implementation Java compilers, virtual machines, and class
libraries were originally released by Sun under proprietary licenses. As of May 2007, in compliance
with the specifications of the Java Community Process, Sun had relicensed most of its Java
technologies under the GNU General Public License. Oracle offers its own HotSpot Java Virtual
Machine, however the official reference implementation is the OpenJDK JVM which is free open
source software and used by most developers and is the default JVM for almost all Linux
distributions.
Music Player lets you manage all your music files quickly and easily . This audio
player supports almost all types of mp3 , midi ,wav , flac raw aac files and other audio formats .
Easily browse and play music songs by genres , albums , artists , songs and folder.
Media is integral parts of our lives. We are creating media player using java to handle all the music
requirements of user.
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in
June 1991. Java was originally designed for interactive television, but it was too advanced for the digital
cable television industry at the time. The language was initially called Oak after an oak tree that stood
outside Gosling's office. Later the project went by the name Green and was finally renamed Java,
from Java coffee, the coffee from Indonesia. Gosling designed Java with a C/C++-style syntax that
system and application programmers would find familiar.
1
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Music Player using Java AJP 22517 SEM V
To Design a java program play music stored on machine and control it using
various java components.
2
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Music Player using Java AJP 22517 SEM V
PART-B OUTCOME
Java was originally developed by James Gosling at Sun Microsystems (which has since
been acquired by Oracle) and released in 1995 as a core component of Sun Microsystems' Java
platform. The original and reference implementation Java compilers, virtual machines, and class
libraries were originally released by Sun under proprietary licenses. As of May 2007, in compliance
with the specifications of the Java Community Process, Sun had relicensed most of its Java
technologies under the GNU General Public License. Oracle offers its own HotSpot Java Virtual
Machine, however the official reference implementation is the OpenJDK JVM which is free open
source software and used by most developers and is the default JVM for almost all Linux
distributions.
Music Player lets you manage all your music files quickly and easily . This audio
player supports almost all types of mp3 , midi ,wav , flac raw aac files and other audio formats .
Easily browse and play music songs by genres , albums , artists , songs and folder.
Media is integral parts of our lives. We are creating media player using java to handle all the music
requirements of user.
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in
June 1991. Java was originally designed for interactive television, but it was too advanced for the digital
cable television industry at the time. The language was initially called Oak after an oak tree that stood
outside Gosling's office. Later the project went by the name Green and was finally renamed Java,
from Java coffee, the coffee from Indonesia. Gosling designed Java with a C/C++-style syntax that
system and application programmers would find familiar.
3
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Nuclear Energy EST 22447 SEM V
To Design a java program play music stored on machine and control it using
various java components.
4
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Nuclear Energy EST 22447 SEM V
Code:-
package jlay;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedInputStream;
import java.io.File;
import javazoom.jl.decoder.JavaLayerException;
import javazoom.jl.player.Player;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.function.Function;
Player ;
BufferedInputStream bis;
FileInputStream fis;
File file;
layer(){
JFrame main = new JFrame();
main.setVisible(true);
main.setVisible(400,440);
main.setLayout(new FlowLayout());
main.setBackground(Color.MAGENTA);
main.add(choose);
main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
void open_dialog()
{
JFileChooser fc = new JFileChooser();
int result = fc.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION)
{
try {
file = new File(fc.getSelectedFile().getAbsolutePath());
fis = new FileInputStream(file);
bis = new BufferedInputStream(fis);
try {
player = new javazoom.jl.player.Player(bis);
6
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Nuclear Energy EST 22447 SEM V
}
catch (Exception ec){}
}
catch(IOException e)
{
e.printStackTrace();
}
}
}
public static void main(String[] args)
{
layer l = new layer();
}
}
7
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Nuclear Energy EST 22447 SEM V
Output:
8
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Nuclear Energy EST 22447 SEM V
9
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.
Nuclear Energy EST 22447 SEM V
10
VIVA COLLEGE OF DIPLOMA ENGG & TECH, COMPUTER ENGG.