Can we show pop3 output by java FX?

suppose i hava a .java where i have code to access my pop3.can it be possible to show that INBOX in java FX window??

<%@ page import="java.util.*, javax.mail.*, javax.mail.internet.*" %>
        <%
        Properties props = new Properties();
        //Properties props = System.getProperties();
props.put("mail.pop3.host","pop3.gmail.com");
// Setup authentication, get session
props.put("mail.smtp.starttls.enable","true");
Session sessions = Session.getInstance(props,
                    new javax.mail.Authenticator()
               protected PasswordAuthentication getPasswordAuthentication()
               { return new PasswordAuthentication("[email protected]","mogambo");     }
// Get the store
Store store = sessions.getStore("pop3s");
store.connect("pop.gmail.com",995,"[email protected]","mogambo");
Folder fd=store.getDefaultFolder().getFolder("INBOX");
fd.open(Folder.READ_ONLY);
Message [] msg=fd.getMessages();
//store.connect();
for(int i=0;i<msg.length;i++){
    out.write("m" + (i+1));
//msg.writeTo(System.out);
fd.close(false);
store.close();
%>
look this code is serving the pupose of javamail...................now i want to shoe the massage in java FX which will be shown onClick a button say *"feed back"*
now how can i do that i must pass the stored *Message* object to the java FX component...............if i am not wrong it is now the concern of java FX stuff.....
becoz the stage area should be dinamic....................and my java mail object should be familiar with it..................
Edited by: coolsayan.2009 on May 11, 2009 9:23 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How can I clear a SHOW EPHONE output ?

    I need to know is there a command to delete the show ephone output for the unregistered phones.
    R_VOZ_JGS#show ephone
    ephone-1 Mac: TCP socket:[-1] activeLine:0 UNREGISTERED
    mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0
    IP:0.0.0.0 0 Unknown 0  keepalive 0 max_line 0
    ephone-2 Mac: TCP socket:[-1] activeLine:0 DECEASED
    mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0
    IP:10.1.9.54 16223 ATA Phone keepalive 5 max_line 2 dual-line
    ephone-3 Mac: TCP socket:[-1] activeLine:0 UNREGISTERED
    mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0
    IP:10.1.9.54 3970 ATA Phone keepalive 18 max_line 2 dual-line

    I agree with you Manish, but since my phones are not going to SRST mode at the moment, so I was good at it . I immediately put back all the 19 commands I had configured and I was good to go

  • Duh - I can't see the output because it's in another process??

    I've been banging my head, trying to learn how to make Unix scripts and Java work together. At my job there's a lot of that, and I'm an intern and wanting to learn more so I've been playing at home. I have a Linux (RedHat7.2) partition at home, so I get that out in the evenings and play.
    I just learned there's a Runtime.exec() that can call applications. Cool. But I wanted to see if I could write a shell script and call that. I can get a regular application like gedit to open up, with
    Runtime.getRuntime().exec("gedit");
    But following the examples I found on forum searches, I can't get
    Runtime.getRuntime().exec("/bin/csh" "/root/testscript.sh") to show any output.
    I've been working in a terminal all along, and it just dawned on me that since exec() spawns a process, I could see with ps if it happened. Sure enough, every time I run
    java foo
    a new csh process starts. But still no output on the terminal. testscript.sh just says
    echo Hello world
    So I figure that the process is there and it did run the script, but it can't use the current terminal window for its output.
    If this is right, is there some way I can add something to foo.java that will kick off a terminal for the new csh process to use for its output?
    Thanks, this is fun!

    So do you want a new xterm or aterm or Eterm or wterm or what-ever-term window to pop up or just execute the script so that its stdout goes to java's stdout?
    This works but it is not complete:      1 import java.io.InputStream;
          2 public class testexec {
          3
          4     public static void main(String[] args) throws Exception {
          5         // Execute command
          6         String[] command = {"/bin/sh", "-e", "/home/myusername/hi"};
          7         Process child = Runtime.getRuntime().exec(command);
          8
          9         // Get input stream to read from it
         10         InputStream in = child.getInputStream();
         11         int c;
         12         while ((c = in.read()) != -1) {
         13             System.out.print((char)c);
         14         }
         15         in.close();
         16     }
         17 }(not complete because in real life there could be output in stderr too, and you need to watch both streams)
    and the script file "hi" goes:#!/bin/sh
    echo "Hello World!"

  • This code didnt show any output

    hi i m little new bie in swings
    plz check the following code it compile well without error but diidnt show any output.
    plz chk ii
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class GoMoku1 extends JFrame{
    JButton newGameButton; // Button for starting a new game.
    JButton resignButton; // Button that a player can use to end the
    // game by resigning.
    JLabel message; // Label for displaying messages to the user.
    public void GoMoku1() {
    Container content = getContentPane(); // Content pane of applet.
    content.setLayout(null); // I will do the layout myself.
    content.setBackground(new Color(0,150,0)); // Dark green background.
    Board board = new Board(); // Note: The constructor for the
    // board also creates the buttons
    // and label.
    content.add(board);
    content.add(newGameButton);
    content.add(resignButton);
    content.add(message);
    /* Set the position and size of each component by calling
    its setBounds() method. */
    board.setBounds(16,16,220,220);
    newGameButton.setBounds(310, 60, 120, 30);
    resignButton.setBounds(310, 120, 120, 30);
    message.setBounds(0, 350, 350, 30);
    public static void main(String[] args)
              GoMoku1 gm=new GoMoku1();
    // ----------------------- Nested class -----------------------------------
    class Board extends JPanel implements ActionListener, MouseListener {
    int[][] board; // The data for the board is kept here. The values
    // in this array are chosen from the following constants.
    static final int EMPTY = 0, // Represents an empty square.
    WHITE = 1, // A white piece.
    BLACK = 2; // A black piece.
    boolean gameInProgress; // Is a game currently in progress?
    int currentPlayer; // Whose turn is it now? The possible values
    // are WHITE and BLACK. (This is valid only while
    // a game is in progress.)
    int win_r1, win_c1, win_r2, win_c2; // When a player wins by getting five or more
    // pieces in a row, the squares at the
    // ends of the row are (win_r1,win_c1)
    // and (win_r2,win_c2). A red line is
    // drawn between these squares. When there
    // are no five pieces in a row, the value of
    // win_r1 is -1. The values are set in the
    // count() method. The value of win_r1 is
    // tested in the paintComponent() method.
    public Board() {
    // Constructor. Create the buttons and label. Listen for mouse
    // clicks and for clicks on the buttons. Create the board and
    // start the first game.
    setBackground(Color.lightGray);
    addMouseListener(this);
    resignButton = new JButton("Resign");
    resignButton.addActionListener(this);
    newGameButton = new JButton("New Game");
    newGameButton.addActionListener(this);
    message = new JLabel("",JLabel.CENTER);
    message.setFont(new Font("Serif", Font.BOLD, 14));
    message.setForeground(Color.green);
    board = new int[ 15][ 15];
    doNewGame();
    public void actionPerformed(ActionEvent evt) {
    // Respond to user's click on one of the two buttons.
    Object src = evt.getSource();
    if (src == newGameButton)
    doNewGame();
    else if (src == resignButton)
    doResign();
    void doNewGame() {
    // Begin a new game.
    if (gameInProgress == true) {
    // This should not be possible, but it doesn't
    // hurt to check.
    message.setText("Finish the current game first!");
    return;
    for (int row = 0; row < 15; row++) // Fill the board with EMPTYs
    for (int col = 0; col < 15; col++)
    board[row][col] = EMPTY;
    currentPlayer = BLACK; // BLACK moves first.
    message.setText("BLACK: Make your move.");
    gameInProgress = true;
    newGameButton.setEnabled(false);
    resignButton.setEnabled(true);
    win_r1 = -1; // This value indicates that no red line is to be drawn.
    repaint();
    void doResign() {
    // Current player resigns. Game ends. Opponent wins.
    if (gameInProgress == false) {
    // This should not be possible.
    message.setText("There is no game in progress!");
    return;
    if (currentPlayer == WHITE)
    message.setText("WHITE resigns. BLACK wins.");
    else
    message.setText("BLACK resigns. WHITE wins.");
    newGameButton.setEnabled(true);
    resignButton.setEnabled(false);
    gameInProgress = false;
    void gameOver(String str) {
    // The game ends. The parameter, str, is displayed as a message.
    message.setText(str);
    newGameButton.setEnabled(true);
    resignButton.setEnabled(false);
    gameInProgress = false;
    void doClickSquare(int row, int col) {
    // This is called by mousePressed() when a player clicks on the
    // square in the specified row and col. It has already been checked
    // that a game is, in fact, in progress.
    /* Check that the user clicked an empty square. If not, show an
    error message and exit. */
    if ( board[row][col] != EMPTY ) {
    if (currentPlayer == BLACK)
    message.setText("BLACK: Please click an empty square.");
    else
    message.setText("WHITE: Please click an empty square.");
    return;
    /* Make the move. Check if the board is full or if the move
    is a winning move. If so, the game ends. If not, then it's
    the other user's turn. */
    board[row][col] = currentPlayer; // Make the move.
    repaint();
    if (winner(row,col)) {  // First, check for a winner.
    if (currentPlayer == WHITE)
    gameOver("WHITE wins the game!");
    else
    gameOver("BLACK wins the game!");
    return;
    boolean emptySpace = false; // Check if the board is full.
    for (int i = 0; i < 15; i++)
    for (int j = 0; j < 15; j++)
    if (board[i][j] == EMPTY)
    emptySpace = true;
    if (emptySpace == false) {
    gameOver("The game ends in a draw.");
    return;
    /* Continue the game. It's the other player's turn. */
    if (currentPlayer == BLACK) {
    currentPlayer = WHITE;
    message.setText("WHITE: Make your move.");
    else { 
    currentPlayer = BLACK;
    message.setText("BLACK: Make your move.");
    } // end doClickSquare()
    private boolean winner(int row, int col) {
    // This is called just after a piece has been played on the
    // square in the specified row and column. It determines
    // whether that was a winning move by counting the number
    // of squares in a line in each of the four possible
    // directions from (row,col). If there are 5 squares (or more)
    // in a row in any direction, then the game is won.
    if (count( board[row][col], row, col, 1, 0 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 0, 1 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 1, -1 ) >= 5)
    return true;
    if (count( board[row][col], row, col, 1, 1 ) >= 5)
    return true;
    /* When we get to this point, we know that the game is not
    won. The value of win_r1, which was changed in the count()
    method, has to be reset to -1, to avoid drawing a red line
    on the board. */
    win_r1 = -1;
    return false;
    } // end winner()
    private int count(int player, int row, int col, int dirX, int dirY) {
    // Counts the number of the specified player's pieces starting at
    // square (row,col) and extending along the direction specified by
    // (dirX,dirY). It is assumed that the player has a piece at
    // (row,col). This method looks at the squares (row + dirX, col+dirY),
    // (row + 2*dirX, col + 2*dirY), ... until it hits a square that is
    // off the board or is not occupied by one of the players pieces.
    // It counts the squares that are occupied by the player's pieces.
    // Furthermore, it sets (win_r1,win_c1) to mark last position where
    // it saw one of the player's pieces. Then, it looks in the
    // opposite direction, at squares (row - dirX, col-dirY),
    // (row - 2*dirX, col - 2*dirY), ... and does the same thing.
    // Except, this time it sets (win_r2,win_c2) to mark the last piece.
    // Note: The values of dirX and dirY must be 0, 1, or -1. At least
    // one of them must be non-zero.
    int ct = 1; // Number of pieces in a row belonging to the player.
    int r, c; // A row and column to be examined
    r = row + dirX; // Look at square in specified direction.
    c = col + dirY;
    while ( r >= 0 && r < 15 && c >= 0 && c < 15 && board[r][c] == player ) {
    // Square is on the board and contains one of the players's pieces.
    ct++;
    r += dirX; // Go on to next square in this direction.
    c += dirY;
    win_r1 = r - dirX; // The next-to-last square looked at.
    win_c1 = c - dirY; // (The LAST one looked at was off the board or
    // did not contain one of the player's pieces.
    r = row - dirX; // Look in the opposite direction.
    c = col - dirY;
    while ( r >= 0 && r < 15 && c >= 0 && c < 15 && board[r][c] == player ) {
    // Square is on the board and contains one of the players's pieces.
    ct++;
    r -= dirX; // Go on to next square in this direction.
    c -= dirY;
    win_r2 = r + dirX;
    win_c2 = c + dirY;
    // At this point, (win_r1,win_c1) and (win_r2,win_c2) mark the endpoints
    // of the line of pieces belonging to the player.
    return ct;
    } // end count()
    public void paintComponent(Graphics g) {
    super.paintComponent(g); // Fill with background color, lightGray
    /* Draw a two-pixel black border around the edges of the canvas,
    and draw grid lines in darkGray. */
    g.setColor(Color.darkGray);
    for (int i = 1; i < 15; i++) {
    g.drawLine(1 + 15*i, 0, 1 + 15*i, getSize().height);
    g.drawLine(0, 1 + 15*i, getSize().width, 1 + 15*i);
    g.setColor(Color.black);
    g.drawRect(0,0,getSize().width-1,getSize().height-1);
    g.drawRect(1,1,getSize().width-3,getSize().height-3);
    /* Draw the pieces that are on the board. */
    for (int row = 0; row < 15; row++)
    for (int col = 0; col < 15; col++)
    if (board[row][col] != EMPTY)
    drawPiece(g, board[row][col], row, col);
    /* If the game has been won, then win_r1 >= 0. Draw a line to mark
    the five winning pieces. */
    if (win_r1 >= 0)
    drawWinLine(g);
    } // end paintComponent()
    private void drawPiece(Graphics g, int piece, int row, int col) {
    // Draw a piece in the square at (row,col). The color is specified
    // by the piece parameter, which should be either BLACK or WHITE.
    if (piece == WHITE)
    g.setColor(Color.white);
    else
    g.setColor(Color.black);
    g.fillOval(3 + 15*col, 3 + 15*row, 10, 10);
    private void drawWinLine(Graphics g) {
    // Draw a 2-pixel wide red line from the middle of the square at
    // (win_r1,win_c1) to the middle of the square at (win_r2,win_c2).
    // This routine is called to mark the 5 pieces that won the game.
    // The values of the variables are set in the count() method.
    g.setColor(Color.red);
    g.drawLine( 8 + 15*win_c1, 8 + 15*win_r1, 8 + 15*win_c2, 8 + 15*win_r2 );
    if (win_r1 == win_r2)
    g.drawLine( 8 + 15*win_c1, 7 + 15*win_r1, 8 + 15*win_c2, 7 + 15*win_r2 );
    else
    g.drawLine( 7 + 15*win_c1, 8 + 15*win_r1, 7 + 15*win_c2, 8 + 15*win_r2 );
    public Dimension getPreferredSize() {
    // Specify desired size for this component. Note:
    // the size MUST be 172 by 172.
    return new Dimension(220, 220);
    public Dimension getMinimumSize() {
    return new Dimension(220, 220);
    public Dimension getMaximumSize() {
    return new Dimension(220, 220);
    public void mousePressed(MouseEvent evt) {
    // Respond to a user click on the board. If no game is
    // in progress, show an error message. Otherwise, find
    // the row and column that the user clicked and call
    // doClickSquare() to handle it.
    if (gameInProgress == false)
    message.setText("Click \"New Game\" to start a new game.");
    else {
    int col = (evt.getX() - 2) / 15;
    int row = (evt.getY() - 2) / 15;
    if (col >= 0 && col < 15 && row >= 0 && row < 15)
    doClickSquare(row,col);
    public void mouseReleased(MouseEvent evt) { }
    public void mouseClicked(MouseEvent evt) { }
    public void mouseEntered(MouseEvent evt) { }
    public void mouseExited(MouseEvent evt) { }
    } // end nested class Board
    } // end class GoMoku

    And doesn't work for me:
    init:
    deps-jar:
    Compiling 1 source file to C:\jdek\Prova\build\classes
    C:\jdek\Prova\src\gugi\GoMoku1.java:189: incomparable types: int[] and int
    if (board[j] == EMPTY)
    1 error
    BUILD FAILED (total time: 0 seconds)

  • Can i show 10,000 of rows in jtable

    hello,
    can i show 10,000 (>10,000) of rows of data (from databases)in jtable at time.
    thanks
    daya

    if you want to increase the memory, you have to start a new JVM. This is the way I have always maximized the memory:
    public static void main(String[] args)
            try
              if(Runtime.getRuntime().maxMemory() < 64*1024*1024) //64 megabytes ; I think the default is about 32 ?
                   Process p = Runtime.getRuntime().exec(new String[]{"java","-Xmx512m","-Xms512m",getClass().getName()}); //512 megabytes; however much you want, just watch your greed =D
                   new ThreadGobbler(p); //defined below
                   return;
         }catch(IOException e) { e.printStackTrace();}
            // now start your usual main() ...
    }what that snippet of code does is check to make sure you have at least 64 megabytes of memory. If you do not, the program re-runs with the specified args - the Xmx sets the max memory, and Xms sets the min memory (I think...). Not quite sure what the differences are, but it works =D
    anyway, the thread gobbler is used just to redirect output and input to the default System.out and System.err. If you do not need to redirect, just delete/comment out the line above. (I don't know if this is the most elegant way to do it because lines are lost if the streams madly flush data, but...)
    class ThreadGobbler
         private Process process;
         private BufferedReader std, error;
         public ThreadGobbler(Process toDo)
              process = toDo;
              std = new BufferedReader(new InputStreamReader(process.getInputStream()));
              error = new BufferedReader(new InputStreamReader(process.getErrorStream()));
              new Thread()
                   public void run()
                        try{
                             checkError();
                        catch(IOException e){
                             System.err.println("Error in error reading.");
                             System.exit(1);
              }.start();
              new Thread()
                   public void run()
                        try{
                             checkStd();
                        catch(IOException e){
                             System.err.println("Error in std reading.");
                             System.exit(1);
              }.start();
         public void checkError() throws IOException
              String error;
              while((error = this.error.readLine())!=null)
                   System.err.println(error);
         public void checkStd() throws IOException
              String std;
              while((std = this.std.readLine())!=null)
                   System.out.println(std);
    }Hope that helps! If you have any questions, just reply =D
    Alex

  • How can i display the result of java class in InputText ?

    Hi all,
    How can i get the result of java class to InputText Or OutputText ???
    also can every one in the forum give me road map for dealing with java in oracle adf because i'm beginner in oracle adf
    i saw some samples in oracle adf corner but it's difficult for me.

    User,
    Always mention your JDev version, technologies used and clear usecase description (read through this announcement : https://forums.oracle.com/forums/ann.jspa?annID=56)
    How can i get the result of java class to InputText Or OutputText ???Can you elaborate on your requirement? Do you mean the return value of a method in a class as output text? Or an attribute in your class (bean?) as text field?
    -Arun

  • I want to show console output in my cmd prompt in C# winform application

    Hi,
    I'm launching the some process in C# .net Winform appliaction. But i couldn't able to see console output on the screen. The process is getting launched but inside cmd prompt window, it is showing nothing. I would like to show something on cmd prompt. Please
    help on this.
     using (Process comxdcProcess = new System.Diagnostics.Process())
                            comxdcProcess.StartInfo.FileName = fileName;
                            comxdcProcess.StartInfo.Arguments = args;
                            comxdcProcess.StartInfo.RedirectStandardError = true;
                            comxdcProcess.StartInfo.RedirectStandardOutput = true;
                            comxdcProcess.StartInfo.UseShellExecute = false;
                            comxdcProcess.Start();
                            this.errorComment = comxdcProcess.StandardError.ReadToEnd();
                            StreamReader myStreamReader = comxdcProcess.StandardOutput;
                            //// Read the standard output of the spawned process. 
                            this.errorComment = myStreamReader.ReadToEnd();
                            comxdcProcess.WaitForExit();
    click "Proposed As Answer by" if this post solves your problem or "Vote As Helpful" if a post has been useful to you Happy Programming! Hari

    @Hariprasadbrk
    Do you mean you have use process class to start "cmd prompt" And want to display some output in it?
    If so, there is no need to use RedirectStandardOutput property. This property means the output of an application is written to the
    Process.StandardOutput stream.
    // Setup the process with the ProcessStartInfo class.
    ProcessStartInfo start = new ProcessStartInfo();
    start.FileName = @"C:\7za.exe"; // Specify exe name not cmd exe.
    start.UseShellExecute = false;
    start.RedirectStandardOutput = true;
    // Start the process.
    using (Process process = Process.Start(start))
    // Read in all the text from the process with the StreamReader.
    using (StreamReader reader = process.StandardOutput)
    string result = reader.ReadToEnd();
    Console.Write(result);
    Output
    This section shows the output of the process.
    7-Zip (A) 4.60 beta Copyright (c) 1999-2008 Igor Pavlov 2008-08-19
    Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]
    [<@listfiles...>]
    So you can start a cmd exe.
    Please also take a look at the article from codeproject
    How to redirect Standard Input/Output of an application
    In summary, the shutdown proces is invoked from my application, and it displays the output from the process in RichTextBox control.
    Have a nice day!
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can't get 1080p output to TV in windows 7 under bootcamp

    I have no problems using my 40in Samsung LN610 1080p TV as extension of my Snow Leopard desktop (though it was rather tricky to get it running). However, I can NOT get 1080p output in windows 7 under bootcamp.
    In detail, when I use TV as an extension of the desktop, TV shows no HDMI signal coming in if I try to use 1080p or 1080i output (using NVIDIA panel or standard win7 properties panel). However, when I drop the output to 720p then the signal gets through and TV displays 720p just fine.
    I hope I explained it clearly engough. Please let me know if you are having the same trouble or if you know of a solution. I'm using the latest bootcamp drivers.
    I have Macbook Pro 13in 2.53GHz, 9400m, 4GIG RAM, mid 2009 unibody model.

    This problem is not a problem with Windows or Apple. It has to do with when the updates are applied to Windows boot camp. The way to fix this is as follows. First click on the bluetooth icon from the Windows start page. Then click show bluetooth items. From this window click add a new device. When the device appears double click on the icon for the device. A window should appear that at the top says general and other. Click on the other tab and another window comes up with a small box in it. Check the box and Windows will search and install the exact, correct drivers for the device. Now the device will pair and work fine.

  • How to run the report and show the output in excel file

    salam
    how to run the report and show the output in excel file,
    how to run the report and print the o/p via printer
    how to run the report and send the o/p via mail
    thank u all

    Hi,
    There are Parameters DESTTYPE, DESFORMAT and DESNAME. You can set these parameters to get as you want.
    1) Output in Excel File
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'FILE');
         ADD_PARAMETER(PL_ID, 'DESFORMAT', TEXT_PARAMETER, 'DELIMITED');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<file_name>.XLS');2) output to printer
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'PRINTER');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<printer_name>');3) Email - Have to configure SMTP and all. ( i didn't checked it)
         ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'MAIL');
         ADD_PARAMETER(PL_ID, 'DESNAME', TEXT_PARAMETER, '<email_id>');Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • How to capture output of java files using Runtime.exec

    Hi guys,
    I'm trying to capture output of java files using Runtime.exec but I don't know how. I keep receiving error message "java.lang.NoClassDefFoundError:" but I don't know how to :(
    import java.io.*;
    public class CmdExec {
      public CmdExec() {
      public static void main(String argv[]){
         try {
         String line;
         Runtime rt = Runtime.getRuntime();
         String[] cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E.java";
         Process proc = rt.exec(cmd);
         cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E";
         proc = rt.exec(cmd);
         //BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
         BufferedReader input = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
         while ((line = input.readLine()) != null) {
            System.out.println(line);
         input.close();
        catch (Exception err) {
         err.printStackTrace();
    public class E {
        public static void main(String[] args) {
            System.out.println("hello world!!!!");
    }Please help :)

    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • Dynamic-side Box? Can't read source code with java

    Hi all,
    I am trying to read a source code of a web page with a java program. I can connect to the page and read a part of the source code without any problems however after a while when it comes to a part where mozilla and opera identifies as "dynamic-side box" my java program fails to read the source code and stops reading the rest of the page.
    Here is the part of the output I get from mozilla:
    <body id="city">
              <script type="text/javascript" src="/js/wz_tooltip.js"></script>
              <div id="container">
                   <div id="container2">
                        <div id="header">
                             <h1>Ikariam</h1>
                             <h2>Antik �a&#287;&#305; Ya&#351;a!</h2>
                        </div>
    <div id="breadcrumbs"><h3>Bulundu&#287;un nokta:</h3><a href="?view=worldmap_iso&islandX=78&islandY=80" title="D�nya haritas&#305;na d�n"><img src="skin/layout/icon-world.gif" alt="D�nya" /></a> > <a href="?view=island&id=2444" class="island" title="Adaya d�n">Sterios[78:80]</a> > <span class="city">ProPolis</span></div><!-- -------------------------------------------------------------------------------------
         ///////////////////////////// dynamic side-boxes. //////////////////////////////////
         //////////////////////////////////////////////////////////////////////////////////// -->
         <div id="information" class="dynamic">
              <h3 class="header">Info</h3>
              <div class="content">And here is the corresponding part in java console output:
    <div id="breadcrumbs">
        <h3>Bulundu&#287;un nokta:</h3>
         <span class="textLabel">Hata!</span>
    </div>
    <div id="information" class="dynamic"></div>
    <div id="mainview">
        <div class="buildingDescription">
            <h1>Hata!</h1>
        </div>
        <div class="contentBox01h">
            <h3 class="header"><span class="textLabel">Hata mesaj&#305;</span></h3>
            <div class="content">
                <ul class="h�bsch">
    <li><a href="http://ikariam.net"></a></li>            </ul>
            </div><!-- end #content -->
            <div class="footer"></div>
        </div><!-- end #contentbox -->
    </div><!-- end #mainview -->Is there a way to skip this dynamic-side boxes in java. Because I need to read an information that is located at the near end of the source code however since it stops when it hits to a dynamic-side box I can't.
    Thanks in advance, regards...

    Hi,
    That is what I was trying in deed! I was trying with a Scanner but I also tried with the link you have given. That also failed. Somehow java stops reading the source when it hits "dynamic-side box". However there has to be a way to skip this. If mozilla can do that, I know that java also can. I wonder how....
    Cheers...

  • EEM variable for show command output and create a filename

    I'm configuring EEM applet, example CPU High event. When it triggers the event, action is "show tech | redirect tftp://x.x.x.x/showtechoutput". The EEM event is working fine and triggered the show tech output into the tftp server. My question is, i'd like to add maybe date/time in the filename so it will not overwrite the file everytime there is a triggered event.
    The EEM event variable i'm seeing in doc is "_event_pub_sec" but it won't work when i add after or before the filename. any idea?
    thanks in advance ...

    Adding $_event_pub_sec to the end of the filename should work:
    action 1.0 "show tech | redirect tftp://x.x.x.x/showtech.$_event_pub_sec"
    That said, TFTP is very particular about how files can be created.  Typically, a TFTP server will require the file to exist before a remote host can copy to it.  If the filename changes each second, this will not work.  Using a protocol like FTP or SCP may work better.

  • How i can make  my own connection in java source of a jsp page

    How i can make my own connection in java source of a jsp page (How to get connection from JNDI datasource address) ?
    imagine that i have a rowset in a web page , now i want to do some operation using
    plain JDBC , so i will need a connection object.
    I tried to get one of my rowsets connection but it return null ?
    what is best way to retrive a connection from JNDI datasource that we define for our project?
    for example if i have
    myRowSet.setDataSourceName("java:comp/env/jdbc/be");
    in web page constructor
    now i want a pure connection from the same datasource ? JNDI
    Thank you

    It is not hard to get your own connection from datasource.
    in your case you need to do like the the following code.
    i provide sample to show you how to catch the exception and create an statement .
    Connection con =null;
    try{
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/be");
    con = ds.getConnection();
    java.sql.Statement st =con.createStatement();
    }catch(SQLException sqlex){
    sqlex.printStackTrace();
    sqlex.getNextException().printStackTrace();
    catch(NamingException nex){
    nex.printStackTrace();
    hth
    Masoud kalali

  • How to run and displaying output of java file in jsp page ???

    Hai,
    I am going to develop a website which would have everything about java.
    Example code displayed for all methods.Next to every Example i shoud have *"Run"* button.
    Click at Run button should compile the example and show the output or even error.
    Ex:If the user clicks the vector link then all the examples will be shown..
    import java.util.*;
    etc...
    Run button-onclick it shoud compile the code above and shoud show the output....
    I don't know how to get the console error and output..
    kindly help me out....Thanks.

    Check java.lang.Runtime API.

  • Output from java class and display

    I have a big output from a java class after executing a java class... where can store that huge output before I <cflocation to the same page? I need to display the output to the user on the relocated page...Any help appreciated...

    cfsavecontent to a session variable.

Maybe you are looking for

  • HP Laserjet PRO 200 - Colour MFP M276n | Forward Fax to Email

    Hi! I can't understand why it isn't possibile to forward a fax to a list of email address instead of print them (or forward the fax to another number), it could really save a lot of paper, also because the printer can already send a scan to an email

  • How can I batch Save For Web and maintain a multilevel folder structure?

    First... I am using an old version of Photoshop.... 6.0 to be exact.  If your answer is to buy the newer versions, I respectfully say I know that's AN answer, but I'm looking for something that will work with my setup.  The version we have works just

  • "Move focus to next window" shortcut in full screen mode

    Does anyone know how to use the "Move focus to next window" sortcut when in "full screen" mode? When using a smaller screen (Macbook Air) full screen mode is a nice idea but I keep turning it off becauase the normal shortcut doesn't work. Any pointer

  • Write Out a DOM as an XML File in "pretty format"

    Hi all, I am using javax.xml.transform.Transformer to Write Out a DOM as an XML File. (URL: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPXSLT4.html) It runs very well but in the XML output, it is not "format". I means, for example, there are a

  • IPhone + more than one computer.

    Why is it that my friends can come over with their iPod nanos and drag and drop all of my music into their iPods perfectly fine, but when I go to their house I can't do the same with me iPhone? I payed more for my iPhone than they did for their iPods