Driver adding...| plz help

i wrote a little servlet that works with db2 database , compiled it , deployed it but when i call it from the browser window it says that oit can t reach db2 driver ... may be i should add it somehow somewhere.... PLZ HELP
***********************************************************MY SOURSE CODE
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.servlet.http.*;
import javax.servlet.*;
public class db2serv extends HttpServlet {
public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
res.setContentType("text/html;charset=Windows-1251");
PrintWriter pw = res.getWriter();
String title ="servlet/db2 example titll ?";
pw.println("<HTML><HEAD><TITLE>"+title+"</TITLE> </HEAD>");
pw.println("<BODY>");
pw.println("<H1>"+title +"</H1>");
try {
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
Connection con = DriverManager.getConnection("jdbc:db2:irabase","login","passwd");
Statement st = con.createStatement();
ResultSet rs = st.executeQuery("select * from cname");
/* output */
pw.println("<TABLE>");
while (rs.next()) {
pw.print("<TR>");
pw.println("<TD>"+rs.getString(3)+"</T D>");
pw.println("</TR>");
pw.println("</TABLE>");
pw.println("<h2>The en</h2>");
rs.close();
st.close();
} catch (Exception e) {
throw (new ServletException(e));
pw.println("</BODY>");
pw.println("</HTML>");
pw.close();

error messege says:
javax.servlet.ServletException: No suitable driver
     at db2serv.doGet(db2serv.java:40)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
     at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
     at java.lang.Thread.run(Thread.java:484)
root cause
java.sql.SQLException: No suitable driver
     at java.sql.DriverManager.getConnection(DriverManager.java:537)
     at java.sql.DriverManager.getConnection(DriverManager.java:177)
     at db2serv.doGet(db2serv.java:21)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:197)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
     at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
     at java.lang.Thread.run(Thread.java:484)

Similar Messages

  • Mac mini ppc cd/dvd drive problems plz help

    i wanted to back up all my files onto my dvd+rw disks and when i put the files in a burn folder and hit burn it asks me all the things: what you want to name it how fast to burn it. then i click burn it says prearing data, ten it starts saying its writing...when it gets to 89.00% it completely freezes my computer and 5 min. later it pops up an error message saying "communication to the disk drive has failed". so after that didnt work i tried other dvd+rw disks and it still gave me the same error so i downloaded a program called simplyburns from apple's download page and it gives me the same "communication to the disk drive has failed" error....can anyone help me.....
    any help is greatly apreciated
    thanx
    heres a screenshot of my drives specs:
    [img]http://img161.imageshack.us/my.php?image=1po6.png[/img]

    should i just phone apple?? i have apple care.

  • Driver needed plz help

    hi
    i have hp pavalion pc 762d. it was installed with windows xp home edition but i formated and installed windows 2000. i have also updated the os with service pack 3. i realised that the my hp pavalion pc 762d uses a msi mainboard. but i am not sure of the model. i have some problem installing a driver for PCI device.the device is located at PCI bus 0, device 31, function 3.please help me to identify the device and driver. could you provide me with the link to download the driver. thank you very much
    nash.

    thank you for the help. the link you provided me helped.
    now i have another problem. the motherboard has a built-in audio but i disable and installed creative sound blaster audigy and installed all the drivers and it work perfectly. since i do not want any sound effects in windows, in the control panel, sound and multimedia option, i choose no sound under the scheme. but when ever i empty my recycle bin there is a beep from the computer ( not the speaker) how do i disable the beep. thank you.

  • Error while opening a module. plz help me, very urgent.

    when i try to open a module, the following error message appears on my screen.
              " no j2ee component found in d:\krisp\programs\servlets".
              i've installed bea in c: drive and my servlet program is in d: drive.
              plz help me, it's very urgent.

    Can you provide some more information? What were you doing when this happened?
              Can you post the entire error message?
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Adding "window to a container:illegal argument exception".error plz help

    Thanks to Mr.Andrew and sun for developing the following code for a
    mediaplayer which is implemented in jmf.This is working in core java. But
    when i have converted it to Applet it compiles but an error adding "window
    to a container:illegal argument exception".code is given below plz point
    me where is the error;
    import javax.media.*;
    import java.text.DecimalFormat;
    import java.awt.*;
    import java.awt.FileDialog;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class nwa extends WindowAdapter{
    frameclass frame;
    public nwa(frameclass frame){
    this.frame=frame;
    public void windowClosing (WindowEvent e)
    //User selected close from System menu.
    //Call dispose to invoke windowClosed.
    frame.dispose ();
    public void windowClosed (WindowEvent e)
    //if (player != null)
    //player.close ();
    System.exit (0);
    class frameclass extends JFrame
    frameclass(){
    nwa n=new nwa(this);
    this.addWindowListener(n);                    
    public class PlayerApplet extends JApplet
              implements
    ActionListener,ControllerListener,ItemListener, KeyListener
    frameclass frame=new frameclass();
    Player player;
    Component vc, cc;
    JProgressBar volumeBar;
         JButton fastRewind;
         JButton fastForward;
         JButton play;
    int sizeIncrease = 2;
    boolean invokedStop = false;
         /** Big */
         int progressFontSize=30;
    boolean first = true, loop = false;
    String currentDirectory;
    public void init(){
    JMenu m = new JMenu ("File");
    JMenuItem mi = new JMenuItem ("Open...");
    mi.addActionListener (this);
    m.add (mi);
    m.addSeparator ();
    JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem ("Loop", false);
    cbmi.addItemListener (this);
    m.add (cbmi);
    m.addSeparator ();
    mi = new JMenuItem ("Exit");
    mi.addActionListener (this);
    m.add (mi);
    JMenuBar mb = new JMenuBar ();
    mb.add (m);
    frame.setJMenuBar (mb);
    setSize (200, 200);
         final JPanel p = new JPanel(new GridLayout(1,0,5,5));
              p.setBorder(new EmptyBorder(3,5,5,5) );
              fastRewind = new JButton("<html><body><font size=+"+
    sizeIncrease+ "><<");
              fastRewind.setToolTipText("Fast Rewind");
              fastRewind.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             skipBack();
                        } else {
    JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file
    first!"));
              fastRewind.addKeyListener(this);
              p.add(fastRewind);
              JButton stop = new JButton("<html><body><font size=+"+
    sizeIncrease+ ">&#9632;");
              stop.setToolTipText("Stop");
              stop.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        invokedStop = true;
                        //player.stop();
                        sp();
              stop.addKeyListener(this);
              p.add(stop);
              play = new JButton("<html><body><font size=+"+
    sizeIncrease+ ">>");
              play.setToolTipText("Play");
              play.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             player.setRate(1);
                             st();
                        } else {
    JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file
    first!"));
              play.addKeyListener(this);
              p.add(play);
              fastForward = new JButton("<html><body><font size=+"+
    sizeIncrease+ ">>>");
              fastForward.setToolTipText("Fast Forward");
              fastForward.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             skipForward();
                        } else {
    JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file
    first!"));
              fastForward.addKeyListener(this);
              p.add(fastForward);
              p.addKeyListener(this);
              frame.add(p,BorderLayout.CENTER);     
              add(frame);
    // pack ();
    setVisible (true);
    public void start(){
    st();
    public void stop(){
    sp();
    public void destroy(){
    player.stop();
    player.deallocate();
    public void actionPerformed (ActionEvent e)
                   if (e.getActionCommand().equals("Exit"))
                   // Call dispose to invoke windowClosed.
                   frame.dispose ();
                        return;
         FileDialog fd = new FileDialog (frame, "Open File",
    FileDialog.LOAD);
         fd.setDirectory (currentDirectory);
         fd.show ();
         // If user cancelled, exit.
              if (fd.getFile() == null)
         return;
    currentDirectory = fd.getDirectory ();
              if (player != null)
         player.close ();
         try
         player = Manager.createPlayer (new MediaLocator
    ("file:" +
    fd.getDirectory() +
    fd.getFile()));
         catch (java.io.IOException e2)
    System.out.println (e2);
    return;
         catch (NoPlayerException e2)
    System.out.println ("Could not find a player.");
    return;
              if (player == null)
         System.out.println ("Trouble creating a player.");
         return;
    first = false;
    frame.setTitle (fd.getFile ().toString());
    player.addControllerListener (this);
    player.prefetch ();
    public void controllerUpdate (ControllerEvent e)
    if (e instanceof ControllerClosedEvent)
    if (vc != null)
    remove (vc);
    vc = null;
    if (cc != null)
    remove (cc);
    cc = null;
    return;
    if (e instanceof EndOfMediaEvent)
    if (loop)
    player.setMediaTime (new Time (0));
    player.start ();
    return;
    if (e instanceof PrefetchCompleteEvent)
    player.start ();
    return;
    if (e instanceof RealizeCompleteEvent)
    vc = player.getVisualComponent ();
    if (vc != null)
    add (vc);
    cc = player.getControlPanelComponent ();
    if (cc != null){
         this.add (cc, BorderLayout.SOUTH);
                        this.show();
    public void keyReleased(KeyEvent ke) {
    int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyTyped(KeyEvent ke) {
         int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyPressed(KeyEvent ke) {
              int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
              }else if (keycode==KeyEvent.VK_UP) {
                   st();
              }else if (keycode==KeyEvent.VK_DOWN) {
                   sp();
    public void skipForward() {
    double secs=5;
    double playersecs = player.getMediaTime().getSeconds();
    Time settime = new javax.media.Time(playersecs + secs);
    player.setMediaTime(settime);
    public void skipBack() {
              double secs1=5;
    double playersecs1 = player.getMediaTime().getSeconds();
    Time settime1 = new javax.media.Time(playersecs1 - secs1);
    player.setMediaTime(settime1);
         public void st() {
         player.start();
         public void sp() {
         player.stop();
    public void itemStateChanged (ItemEvent e)
    loop = !loop;
    When i comment add(frame) this error goes but i got a null poiter
    exception
    Plz help
    manu

    Hi Andrew,
    Thanks for ur reply.Sorrry that my code not included in the code block.
    My problem have been solved partly.Now playerapplet is working properly.It can play files from local machine(through open menuitem from file menu) as well as local network (through url menuitem from file menu).
    There is no requirement to play file from internet at present.
    I have given arrow keys to forward/backward/open/close.
    I have now completed my first part of project.Now i have to start the second part ie Controlling arrow keys using a joystick like instrument.The instrument and driver will be provided by my co. and the user is using only this device.Plz help me how to do that.
    The code is given below
    import javax.media.*;
    import java.text.DecimalFormat;
    import java.awt.*;
    import java.awt.FileDialog;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    <APPLET CODE=PlayerApplet.class
    WIDTH=320 HEIGHT=300>
    </APPLET>
    class nwa extends WindowAdapter
         frameclass frame;
         Player player;
         public nwa(frameclass frame,Player player)
          this.player=player;
          this.frame=frame;
         public void windowClosing (WindowEvent e)
          //User selected close from System menu.
          //Call dispose to invoke windowClosed.
          frame.dispose ();
          public void windowClosed (WindowEvent e)
              if (player != null)
                   player.stop();
                player.close ();
                   player.deallocate();
          System.exit (0);
    class frameclass extends JFrame
    Player player;
         frameclass(Player player)
         nwa n=new nwa(this,player);
         this.addWindowListener(n);                    
    public class PlayerApplet extends JApplet
               implements ActionListener,ControllerListener,ItemListener, KeyListener
               Player player=null;
               frameclass frame=new frameclass(player);
                 Component vc, cc;
                 Container f;
                 JProgressBar volumeBar;
                 JButton fastRewind;
              JButton fastForward;
              JButton play;
              int sizeIncrease = 2;
              boolean invokedStop = false;
              /** Big */
              int progressFontSize=30;
                 boolean first = true, loop = false;
                 String currentDirectory;
                 public void init()
                          f=frame.getContentPane();
                         JMenu m = new JMenu ("File");
                         JMenuItem mi = new JMenuItem ("Open...");
                         mi.addActionListener (this);
                         m.add (mi);
                         m.addSeparator ();
                         mi = new JMenuItem ("URL");
                         mi.addActionListener (this);
                         m.add (mi);
                         m.addSeparator ();
                         JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem ("Loop", false);
                         cbmi.addItemListener (this);
                         m.add (cbmi);
                         m.addSeparator ();
                         mi = new JMenuItem ("Exit");
                         mi.addActionListener (this);
                         m.add (mi);
                         JMenuBar mb = new JMenuBar ();
                         mb.add (m);
                         frame.setJMenuBar (mb);
                         setSize (500, 500);
                           JPanel p = new JPanel(new GridLayout(1,0,5,5));
                        p.setBorder(new EmptyBorder(3,5,5,5) );
                        fastRewind = new JButton("<html><body><font size=+"+ sizeIncrease+ "><<");
                        fastRewind.setToolTipText("Fast Rewind");
                        fastRewind.addActionListener( new ActionListener(){
                             public void actionPerformed(ActionEvent ae) {
                                  if (player!=null) {
                                       invokedStop = false;
                                       skipBack();
                                  } else {
                                       JOptionPane.showMessageDialog(play,
                                       new JLabel("Open a sound file first!"));
                        fastRewind.addKeyListener(this);
                        p.add(fastRewind);
                        JButton stop = new JButton("<html><body><font size=+"+ sizeIncrease+ ">&#9632;");
                        stop.setToolTipText("Stop");
                        stop.addActionListener( new ActionListener(){
                                  public void actionPerformed(ActionEvent ae) {
                                       invokedStop = true;
                                       sp();
                        stop.addKeyListener(this);
                        p.add(stop);
                        play = new JButton("<html><body><font size=+"+ sizeIncrease+ ">>");
                        play.setToolTipText("Play");
                        play.addActionListener( new ActionListener()
                                  public void actionPerformed(ActionEvent ae) {
                                       if (player!=null) {
                                            invokedStop = false;
                                            player.setRate(1);
                                            st();
                                       } else {
                                            JOptionPane.showMessageDialog(play,
                                            new JLabel("Open a sound file first!"));
              play.addKeyListener(this);
              p.add(play);
              fastForward = new JButton("<html><body><font size=+"+ sizeIncrease+ ">>>");
              fastForward.setToolTipText("Fast Forward");
              fastForward.addActionListener( new ActionListener(){
                   public void actionPerformed(ActionEvent ae) {
                        if (player!=null) {
                             invokedStop = false;
                             skipForward();
                        } else {
                             JOptionPane.showMessageDialog(play,
                             new JLabel("Open a sound file first!"));
              fastForward.addKeyListener(this);
              p.add(fastForward);
              frame.getContentPane().add(p,BorderLayout.CENTER);
              frame.setVisible (true);
              frame.pack();
              frame.setResizable(false);
      public void stop(){
      sp();
      public void destroy(){
       player.stop();
        player.deallocate();
      public void actionPerformed (ActionEvent e)
              if (e.getActionCommand().equals("Exit"))
                             // Call dispose to invoke windowClosed.
                             player.stop();
                             player.close();
                             player.deallocate();
                             frame.dispose ();
                                  return;
              if (e.getActionCommand().equals("Open..."))
                             FileDialog fd = new FileDialog (frame, "Open File",
                                         FileDialog.LOAD);
                              fd.setDirectory (currentDirectory);
                              fd.show ();
                              // If user cancelled, exit.
                              if (fd.getFile() == null)
                             return;
                              currentDirectory = fd.getDirectory ();
                                   if (player != null){
                                       player.close ();
                                       player.deallocate();
                         try
                  player = Manager.createPlayer (new MediaLocator
                                               ("file:" +
                                               fd.getDirectory() +
                                               fd.getFile()));
                              catch (java.io.IOException e2)
                            System.out.println ("file not found :"+e2);
                            return;
                              catch (NoPlayerException e2)
                            System.out.println ("Could not find a player.");
                            return;
                    if (player == null)
                   System.out.println ("Trouble creating a player.");
                   return;
                    first = false;
                    frame.setTitle (fd.getFile ().toString());
                    player.addControllerListener (this);
                    player.prefetch ();
                   return;
              if (e.getActionCommand().equals("URL"))
                             FileDialog fd = new FileDialog (frame, "Open File",
                                         FileDialog.LOAD);
                         fd.setDirectory (currentDirectory);
                         fd.show ();
                         // If user cancelled, exit.
                              if (fd.getFile() == null)
                             return;
                         currentDirectory = fd.getDirectory ();
                              if (player != null){
                                       player.close ();
                                       player.deallocate();
                   try
                        URL url = new URL ("file://"+fd.getDirectory()+fd.getFile());
                    MediaLocator mediaLocator = new MediaLocator (url);
                        player = Manager.createPlayer (mediaLocator);
                   catch (java.io.IOException e2)
                  System.out.println ("file not found :"+e2);
                  return;
                    catch (NoPlayerException e2)
                  System.out.println ("Could not find a player.");
                  return;
                    if (player == null)
                   System.out.println ("Trouble creating a player.");
                   return;
          first = false;
          frame.setTitle (fd.getFile ().toString());
          player.addControllerListener (this);
          player.prefetch ();
              return;
       public void controllerUpdate (ControllerEvent e)
          if (e instanceof ControllerClosedEvent)
              if (vc != null)
                  frame.getContentPane().remove (vc);
                  vc = null;
              if (cc != null)
                  frame.getContentPane().remove (cc);
                  cc = null;
              return;
          if (e instanceof EndOfMediaEvent)
              if (loop)
                  player.setMediaTime (new Time (0));
                  player.start ();
              return;
          if (e instanceof PrefetchCompleteEvent)
              player.start();
              return;
          if (e instanceof RealizeCompleteEvent)
            if (vc != null)
                  remove (vc);
                  vc = null;
              if (cc != null)
                  remove (cc);
                  cc = null;
              vc = player.getVisualComponent ();
              if (vc != null)
                  frame.getContentPane().add(vc,BorderLayout.NORTH);
              cc = player.getControlPanelComponent ();
              if (cc != null){
                       frame.getContentPane().add (cc, BorderLayout.SOUTH);
                     frame.setVisible(true);
                     frame.pack();
    public void keyReleased(KeyEvent ke) {
    int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyTyped(KeyEvent ke) {
         int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
         public void keyPressed(KeyEvent ke) {
              int keycode = ke.getKeyCode();
              if (keycode==KeyEvent.VK_LEFT) {
                   skipBack();
              } else if (keycode==KeyEvent.VK_RIGHT) {
                   skipForward();
              }else if (keycode==KeyEvent.VK_UP) {
                   st();
              }else if (keycode==KeyEvent.VK_DOWN) {
                   sp();
    public void skipForward() {
    Time settime;
    double secs=5;
    double playersecs = player.getMediaTime().getSeconds();
    double duration = player.getDuration().getSeconds();
              if((playersecs+secs) < duration){
                      settime = new javax.media.Time(playersecs + secs);
                      player.setMediaTime(settime);
              }else {
                        player.setMediaTime(new Time(duration));
    public void skipBack() {
              double secs1=5;
              double secs2=0;
              double playersecs1 = player.getMediaTime().getSeconds();
              Time settime1;
              if((playersecs1 - secs1) > secs2){
                      settime1 = new javax.media.Time(playersecs1 - secs1);
                      player.setMediaTime(settime1);
              }else {
                        player.setMediaTime(new Time(0));
         public void st() {
         player.start();
         public void sp() {
         player.stop();
       public void itemStateChanged (ItemEvent e)
          loop = !loop;
    With Thanks
    manuEdited by: mm_mm on Nov 27, 2007 11:09 PM

  • How to select the download location? its automatically downloading to users folder in c drive. i wanna change it..plz help me out......

    how to select the download location? its automatically downloading to users folder in c drive.. i wanna change to my desktop...plz help me out...

    Tools -> Options -> Save files to -> Click browse button and browse for folder where you want to save the file.

  • Hp 15-r007 tx pc = i need 3d video controller driver plz help me

    i had downloaded drivers from your official web site 
    3d video controller driver is missing can provied link to downlaod plz help...

    Hi,
    NIVIDIA driver gives you an option for 3D:
        http://ftp.hp.com/pub/softpaq/sp65001-65500/sp65477.exe
    Your machine is not a real 3D machine:
        http://support.hp.com/us-en/product/HP-15-Notebook-PC-series/6875200/model/7089867/document/c0434541...
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Plz help!!! USB driver cannot be detected in XP

    i followed the step to install XP and setup with the Mac driver disc in xp, all the hardware was successfully be detected (blue tooth, display, wireless) but one of the USB driver are not, i don't what is this,plz help!

    cx2ching,
    I'm assuming you are trying Bootcamp. You might want to ask your question in the BootCamp forum:
    http://discussions.apple.com/category.jspa?categoryID=213
    One common problem with driver installations occurs if you aren't using Windows XP SP2, I read several threads where this was a problem with the USB drivers, for one.

  • HT201077 photos not getting added up in my photostream. It's showing some kinda registry error in my windows. Plz help

    photos not getting added up to my photostream. It's showing some kinda registry error in my windows. Plz help!!

    Hi Melissa_C!
    I have an article for you that may help shed light on this circumstance:
    iCloud: My Photo Stream FAQ
    http://support.apple.com/kb/ht4486
    How long are My Photo Stream photos stored in iCloud?
    The photos you upload to My Photo Stream are stored in iCloud for 30 days to give your devices plenty of time to connect and download them.
    How many photos are stored in My Photo Stream on my devices and computers?
    iCloud pushes all your photos to the My Photo Stream album on your devices and computers, and manages them efficiently, so you don’t run out of storage space.
    Your iOS devices keep a rolling collection of your last 1000 photos in the My Photo Stream album. From there, you can browse your recent photos or move the ones you like to your Camera Roll or another album to keep them on your device forever.
    Because your Mac and PC have more storage than your iOS devices, you can choose to have all of your My Photo Stream photos automatically downloaded. In iPhoto or Aperture preferences on your Mac, select Photos (or Photo Stream) > My Photo Stream > Automatic Import. All of your photo stream photos will be imported into your Events, Projects, Photos, Faces, and Places folders in iPhoto or Aperture. On your PC with My Photo Stream enabled in the Control Panel, all of your photos will be imported into C:\\Users\<user name>\Pictures\iCloud Photos\My Photo Stream. For iCloud Control Panel 2.0 to 2.1.2 users, the path isC:\\Users\<user name>\Pictures\Photo Stream\My Photo Stream .
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • I have just added sound fonts in my library bank, but everytime i try to load a sound tru DLS my logic crashes... Plz help.

    I have just added sound fonts in my library bank, but everytime i try to load a sound tru DLS my logic crashes... Plz help.
    cassykeys

    Have you tried importing them into the EXS 24 ? Assuming the process is the same if you're on Logic X, its just a matter of putting the soundfont files into the ~/Library/Application Support/Logic/Sampler Instruments folder and the EXS converts them when you try to load them - its explained properly in the Software Instruments manual (EXS24 section), but its very quick and  easy. It might provide a decent alternative.

  • HT204382 music files that I'm trying to transfer from my external hard drive!!! i really need help! i am getting very frustrated. plz help me thank you

    hi. i am trying to transfer my old pictures and music files from my external drive into my new laptop.and first of all only a coupleof my foldersare coming up.and even those few files/folders wont play ....i am new to mac.i REALLY need help. my old pictures and music are real important to me.plz help me.

    IS the external HD from another Mac or a PC?

  • I have connected my iphone to pc through itunes after adding a music and removed my phone there is no content in my phone what should i do plz help mee

    i have connected my iphone to pc through itunes after adding a music and removed my phone there is no content in my phone what should i do plz help mee

    Greetings michealjerold,
    When syncing between iTunes on your computer and your iPhone, be sure to use the procedures in this article -
    Sync your iPhone, iPad, and iPod with iTunes using USB - Apple Support
    Thanks for using Apple Support Communities.
    Be well,
    Brett L 

  • Plz help my external drive isn't being mounted

    I have a WD external hard drive, and it stopped mounting on my MAC. I think it happened when I tried to delete the alias in Mac HD/Volumes/. Now when I plug in my drive it only mounts the alias in Volumes but not the actual drive. When I click on the alias it says that the original can't be found. Anybody know how to fix this? Plz help.

    Thought you could use this info about getting FireWire to work!
    First, you should always Repair Permissions in Disk Utility before and after any update; I would do that now. If you installed your update with FireWire plugged in, your Mac may not recognize it anymore.
    Try resetting your FireWire ports by disconnecting all FW devices, shut down your Mac and unplug it from AC power (wall socket) for 30 minutes. plug it back in and try FW.
    If that did'nt work, download the combo update from this site (yours may be corrupt), not Software Update, disconnect all firewire + USB devices except keyboard + mouse, Repair Permissions, re-install update, Repair Permissions again + try. Yours is the 10.4.6 Combo update. Others reading, download the Combo that applies to your system.
    If that still did'nt get it Zap the PRAM. While restarting Mac hold down the following key combo Command-Option-P-R. Keep holding those keys down till you hear the second start-up chime, then release.
    For those of you with Macs that are not PowerBooks or iBooks, a bad internal battery can cause FireWire to not be recognized, so make sure it's good! Also, here is Apple doc.#88338 on getting FireWire to work.
    Good Luck!
    Cheers!
    DALE

  • Compaq presario c795tu sound driver needed...plz help me...

    Plz help me ...... i need conexant HD smart audio 221 sound driver.....
    Actually i reinstalled the XP and came to know that the sound is not coming...
    when i checked it...sound driver was missing some files likes AUDSYS.exe and UIU32A.exe etc.
    By mistake, my friend had been uninstalled the sound driver. then the problem has been increased...
    2 days back...i went to local compaq shop...they installed some sound driver which is working but at the same time 
    head phone and speaker both are working continuously...means if u want to listen through head phone... speaker also working with head phone....
    sound is coming through both devices.....
    Plz help me regarding this....and provide me presario c795tu audio driver..... 
    This question was solved.
    View Solution.

    Hi,
    Here are the drivers.
    Unzip to a folder...use Device Manager.
    From Device Manager,right click "Audio Device on High Def Bus",choose Update driver,
    No to connect,
    Install from a list or specific location,
    Select Don't Search, I will choose the driver to install,
    For the Hardware Type select 'Show All Devices'
    Remove the check from "Show Compatible Hardware" and click on "Have Disk".
    Next...browse to the unzipped folder and choose the "WiSVHe5.inf".
    Ignore XP when it complains.
    Reboot.Hi,
    ** Say thanks by clicking the "Thumb up" icon which is on the left. **
    ** Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. **

  • PLZ HELP: Error is Cannot load the driver

    I dont know where i am going wrong : Just i am getting the blank page
    i am posting my code :
    --------------------LoginServlet4.java
      package com.xyz;
      import java.io.*;
      import java.util.*;
      import javax.servlet.*;
      import javax.servlet.http.*;
      import java.sql.*;
      public class LoginServlet4 extends HttpServlet
           public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
              try{
           User4 user=new User4();
           UserServices4 userServices4= new UserServices4();
           ArrayList userList = (ArrayList)userServices4.listUser4();
           req.setAttribute("userList",userList);
          RequestDispatcher rd = req.getRequestDispatcher("form5.jsp");
           rd.forward(req,res);
                }//try
                catch(Exception e)
                   System.out.println(e);
                }//catch
             }//doGet
    }---------------------UserServices4.java
    a bussiness logic class where i am opening the connection and retrieving the data
    package com.xyz;
    import java.io.*;
    import java.io.Serializable;
    import java.util.*;
    import java.sql.*;
    public class UserServices4
          public UserServices4(){}
          Connection con=null;
          PreparedStatement ps=null;
          ResultSet rs=null;
          public List listUser4(){
         ArrayList userList = new ArrayList();
         User4 user=null;
         String s1,s2,s3,s4;
          try
               Class.forName("com.jdbc.mysql.Driver");
                con=DriverManager.getConnection("jdbc:mysql://165.138.99.765/Bidding","mysql","mmmmm");
                ps=con.prepareStatement("select * from Match_Set");
                rs=ps.executeQuery();
                while(rs.next())
                   s1=rs.getString(1);
                   s2=rs.getString(2);
                   s3=rs.getString(3);
                   s4=rs.getString(4);
                   user = new User4();
                   user.setT1(s1);
                   user.setT2(s2);
                   user.setO1(s3);
                   user.setO1(s4);
                   userList.add(user);
          }//try
          catch(Exception e)
               System.out.println(e);
          finally{
               try{
                    con.close();
                    catch(Exception e)
          }//finally
          return userList;
    }/userList
    }//userservices4--------------------------User4.java ( A bean Class )
    package com.xyz;
    import java.io.*;
    import java.util.*;
    public class User4
         public User4(){}
              public void setT1(String s)
                    T1=s;
               public String getT1()
                    return T1;
               public void setT2(String s)
                    T2=s;
               public String getT2()
                    return T2;
               public void setO1(String s)
                         O1=s;
                    public String getO1()
                         return O1;
               public void setO2(String s)
                          O2=s;
                     public String getO2()
                          return O2;
           private String T1,T2;
           private String O1,O2;
    }-----------------------------form5.jsp
    <%@ page import= "java.io.* "%>
    <%@ page import= "java.sql.*" %>
    <%@ page import= "java.util.*" %>
    <%@ page import= "javax.servlet.http.*" %>
    <%
    ArrayList userList = (ArrayList)request.getAttribute("userList");
    out.println(userList);
    %>=============================
    PLZ HELP ME

    thanks for pointing the error i had made,
    But this output i got..
    [com.pennywise.User4@c0a9f9, com.pennywise.User4@d72200, com.pennywise.User4@1f9338f, com.pennywise.User4@1a80aea, com.pennywise.User4@164b9b6, com.pennywise.User4@1dc64a5, com.pennywise.User4@53c3f5, com.pennywise.User4@166340c, com.pennywise.User4@e33e18, com.pennywise.User4@101ac93, com.pennywise.User4@e90943, com.pennywise.User4@15f1f9c, com.pennywise.User4@1474ea, com.pennywise.User4@107bd0d, com.pennywise.User4@10ca208, com.pennywise.User4@61f533]

Maybe you are looking for

  • Grainy PDFs when placed into InDesign

    Certain PDFs are becoming grainy with a lot of noise in InDesign CS3. Not all placed files, just certain ones. HELP! Any reason why? Much appreciated!!

  • Comments beneth ALV.....have ur points

    Hi all, Below the  alv grid....can we write some remaks or comments...in the bottom. If yes...pleas let me know the code for this.... Thanx in advance. <b>Have ur points..</b>

  • Error - xml tags not proprely ended

    HI Friends, i have wrote an xml package for oracle apps report. After runing my concurrent program it will through an error The following tags were not closed: payrollstart, locsummary. Error processing resource 'http://hrmstest.vra.com:8000/OA_CG...

  • Deleting a rebate with Accruals

    Hello Gurus, I have a scenario where i need to delete a rebate which has accruals. If i try to delete the rebate it says "Order type has not been defined in the sales Area". Is there any way to delete/settle this rebate without maintaining this custo

  • I tunes is crashing

    I-Tunes begin crashing.  I uninstalled and reinstalled and while I reinstalled, it asked me if I my start-up was authorized,  I clicked retry and nothing happened.  I clicked ignore, it finished downloading, started up and then crashed again.  What's