Please help me in compiling the enclosed java code

Iam trying to compile the below mentioned java code and iam getting this error: I have Weblogic 6.1 + sp2 installed on my machine. Please help !
The error is :
C:\bea\jdk131>javac Browser.java
Browser.java:17: cannot resolve symbol
symbol : class JIconButton
location: class Browser
private JIconButton homeButton;
^
Browser.java:25: cannot resolve symbol
symbol : class ExitListener
location: class Browser
addWindowListener(new ExitListener());
^
Browser.java:26: cannot resolve symbol
symbol : variable WindowUtilities
location: class Browser
WindowUtilities.setNativeLookAndFeel();
^
Browser.java:30: cannot resolve symbol
symbol : class JIconButton
location: class Browser
homeButton = new JIconButton("home.gif");
^
4 errors
THE CODE IS HERE :
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
public class Browser extends JFrame implements HyperlinkListener,
ActionListener {
public static void main(String[] args) {
if (args.length == 0)
new Browser("http://www.apl.jhu.edu/~hall/");
else
new Browser(args[0]);
private JIconButton homeButton;
private JTextField urlField;
private JEditorPane htmlPane;
private String initialURL;
public Browser(String initialURL) {
super("Simple Swing Browser");
this.initialURL = initialURL;
addWindowListener(new ExitListener());
WindowUtilities.setNativeLookAndFeel();
JPanel topPanel = new JPanel();
topPanel.setBackground(Color.lightGray);
homeButton = new JIconButton("home.gif");
homeButton.addActionListener(this);
JLabel urlLabel = new JLabel("URL:");
urlField = new JTextField(30);
urlField.setText(initialURL);
urlField.addActionListener(this);
topPanel.add(homeButton);
topPanel.add(urlLabel);
topPanel.add(urlField);
getContentPane().add(topPanel, BorderLayout.NORTH);
try {
htmlPane = new JEditorPane(initialURL);
htmlPane.setEditable(false);
htmlPane.addHyperlinkListener(this);
JScrollPane scrollPane = new JScrollPane(htmlPane);
getContentPane().add(scrollPane, BorderLayout.CENTER);
} catch(IOException ioe) {
warnUser("Can't build HTML pane for " + initialURL
+ ": " + ioe);
Dimension screenSize = getToolkit().getScreenSize();
int width = screenSize.width * 8 / 10;
int height = screenSize.height * 8 / 10;
setBounds(width/8, height/8, width, height);
setVisible(true);
public void actionPerformed(ActionEvent event) {
String url;
if (event.getSource() == urlField)
url = urlField.getText();
else // Clicked "home" button instead of entering URL
url = initialURL;
try {
htmlPane.setPage(new URL(url));
urlField.setText(url);
} catch(IOException ioe) {
warnUser("Can't follow link to " + url + ": " + ioe);
public void hyperlinkUpdate(HyperlinkEvent event) {
if (event.getEventType() ==
HyperlinkEvent.EventType.ACTIVATED) {
try {
htmlPane.setPage(event.getURL());
urlField.setText(event.getURL().toExternalForm());
} catch(IOException ioe) {
warnUser("Can't follow link to "
+ event.getURL().toExternalForm() + ": " + ioe);
private void warnUser(String message) {
JOptionPane.showMessageDialog(this, message, "Error",
JOptionPane.ERROR_MESSAGE);

I got this code from this forum concerning MONITORING some application. Iam working on writing something which can monitor the availabilty of my application on the browser. Iam not familiar with swings so i got confused with compiling this code.
Please let me know if you know some code that can help me monitor my web based application.
Thanks in advance.

Similar Messages

  • How to do implement the FrameAccess.java code in my project

    Iam doing an project in java for inserting the videos into oracle9i and searching the inserted videos using the frames of the videos inserted.I have done the project to insert and search the videos.But i have been asked to put an EXTRACT button to extract all the frames of the video being inserted.Please help me to implement the FrameAccess.java coding in my existing coding.I have pasted my coding(VideoInsert.java) and FrameAccess.java(used to extract frames) coding.
    The VideoInsert.java when executed will contain browse button to choose the video file(only .mpg files) to be inserted into the database.After selecting the file and when we press open button in the Open dialog box,the video will be played in jmf player in a separate window and the filepath of the video will be included in the textbox.Now what i need is,an extract button should be placed and when it is clicked,the frames of the corresponding selected video has to be extracted in the location where the project files are stored i.e.,the FrameAccess.java coding has to be executed.
    Please help me if anyone knows how to implement the above concept.
    VideoInsert.java
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import oracle.sql.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.sql.BLOB ;
    import symantec.itools.multimedia.ImageViewer;
    public class VideoInsert extends javax.swing.JFrame {
        private Connection con;
        private Statement st=null;
        private OracleResultSet rs=null;
        int count=0;
        int count1=0;
        ImageViewer displaywindow = new ImageViewer();
        /** Creates new form VideoInsert */
        public VideoInsert() {
            initComponents();
            imgpane.add(displaywindow);
            try {
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                con = DriverManager.getConnection("jdbc:oracle:oci:@","scott","tiger");
                  //con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:FIRST","scott","tiger");
                con.setAutoCommit(false);
                st =con.createStatement();
                rs=(OracleResultSet)st.executeQuery("select max(vid) from browsevideo");
                while (rs.next()) {
                    count = (rs.getInt(1) + 1);
                rs.close();
                st =con.createStatement();
                rs=(OracleResultSet)st.executeQuery("select max(imageno) from browseimage");
                while (rs.next()) {
                    count1 = (rs.getInt(1) + 1);
                rs.close();
            } catch (SQLException e) {
                e.printStackTrace();
            txtvid.setText(String.valueOf(count));
             VideoTypeComboBox.addItem("All");
            VideoTypeComboBox.addItem("Entertainment");
            VideoTypeComboBox.addItem("Sports");
            VideoTypeComboBox.addItem("Animation");
            VideoTypeComboBox.addItem("News");
             VideoTypeComboBox.addItem("Others");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {//GEN-BEGIN:initComponents
            jLabel1 = new javax.swing.JLabel();
            txtvid = new javax.swing.JTextField();
            jLabel2 = new javax.swing.JLabel();
            txtvidfile = new javax.swing.JTextField();
            jLabel3 = new javax.swing.JLabel();
            txtvidinfo = new javax.swing.JTextField();
            jLabel4 = new javax.swing.JLabel();
            txtimgfile = new javax.swing.JTextField();
            vidbrowse = new javax.swing.JButton();
            imgbrowse = new javax.swing.JButton();
            jLabel5 = new javax.swing.JLabel();
            txtimgcont = new javax.swing.JTextField();
            insert = new javax.swing.JButton();
            imgpane = new javax.swing.JPanel();
            jLabel6 = new javax.swing.JLabel();
            VideoTypeComboBox = new javax.swing.JComboBox();
            getContentPane().setLayout(null);
            setTitle("VideoInsert");
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jLabel1.setText("Video ID");
            getContentPane().add(jLabel1);
            jLabel1.setBounds(30, 80, 90, 16);
            txtvid.setEditable(false);
            getContentPane().add(txtvid);
            txtvid.setBounds(130, 80, 130, 20);
            jLabel2.setText("VideoFile");
            getContentPane().add(jLabel2);
            jLabel2.setBounds(30, 130, 70, 16);
            getContentPane().add(txtvidfile);
            txtvidfile.setBounds(130, 130, 130, 20);
            jLabel3.setText("VideoInfo");
            getContentPane().add(jLabel3);
            jLabel3.setBounds(30, 180, 80, 16);
            getContentPane().add(txtvidinfo);
            txtvidinfo.setBounds(130, 180, 130, 20);
            jLabel4.setText("TopImage");
            getContentPane().add(jLabel4);
            jLabel4.setBounds(30, 230, 70, 16);
            getContentPane().add(txtimgfile);
            txtimgfile.setBounds(130, 230, 130, 20);
            vidbrowse.setText("Browse");
            vidbrowse.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    vidbrowseActionPerformed(evt);
            getContentPane().add(vidbrowse);
            vidbrowse.setBounds(280, 130, 78, 26);
            imgbrowse.setText("Browse");
            imgbrowse.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    imgbrowseActionPerformed(evt);
            getContentPane().add(imgbrowse);
            imgbrowse.setBounds(280, 230, 78, 26);
            jLabel5.setText("ImageContent");
            getContentPane().add(jLabel5);
            jLabel5.setBounds(30, 280, 80, 16);
            getContentPane().add(txtimgcont);
            txtimgcont.setBounds(130, 280, 130, 20);
            insert.setText("Insert");
            insert.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    insertActionPerformed(evt);
            getContentPane().add(insert);
            insert.setBounds(150, 400, 81, 26);
            imgpane.setLayout(new java.awt.BorderLayout());
            getContentPane().add(imgpane);
            imgpane.setBounds(410, 120, 350, 260);
            jLabel6.setText("Video Type");
            getContentPane().add(jLabel6);
            jLabel6.setBounds(30, 340, 80, 16);
            getContentPane().add(VideoTypeComboBox);
            VideoTypeComboBox.setBounds(130, 340, 130, 25);
            pack();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setSize(new java.awt.Dimension(800, 600));
            setLocation((screenSize.width-800)/2,(screenSize.height-600)/2);
        }//GEN-END:initComponents
        private void insertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_insertActionPerformed
            BLOB blb= null;
            PreparedStatement stmt = null;
            OutputStream fout=null;
            File f=null;
            FileInputStream fin=null;
            int bufferSize;
            byte[] buffer=null;
            int bytesRead = -1;
            String sfile1 = txtvidfile.getText();
            String sfile2 = txtimgfile.getText();
            String format=null;
            String format1=null;
            String videoinfo=txtvidinfo.getText();
            String imgcontent=txtimgcont.getText();
            String videoType=(String)VideoTypeComboBox.getSelectedItem();
            if(sfile1.endsWith("avi")) {
                format="avi";
            }else if(sfile1.endsWith("mpg")) {
                format="mpg";
            }else {
                format="mpg";
            if(sfile2.endsWith("jpg")) {
                format1="jpg";
            }else if(sfile2.endsWith("gif")) {
                format1="gif";
            }else {
                format1="jpg";
            if((sfile1.length()>0) && (sfile2.length()>0)) {
                try {
                    stmt=con.prepareStatement(" insert into browsevideo values (?,EMPTY_BLOB(),?,?,?)");
                    stmt.setInt(1,count);
                    stmt.setString(2,format);
                    stmt.setString(3,videoinfo);
                     stmt.setString(4,videoType);
                    stmt.executeUpdate();
                    stmt.close();
                    con.commit();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt = con.prepareStatement("Select video FROM browsevideo WHERE vid = ? for update of video");
                    stmt.setInt(1,count);
                    rs = (OracleResultSet)stmt.executeQuery();
                    rs.next();
                    blb = rs.getBLOB("video");
                    fout = blb.getBinaryOutputStream();
                    f = new File(sfile1);
                    fin = new FileInputStream(f);
                    bufferSize = blb.getBufferSize();
                    buffer = new byte[bufferSize];
                    while((bytesRead = fin.read(buffer)) != -1) {
                        fout.write(buffer, 0, bytesRead);
                    fout.flush();
                    fout.close();
                    con.commit();
                    rs.close();
                    stmt.close();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt=con.prepareStatement(" insert into browseimage values (?,?,?,EMPTY_BLOB(),?,?,?)");
                    stmt.setInt(1,count);
                    stmt.setInt(2,count1);
                    stmt.setInt(3,count1);
                    stmt.setString(4,imgcontent);
                    stmt.setString(5,format1);
                    stmt.setString(6,videoType);
                    stmt.executeUpdate();
                    stmt.close();
                    con.commit();
                }catch(Exception e) {
                    e.printStackTrace();
                try {
                    stmt = con.prepareStatement("Select image FROM browseimage WHERE imageno = ? for update of image");
                    stmt.setInt(1,count1);
                    rs = (OracleResultSet)stmt.executeQuery();
                    if(rs.next()) {
                        blb = rs.getBLOB("image");
                        fout = blb.getBinaryOutputStream();
                        f = new File(sfile2);
                        fin = new FileInputStream(f);
                        bufferSize = blb.getBufferSize();
                        buffer = new byte[bufferSize];
                        while((bytesRead = fin.read(buffer)) != -1) {
                            fout.write(buffer, 0, bytesRead);
                        fout.flush();
                        fout.close();
                        con.commit();
                        rs.close();
                    stmt.close();
                    count++;
                    count1++;
                    txtimgfile.setText("");
                    txtvidfile.setText("");
                    txtimgcont.setText("");
                    txtvidinfo.setText("");
                    txtvid.setText(String.valueOf(count));
                    JOptionPane.showMessageDialog(this,"Successfuly Completed");
                }catch(Exception e) {
                    e.printStackTrace();
        }//GEN-LAST:event_insertActionPerformed
        private void imgbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imgbrowseActionPerformed
            ExampleFileFilter filter1 = new ExampleFileFilter();
            JFileChooser chooser = new JFileChooser();
            filter1.addExtension("jpg");
            filter1.addExtension("gif");
            filter1.setDescription("JPG,GIF Images");
            chooser.setFileFilter(filter1);
            int returnVal = chooser.showOpenDialog(this);
            if(returnVal == JFileChooser.APPROVE_OPTION) {
                txtimgfile.setText(chooser.getSelectedFile().getAbsolutePath());
                try{
                        displaywindow.setImageURL(new java.net.URL("file:"+txtimgfile.getText()));
                        displaywindow.setStyle(ImageViewer.IMAGE_SCALED_TO_FIT);
                    }catch(Exception e){
                        e.printStackTrace();
        }//GEN-LAST:event_imgbrowseActionPerformed
        private void vidbrowseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vidbrowseActionPerformed
           ExampleFileFilter filter2 = new ExampleFileFilter();
           JFileChooser chooser = new JFileChooser();
           filter2.addExtension("avi");
            filter2.addExtension("mpg");
            filter2.setDescription("AVI & MPG Video");
            chooser.setFileFilter(filter2);
            int returnVal = chooser.showOpenDialog(this);
            if(returnVal == JFileChooser.APPROVE_OPTION) {
                txtvidfile.setText(chooser.getSelectedFile().getAbsolutePath());
                VideoAudioPlayer vap=new VideoAudioPlayer(txtvidfile.getText());
        }//GEN-LAST:event_vidbrowseActionPerformed
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
            setVisible(false);
            dispose();
        }//GEN-LAST:event_exitForm
         * @param args the command line arguments
        /*public static void main(String args[]) {
            new VideoInsert().show();
        // Variables declaration - do not modify//GEN-BEGIN:variables
        private javax.swing.JButton imgbrowse;
        private javax.swing.JLabel jLabel4;
        private javax.swing.JTextField txtvid;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JTextField txtimgcont;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JPanel imgpane;
        private javax.swing.JButton insert;
        private javax.swing.JComboBox VideoTypeComboBox;
        private javax.swing.JButton vidbrowse;
        private javax.swing.JTextField txtvidfile;
        private javax.swing.JLabel jLabel6;
        private javax.swing.JLabel jLabel5;
        private javax.swing.JTextField txtimgfile;
        private javax.swing.JTextField txtvidinfo;
        // End of variables declaration//GEN-END:variables
    FrameAccess.java
    import java.awt.*;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.Format;
    import javax.media.format.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.imageio.stream.*;
    import java.awt.image.*;
    import java.util.*;
    import javax.media.util.*;
    * Sample program to access individual video frames by using a
    * "pass-thru" codec. The codec is inserted into the data flow
    * path. As data pass through this codec, a callback is invoked
    * for each frame of video data.
    public class FrameAccess implements ControllerListener {
         Processor p;
         Object waitSync = new Object();
         boolean stateTransitionOK = true;
         public boolean alreadyPrnt = false;
         * Given a media locator, create a processor and use that processor
         * as a player to playback the media.
         * During the processor's Configured state, two "pass-thru" codecs,
         * PreAccessCodec and PostAccessCodec, are set on the video track.
         * These codecs are used to get access to individual video frames
         * of the media.
         * Much of the code is just standard code to present media in JMF.
         public boolean open(MediaLocator ml) {
              try {
                   p = Manager.createProcessor(ml);
                                } catch (Exception e) {
                   System.err.println(
                        "Failed to create a processor from the given url: " + e);
                   return false;
              p.addControllerListener(this);
              // Put the Processor into configured state.
              p.configure();
              if (!waitForState(Processor.Configured)) {
                   System.err.println("Failed to configure the processor.");
                   return false;
              // So I can use it as a player.
              p.setContentDescriptor(null);
              // Obtain the track controls.
              TrackControl tc[] = p.getTrackControls();
              if (tc == null) {
                   System.err.println(
                        "Failed to obtain track controls from the processor.");
                   return false;
              // Search for the track control for the video track.
              TrackControl videoTrack = null;
              for (int i = 0; i < tc.length; i++) {
                   if (tc.getFormat() instanceof VideoFormat) videoTrack = tc[i];
                   else     tc[i].setEnabled(false);
              if (videoTrack == null) {
                   System.err.println("The input media does not contain a video track.");
                   return false;
              String videoFormat = videoTrack.getFormat().toString();
              Dimension videoSize = parseVideoSize(videoFormat);
              System.err.println("Video format: " + videoFormat);
              // Instantiate and set the frame access codec to the data flow path.
              try {
                   Codec codec[] = { new PostAccessCodec(videoSize)};
                   videoTrack.setCodecChain(codec);
              } catch (UnsupportedPlugInException e) {
                   System.err.println("The process does not support effects.");
              // Realize the processor.
              p.prefetch();
              if (!waitForState(Processor.Prefetched)) {
                   System.err.println("Failed to realise the processor.");
                   return false;
              p.start();
              return true;
         /**parse the size of the video from the string videoformat*/
         public Dimension parseVideoSize(String videoSize){
              int x=300, y=200;
              StringTokenizer strtok = new StringTokenizer(videoSize, ", ");
              strtok.nextToken();
              String size = strtok.nextToken();
              StringTokenizer sizeStrtok = new StringTokenizer(size, "x");
              try{
                   x = Integer.parseInt(sizeStrtok.nextToken());
                   y = Integer.parseInt(sizeStrtok.nextToken());
              } catch (NumberFormatException e){
                   System.out.println("unable to find video size, assuming default of 300x200");
              System.out.println("Image width = " + String.valueOf(x) +"\nImage height = "+ String.valueOf(y));
              return new Dimension(x, y);
         * Block until the processor has transitioned to the given state.
         * Return false if the transition failed.
         boolean waitForState(int state) {
              synchronized (waitSync) {
                   try {
                        while (p.getState() != state && stateTransitionOK)
                             waitSync.wait();
                   } catch (Exception e) {
              return stateTransitionOK;
         * Controller Listener.
         public void controllerUpdate(ControllerEvent evt) {
              if (evt instanceof ConfigureCompleteEvent
                   || evt instanceof RealizeCompleteEvent
                   || evt instanceof PrefetchCompleteEvent) {
                   synchronized (waitSync) {
                        stateTransitionOK = true;
                        waitSync.notifyAll();
              } else if (evt instanceof ResourceUnavailableEvent) {
                   synchronized (waitSync) {
                        stateTransitionOK = false;
                        waitSync.notifyAll();
              } else if (evt instanceof EndOfMediaEvent) {
                   p.close();
                   System.exit(0);
         * Main program
         public static void main(String[] args) {
    //          if (args.length == 0) {
    //               prUsage();
    //               System.exit(0);
    // System.out.print("masoud");
    String url = new String("file:F:\\AVSEQ01.mpg");
              if (url.indexOf(":") < 0) {
                   prUsage();
                   System.exit(0);
              MediaLocator ml;
              if ((ml = new MediaLocator(url)) == null) {
                   System.err.println("Cannot build media locator from: " + url);
                   System.exit(0);
              FrameAccess fa = new FrameAccess();
              if (!fa.open(ml))
                   System.exit(0);
         static void prUsage() {
              System.err.println("Usage: java FrameAccess <url>");
         * Inner class.
         * A pass-through codec to access to individual frames.
         public class PreAccessCodec implements Codec {
              * Callback to access individual video frames.
              void accessFrame(Buffer frame) {
                   // For demo, we'll just print out the frame #, time &
                   // data length.
                   long t = (long) (frame.getTimeStamp() / 10000000f);
                   System.err.println(
                        "Pre: frame #: "
                             + frame.getSequenceNumber()
                             + ", time: "
                             + ((float) t) / 100f
                             + ", len: "
                             + frame.getLength());
              * The code for a pass through codec.
              // We'll advertize as supporting all video formats.
              protected Format supportedIns[] = new Format[] { new VideoFormat(null)};
              // We'll advertize as supporting all video formats.
              protected Format supportedOuts[] = new Format[] { new VideoFormat(null)};
              Format input = null, output = null;
              public String getName() {
                   return "Pre-Access Codec";
              //these dont do anything
              public void open() {}
              public void close() {}
              public void reset() {}
              public Format[] getSupportedInputFormats() {
                   return supportedIns;
              public Format[] getSupportedOutputFormats(Format in) {
                   if (in == null)
                        return supportedOuts;
                   else {
                        // If an input format is given, we use that input format
                        // as the output since we are not modifying the bit stream
                        // at all.
                        Format outs[] = new Format[1];
                        outs[0] = in;
                        return outs;
              public Format setInputFormat(Format format) {
                   input = format;
                   return input;
              public Format setOutputFormat(Format format) {
                   output = format;
                   return output;
              public int process(Buffer in, Buffer out) {
                   // This is the "Callback" to access individual frames.
                   accessFrame(in);
                   // Swap the data between the input & output.
                   Object data = in.getData();
                   in.setData(out.getData());
                   out.setData(data);
                   // Copy the input attributes to the output
                   out.setFlags(Buffer.FLAG_NO_SYNC);
                   out.setFormat(in.getFormat());
                   out.setLength(in.getLength());
                   out.setOffset(in.getOffset());
                   return BUFFER_PROCESSED_OK;
              public Object[] getControls() {
                   return new Object[0];
              public Object getControl(String type) {
                   return null;
         public class PostAccessCodec extends PreAccessCodec {
              // We'll advertize as supporting all video formats.
              public PostAccessCodec(Dimension size) {
                   supportedIns = new Format[] { new RGBFormat()};
                   this.size = size;
              * Callback to access individual video frames.
              void accessFrame(Buffer frame) {
                   // For demo, we'll just print out the frame #, time &
                   // data length.
                   if (!alreadyPrnt) {
                        BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
                        Image stopImage = stopBuffer.createImage(frame);
                        try {
                             BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
                             Graphics og = outImage.getGraphics();
                             og.drawImage(stopImage, 0, 0, size.width, size.height, null);
                             //prepareImage(outImage,rheight,rheight, null);
                             Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
                             ImageWriter writer = (ImageWriter) writers.next();
                             //Once an ImageWriter has been obtained, its destination must be set to an ImageOutputStream:
                             File f = new File(frame.getSequenceNumber() + ".jpg");
                             ImageOutputStream ios = ImageIO.createImageOutputStream(f);
                             writer.setOutput(ios);
                             //Finally, the image may be written to the output stream:
                             //BufferedImage bi;
                             //writer.write(imagebi);
                             writer.write(outImage);
                             ios.close();
                        } catch (IOException e) {
                             System.out.println("Error :" + e);
                   //alreadyPrnt = true;
                   long t = (long) (frame.getTimeStamp() / 10000000f);
                   System.err.println(
                        "Post: frame #: "
                             + frame.getSequenceNumber()
                             + ", time: "
                             + ((float) t) / 100f
                             + ", len: "
                             + frame.getLength());
              public String getName() {
                   return "Post-Access Codec";
              private Dimension size;

    check out the java.lang.Runtime and java.lang.Process classes

  • Urget Help --- Please give me the core java code that connects to UNIX ser

    Can anyone provide the core java code that connects UNIX server after verifying credentials and allow to implements UNIX commands through java program?

    no, you don't want to do that.
    You want to connect yourself, which Java is quite capable of doing, rather than go through some 3rd party client program that's not only specific to a particular operating system but not guaranteed to be installed at any particular machine or if it is to be installed in such a way that you can start it from your Java program.
    And then there's the little matter of figuring out the external API to use that program in the way you intent to (if it has one).

  • Please help me to solve the issue in my query.

    Hi All,
    Please help me to understand the mistake what i did in below query and help to resolve that.
    Actually i am trying to create a query to filter the records from db based on my input parameter.
       If my input parameter is 1(@showallrecords) then i need to show all the records which has the IsLatest as 1
       If my input parameter is 0(@showallrecords) then i need to show all the records which has the IsLatest as 0
    select * from tabel1 INNER JOIN tabel2    
    ON tabel1.KeyId = tabel2.KeyId 
    and (@showallrecords = 1 and tabel1.IsLatest = 1 )
    and (@showallrecords = 0 and tabel1.IsLatest = 0 )
    when i am executing the above query with the parameter @showallrecords = 1 ,db is returning 0 rows.If i am executing the above query after removed the last line and (@showallrecords = 0 and tabel1.IsLatest = 0 ) then records are coming.
    i understand that 1=0(last line) and the condition is not true.So its affecting the result.
    Please help me to solve this.

    select * from tabel1 INNER JOIN tabel2
    ON tabel1.KeyId = tabel2.KeyId
    WHERE (tabel1.IsLatest = @showallrecords Or @showallrecords=0)

  • I installed windows 7 on my macbook pro. all is working but lan adaptor and sound od laptop is not working. please help me or send the link where i can download the these drivers.

    I installed windows 7 on my macbook pro. all is working but lan adaptor and sound od laptop is not working. please help me or send the link where i can download the these drivers.I have lost my resource cd .

    If you are running Lion or Mountain Lion, the drivers are downloaded from within Bootcamp Assistant. If you are running Snow Leopard the drivers are on your Snow Leopard install disk.
    Read the Bootcamp Install Guide for your version of OSx. http://www.apple.com/support/bootcamp/
    Bootcamp questions should be asked in the Bootcamp forum where the Bootcamp gurus hang out https://discussions.apple.com/community/windows_software/boot_camp

  • PLEASE HELP ME TO FIND THE SOLUTION REGARDING "LOGICAL SYSTEM CHANGED"

    HAI EVERYBODY,
    PLEASE HELP ME TO FIND THE SOLUTION REGARDING "LOGICAL SYSTEM CHANGED" during the material master replication by using middleware parameters.
    step1 : i have taken SRM client 810 and named it as CHINNISRM
    step2 : i  have taken r3 client 810 and named it as CHINNIR3
    step3: During material master replication i maintained tables like crmconsum,crmrfcpar,crmparoltp in   r3   and smofparsfa in srm client and filtered the objects and loaded the objects through r3ac3,r3ac1,r3as.
    step4 : And later i have checked in r3 queues to activate the objects,but i have seen a message like  "LOGICAL SYSTEM CHANGED:SEE 588701".according to the oss instructions i have checked in CRMPRLS table in se16 in R3 .there i found out there is one logical client  named with T90CLNT810.
    oss :588701
    Solution
    There are different cases in which different forms of processing are
    required or where several options exist:
    - The logical system name of an R/3 Backend client was changed in
    current operation. In this case, the data hangs in the outbound
    queues of the R/3 Backend system as specified under point 1 of
    the symptom. In this case, the logical system name must be
    changed back to the original value. Then the outbound queues
    can be reactivated. If no data was transferred to the EBP/CRM
    server before the change, also a correctioin of the check table
    is possible.
    - The same logical system name was used again in a new client of
    an R/3 Backend system that was linked to the EBP/CRM server. In
    this case, the data is in the inbound queue of the EBP/CRM
    server with the exception GUID_FOR_LOGSYS_CHANGED. In this
    case, the queue entries which have status SYSFAIL must be rejected, however, not the entire queues. If the new client of  the R/3 Backend system you have linked has exactly the same
    data as the old client and if it is meant to replace the old
    client (that is, this was deactivated), also a correction of
    the check tables is possible. In this case, the inbound queues
    can be reactivated after the correction.
    oss:765018
    1. If the situation in your system corresponds to the situation described
    under "Reason and Prerequisites" and if symptom 1 occurs, you can
    delete the table entry from table CRMPRLS table (there is just one
    entry). Since there is no maintenance dialog for this table and you
    cannot maintain it using transaction SE16, you must use a report to
    delete it. This report is attached to this note as correction
    instructions.
    Create the report ZZ_DELETE_CRMPRLS in your system and copy the source
    code from the correction instructions. You cannot implement this
    source code using transaction SNOTE.
    You can use the report in every plug-in or plug-in basis system, even
    if it is not specified in the validity section.
    After you have run the report, you can trigger existing queues again
    in transaction SMQ1.
    2. If the situation in your system corresponds to the situation described
    under "Reason and prerequisite" and if symptom 2 occurs, you can
    delete the entry from table CRMMLSGUID (there is just one entry).
    Since there is no maintenance entry for this table and you cannot
    maintain it using transaction SE16, you must use a report to delete
    it. This report is attached to this note as correction instructions.
    If they do not yet exist, add the following messages to message class SMOF in your logon language:
    Message Message short text
    303 User &1 is not allowed to change table &2.
    304 User &1 IS not allowed to display table &2.
    305 Logical system &1 was not found in table &2.
    306 System error! The current client was not
    found in table T000.
    Create the report ZZ_DELETE_CRMMLSGUID in your system and copy the
    source code from the correction instructions. You cannot implement
    this source code using transaction SNOTE.
    You can use the report for every release of the CRM system, even if it
    is not specified in the validity section. The only exceptions are CRM
    releases with Support Package versions that are too low such as CRM
    Release 3.0 with Support Package 12.
    After you have run the report, you can trigger existing queues again
    in transaction SMQ1 of the R/3 back-end system or transaction SMQ2 of
    the CRM system.
    so what should i do to do the replication.please suggest me .untill and unless i solve my problem i cant move to the further activity.i hope you people can solve my problem.thanks in advance.
    thanks and best regards,
    n.chakradhar

    Hi chakradhar,
    Did you find a solution to your issue? We are facing a similar issue and looking to figure out how this can be resolved.
    BR// 420

  • Good day please help me, my iphone 5 wont turn on.  i have tried the hard reset . but that didnt even work. i plugged it in charger but still no response i connect it in itunes still.dont open. please help. i dont have the warranty anymore, i

    good day please help me, my iphone 5 wont turn on.  i have tried the hard reset . but that didnt even work. i plugged it in charger but still no response i connect it in itunes still.dont open. please help. i dont have the warranty anymore, so please help.me.

    Please make a Genius Appointment and take it in for service. By now it probably cannot be fixed, but you never know.

  • HT1918 I would like to change my Visa card from the account but its not changing and the billing information is not changing and I can't purchase any thing from my account its now not usable please help me to solve the problem

    I would like to change my Visa card from the account but its not changing and the billing information is not changing and I can't purchase any thing from my account its now not usable please help me to solve the problem

    You made a purchase and exhausted the credit on your card before it processed. All purchases are final. Contact iTunes Store support. You need to settle up before you can purchase or download anything else.

  • Need driver for canon mg 5250 as scanner is not working with version 10.7. Can you please help me to find the driver so scanner works with WIFI?

    need driver for canon mg 5250 as scanner is not working with version 10.7. Lion. Can you please help me to find the driver so scanner works with WIFI?

    Try with the latest Apple driver package for Canon (released 15th Feb):
    http://support.apple.com/kb/DL899
    This solved my problem with the printing.

  • Please help me ,i forgot the synchronising password for my mac pro lion backup disk

    please help me ,i forgot the synchronising password for my mac pro lion backup disk

    If the backup volume is encrypted, and you forgot the password, then you'll have to erase the volume and start a new backup. There's no way to recover the password.

  • I want to check the main diffrence in Pop up block enabled and disabled.But,i don't get any difference.Would u please help me to understand the difference using one practical example of website

    I want to check the main diffrence in Pop up block enabled and disabled.But,i don't get any difference.Would u please help me to understand the difference using one practical example of website

    Here's two popup test sites.
    http://www.kephyr.com/popupkillertest/test/index.html
    http://www.popuptest.com/

  • Can you please help to understand how the firefox decides on the Expires date for a cached javascript file ( my server did not set any Expire header, but firebox set it down).

    # Question
    Can you please help to understand how the firefox decides on the Expires date for a cached javascript file ( my server did not set any Expire header, but firebox set it down). I tried to understand but different javascript file gets different Expires date value when it is being cached. Please help me as I tried lot and could not get proper answer for this. Thanks in Advance.

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Please help me in resolving the URL with parameters.

    Hello,
    Please help me in resolving the URL with parameters. If desformat is pdf, a pop up message �Acrobat Reader could not open �pa034922.fdf� because it is either not a supported file type or because the file has been corrupted���.
    if desformat is html or xml, the following URL is working.
    our requirement, report should be in pdf format.
    http://servername:7778/dev60cgi/rwcgi60?server=Rep60_mclaren&&userid=bizsystest/test@business&destype=cache&desformat=pdf&report=salary_dept.rdf&p_dept_list=''ABE','ASE','CE','CHE','CS','DE','DIAL','ECE','ERC','IE','ME','PTE','ARC','ASE1''&p_status_list=''ACP','AD','AP','ATP','D','FE','HD','INS','P','RP','S','TF','TP','TS','ST','GS','O''&p_sex=''M','F''&p_order_by='Name'&p_totals='NO'
    Thanks in advance,
    Usha

    We've seen this bug on machines running IE6 with a certain security patch (I forget its number). There's a thread in the Metalink reports forum about it. It appears to be somewhat tied to another problem where IE runs the report twice (you can see that in Showjobs. You're seeing the problem in 6i; I believe it persists in 9i.
    The workarounds are (1) set Acrobat so it doesn't open within IE or (2) switch to a different browser, like Netscape. For workaround 1, Start Acrobat Reader, Choose File -> Preferences -> General, Uncheck Web Browser Integration
    There's some evidence that it occurs more often with urls that include single quote characters. I think it's worse with XP, but I don't have any proof.
    If you check Adobe's site, you will see this isn't just an Oracle Reports problem. I think we're waiting for Microsoft on this one, so don't hold your breath for a quick fix.
    -- jim

  • HT5622 Please help I've lost the question and answer confidential My Account

    Please help I've lost the question and answer confidential My Account

    Hi Saad al saad,
    If you are having an issue with the Security Questions for your Apple ID, you may find the following articles helpful:
    Apple ID: All about Apple ID security questions
    http://support.apple.com/kb/HT5665
    Apple Support: Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/ht5312
    Regards,
    - Brenden

  • Please help I've lost the question and answer confidential My Account

    Please help I've lost the question and answer confidential My Account

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page should let you reset them : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

Maybe you are looking for

  • How to stop Preview program to open automatically every picture on hard drive? (When opening Preview)

    So this Preview opens automatically every picture on hard drive when I open the program. I haven't found any way to stop it.

  • AP and Repeater problem

    I have an aironet 1100 configured as the root and I want the aironet 350 as the repeater. After all is setup I keep receiving authentication failed messages on the log of the 1100. any thoughts?

  • Labview on windows c 6.00

    i am working on Labview 2014. i need to confirm that does the exe created in labview2014, RUN properly on windows based HMI.?? if yes then is there any specific tool kit required for that??? in that exe i am going to work on serial data transfer. cur

  • SAP Netweaver Mobile 7.1 on SAP ECC 6 or SAP Netweaver 7.02

    Dear, Just want to make sure of these : 1. Is it true that SAP Netweaver Mobile 7.1 only available for SAP Netweaver 7.x ? 2. Is it true that I will never be able to have SAP Netweaver Mobile 7.1 on my current SAP ECC 6 EHP 5 (SAP Netweaver AS 7.02)

  • Master data error - when switching an attribute to navigable

    Hi, I have a serious problem on a master data. I have this master data that until yesterday did have not a problem. Now, when I add an attribute not navigable (DIS), no problem. When I switch to DISPLAY and activate, following error occurs: Error in