I have new in JMF-Any one help me

Hai
I am beginner of JMF.i have facing one problem for past 3 days.
I wrote one applet program for playing mp3 song.Atfer i wrote one jsp file it has several radio button when i clicked any one of them it would called applet(i have using plugin tag for this embbed).i got one error i.e. Class not found exception.but i tried in appletviewer it's work perfectly.
My path folders are:
Applet program: c:/Tomcat/webapps/Vj/web-inf/classes/AB.java
Jsp File:c:/Tomcat/webapps/Vj/playapp.jsp
My code is applet code
import java.applet.Applet;
import java.awt.*;
import java.io.IOException;
import java.io.PrintStream;
import java.net.MalformedURLException;
import java.net.URL;
import javax.media.*;
<APPLET height=300 width=300 code="AB.class">
          <PARAM NAME="file" VALUE="artist - Track 01.mp3">
</APPLET>
public class AB extends Applet
    implements ControllerListener
    public SimplePlayerApplet()
        player = null;
public void init()
        MediaLocator medialocator = null;
        Object obj = null;
        if ((s = getParameter("FILE")) == null)
             System.out.println("S value is:NULL");
            Fatal("Invalid media file parameter");
        try
            URL url = new URL(getDocumentBase(), s);
            System.out.println("URL Value is:" + url);
            s = url.toExternalForm();
        catch(MalformedURLException malformedurlexception) { }
        try
            if((medialocator = new MediaLocator("file:" + s)) == null)
                Fatal("Can't build URL for " + s);
                System.out.println("catch in malformed");
            try
                player = Manager.createPlayer(medialocator);
                System.out.println("it is from create player");
            catch(NoPlayerException noplayerexception)
                System.out.println(noplayerexception);
                Fatal("Could not create player for " + medialocator);
        catch(MalformedURLException malformedurlexception1)
            Fatal("Invalid media file URL!");
        catch(IOException ioexception)
            Fatal("IO exception creating player for " + medialocator);
    public void start()
        if(player != null)
            player.start();
            System.out.println("This from start");
    public void stop()
        if(player != null)
               System.out.println("This from stop");
            player.stop();
            player.deallocate();
    public void destroy()
        player.close();
        System.out.println("This from Destory");
    void Fatal(String s)
        System.err.println("FATAL ERROR: " + s);
        throw new Error(s);
    Player player;
}now i run in appletviewer it's work perfectly.After that
I remove applet tags in this program and again i was compiled.
then now i embeded in jsp .
Jsp is below:
<%@ page language="java" import="java.io.*;" %>
<HTML><HEAD><TITLE>Doctor Page</TITLE>
<META http-equiv=Content-Language content=en-us>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR>
<script language="JavaScript">
function Check(){
for (var i=0; i < document.playChk.R1.length; i++)
   if (document.playChk.R1.checked)
var n = document.playChk.R1[i].value;
     document.playChk.action="Doctor.jsp";
     document.playChk.submit();
</script>
</HEAD>
<BODY>
<%
     if (request.getParameter("R1") != null){
          out.println("U Have Checked : " + request.getParameter("R1"));
          System.out.println("U Have Checked : " + request.getParameter("R1"));
          %>
     <jsp:plugin type="applet" code="AB.class" height="30" width="10" >
<jsp:params>
<jsp:param name="File" value="artist - Track 01.mp3">
</jsp:param>
</jsp:params>
     <jsp:fallback>
     Plugin tag OBJECT or EMBED not supported by browser.
     </jsp:fallback>
     </jsp:plugin>
<%
     else{
          System.out.println("This is First Strike");
          out.println("This is First Strike");
%>
<FORM method="post" name="playChk" >
<%
try{
          File f =new File("C://Tomcat 5.0/webapps/Vj/images");
          System.out.println();
          String lists[] =f.list();
          out.println("Length:" + lists.length);
     %>
     <TABLE width="100%" border=1>
     <%
     for(int i =0 ;i < lists.length-1;i++){
          System.out.println( f + lists[i]);
     %>
     <TR>
     <TD><IMG height=109 src="<%=f + "/" + lists[i]%>" width=150 border=0></TD>
     </TR>
     <TR>
     <TD><INPUT type="radio" checked value="<%=lists[i]%>" name="R1" onClick="Check()"></TD>
     </TR>
<%
     catch(Exception e){
          System.out.println("Exception" + e);
     %>
</FORM>
</BODY>
</HTML
Audio file is placed in same dir of applet.
now i am getting Class not found exception.
Ant one help me
With Regards
K.suresh

It might be if you explain "the Problem" - whats the error
for a start?

Similar Messages

Maybe you are looking for

  • How do you connect a usb printer and usb external hard drive to the airport extreme, as it only has one usb port?

    I'm thinking about upgrading my old 802.11g router for a new airport extreme. Can it connect to a usb printer and external hard drive at the same time and acutally work. It only has one usb port on the back. thank you!

  • Can't play flv in acrobat pro 9

    Hi, I want to play a flv clip in acrobat 9 pro. I can import it but if I want to play the clip I get only a grey square. I use adobe premiere pro cs4 to export the clip to flv. What I'm doing wrong? Thx

  • Issue sourcing from Microsoft Access - Syntax error (missing operator)

    I apologize if this has been discussed before. I used the search and went through 7 pages of results, but didn't see a similar issue. I'm using Windows 7, ODI 11.1.1.5. I'm trying to source from a local MS Access DB to an Oracle DB. The session fails

  • Total count and count based on column value

    Primaryid  Id     Status 1            50          1 2            50          1 3          50          1 4            50          3 5           50          2 6            50          1 7            51         1 8            51         2Im looking for

  • USB connected in non compatible mode E75

    Hello pleeze help... phone wont charge,via charger or usb,(ive tried diffrent charger+usb leads) ive done a battery pull +sim,several times,it boots up,lights up,vibrates,showing nokia logo,then dies... its my sons phone,he said he had been taking ph