Help with ftp upload problem

Hi I am using a ftp class (known as FTPConnection) that i found on this site: http://www.nsftools.com/tips/JavaFtp.htm , and they only have an example of how to download a File through FTP and not upload one. I am in the proccess of making an FTP upload applet, and need some help on getting upload to work. I also need it to work on both a Pc and mac, so that may be attributing to the problem becuase i am currently on a mac which uses file:// instead of C:\\. Ill post the ftp class, and a snippet of my code that tries to upload a selected file.
FTPConnection
/* <!-- in case someone opens this in a browser... --> <pre> */
* File:   FTPConnection.java
* Author: Bret Taylor <[email protected]>
* URL: http://www.stanford.edu/~bstaylor/cs/ftpconnection/FTPConnection.java.shtml
* see also <a href="http://www.nsftools.com/tips/JavaFtp.htm">http://www.nsftools.com/tips/JavaFtp.htm</a>
* $Id$
* Parts of this code were adopted from a variety of other FTP classes the
* author has encountered that he was not completely satisfied with.  If you
* think more thanks are due to any particular author than is given, please
* let him know.  With that caveat, this class can be freely distributed and
* modified as long as Bret Taylor is given credit in the source code comments.
* Modified by Julian Robichaux -- http://www.nsftools.com
* Added constructors, logout(), listFiles(), listSubdirectories(), getAndParseDirList(),
* processFileListCommand(), and overloaded getFullServerReply().
* Also added StringBuffer parameter options to transferData() and executeDataCommand()
* and did a few other little things.
import java.io.*;
import java.net.*;
import java.util.*;
* <p>A wrapper for the network and command protocols needed for the most common
* FTP commands.  Standard usage looks something like this:</p>
* <pre> FTPConnection connection = new FTPConnection();
* try {
*     if (connection.connect(host)) {
*         if (connection.login(username, password)) {
*             connection.downloadFile(serverFileName);
*             connection.uploadFile(localFileName);
*         connection.disconnect();
* } catch (UnknownHostException e) {
*     // handle unknown host
* } catch (IOException e) {
*     // handle I/O exception
* }</pre>
* <p>Most FTP commands are wrapped by easy-to-use methods, but in case clients
* need more flexibility, you can execute commands directly using the methods
* <a href="#executeCommand(java.lang.String)">executeCommand</a> and
* <a href="#executeDataCommand(java.lang.String,
* java.io.OutputStream)">executeDataCommand</a>,
* the latter of which is used for commands that require an open data port.</p>
* @author Bret Taylor
* @author Julian Robichaux
* @version 1.01
public class FTPConnection extends Object {
     * If this flag is on, we print out debugging information to stdout during
     * execution.  Useful for debugging the FTP class and seeing the server's
     * responses directly.
    private static boolean PRINT_DEBUG_INFO = false;
     * The socket through which we are connected to the FTP server.
    private Socket connectionSocket = null;
     private String username;
     private String password;
     private String host;
     * The socket output stream.
    private PrintStream outputStream = null;
     * The socket input stream.
    private BufferedReader inputStream = null;
     * The offset at which we resume a file transfer.
    private long restartPoint = 0L;
     * Added by Julian: If this flag is on, we're currently logged in to something.
    private boolean loggedIn = false;
     * Added by Julian: This is the line terminator to use for multi-line responses.
    public String lineTerm = "\n";
     * Added by Julian: This is the size of the data blocks we use for transferring
     * files.
    private static int BLOCK_SIZE = 4096;
     * Added by Julian: After you create an FTPConnection object, you will call the
     * connect() and login() methods to access your server. Please don't forget to
     * logout() and disconnect() when you're done (it's only polite...).
    public FTPConnection ()
         // default constructor (obviously) -- this is just good to have...
     * Added by Julian: Allows you to specify if you want to send debug output to
     * the console (true if you do, false if you don't).
    public FTPConnection (boolean debugOut)
         PRINT_DEBUG_INFO = debugOut;
     public FTPConnection (String user, String pw, String host_)
         username=user;
          password=pw;
          host=host_;
          PRINT_DEBUG_INFO = false;
     * Prints debugging information to stdout if the private flag
     * <code>PRINT_DEBUG_INFO</code> is turned on.
    private void debugPrint(String message) {
        if (PRINT_DEBUG_INFO) System.err.println(message);
     * Connects to the given FTP host on port f, the default FTP port.
    public boolean connect(String host)
        throws UnknownHostException, IOException
        return connect(host, 21);
     * Connects to the given FTP host on the given port.
    public boolean connect(String host, int port)
        throws UnknownHostException, IOException
        connectionSocket = new Socket(host, port);
          connectionSocket.setSoTimeout(10000);
        outputStream = new PrintStream(connectionSocket.getOutputStream());
        inputStream = new BufferedReader(new
                       InputStreamReader(connectionSocket.getInputStream()));
        if (!isPositiveCompleteResponse(getServerReply())){
            disconnect();
            return false;
        return true;
     * Disconnects from the host to which we are currently connected.
     static boolean URLexists(String URLName)
          try
               HttpURLConnection.setFollowRedirects(false);
               // note : you may also need
               // HttpURLConnection.setInstanceFollowRedirects(false)
               HttpURLConnection con =
               (HttpURLConnection) new URL(URLName).openConnection();
               con.setRequestMethod("HEAD");
               return (con.getResponseCode() == HttpURLConnection.HTTP_OK);
          catch (Exception e)
               e.printStackTrace();
               return false;
     public String getSimpleFileName(File f)
          String path=f.getPath();
          String fileName=path.replace("\\", "/");
          int slashPos = fileName.lastIndexOf("/");
          fileName=fileName.substring(slashPos+1);
          return fileName;
     public String verifyFileName(String name)
          int count=0;
          //String url="http://chris-malcolm.com/images/"+URLEncoder.encode(name).replace("+", "%20");
          while (URLexists("http://chris-malcolm.com/images/"+URLEncoder.encode(name).replace("+", "%20"))==true)
          count++;
          name=FileExt(name)[0]+"-"+count+"."+FileExt(name)[1];
          return name;
     public String[] FileExt(String fileName)
        int dotPos = fileName.lastIndexOf(".");
          fileName=fileName.replace("\\", "/");
          int slashPos = fileName.lastIndexOf("/");
          String extension, name;
          if (slashPos==fileName.length()-1)
               fileName=fileName.substring(0, fileName.length()-1);
               slashPos=fileName.lastIndexOf("/");
               extension="/";
               name=fileName.substring(slashPos+1);
          else if(dotPos==-1)
               name=fileName.substring(slashPos+1);
               extension="";
          else
               extension = fileName.substring(dotPos+1);
               name=fileName.substring(slashPos+1, dotPos);
               String[] output={name, extension};
               return output;
          String[] output={name, extension};
          return output;
    public void disconnect()
        if (outputStream != null) {
            try {
                  if (loggedIn) { logout(); };
                outputStream.close();
                inputStream.close();
                connectionSocket.close();
            } catch (IOException e) {}
            outputStream = null;
            inputStream = null;
            connectionSocket = null;
     * Wrapper for the commands <code>user [username]</code> and <code>pass
     * [password]</code>.
    public boolean login(String username, String password)
        throws IOException
        int response = executeCommand("user " + username);
        if (!isPositiveIntermediateResponse(response)) return false;
        response = executeCommand("pass " + password);
        loggedIn = isPositiveCompleteResponse(response);
        return loggedIn;
     * Added by Julian: Logout before you disconnect (this is good form).
    public boolean logout()
        throws IOException
        int response = executeCommand("quit");
        loggedIn = !isPositiveCompleteResponse(response);
        return !loggedIn;
     * Wrapper for the command <code>cwd [directory]</code>.
    public boolean changeDirectory(String directory)
        throws IOException
        int response = executeCommand("cwd " + directory);
        return isPositiveCompleteResponse(response);
     * Wrapper for the commands <code>rnfr [oldName]</code> and <code>rnto
     * [newName]</code>.
    public boolean renameFile(String oldName, String newName)
        throws IOException
        int response = executeCommand("rnfr " + oldName);
        if (!isPositiveIntermediateResponse(response)) return false;
        response = executeCommand("rnto " + newName);
        return isPositiveCompleteResponse(response);
     * Wrapper for the command <code>mkd [directory]</code>.
    public boolean makeDirectory(String directory)
        throws IOException
        int response = executeCommand("mkd " + directory);
        return isPositiveCompleteResponse(response);
     * Wrapper for the command <code>rmd [directory]</code>.
    public boolean removeDirectory(String directory)
        throws IOException
        int response = executeCommand("rmd " + directory);
        return isPositiveCompleteResponse(response);
     * Wrapper for the command <code>cdup</code>.
    public boolean parentDirectory()
        throws IOException
        int response = executeCommand("cdup");
        return isPositiveCompleteResponse(response);
     * Wrapper for the command <code>dele [fileName]</code>.
    public boolean deleteFile(String fileName)
        throws IOException
        int response = executeCommand("dele " + fileName);
        return isPositiveCompleteResponse(response);
     * Wrapper for the command <code>pwd</code>.
    public String getCurrentDirectory()
        throws IOException
        String response = getExecutionResponse("pwd");
        StringTokenizer strtok = new StringTokenizer(response);
        // Get rid of the first token, which is the return code
        if (strtok.countTokens() < 2) return null;
        strtok.nextToken();
        String directoryName = strtok.nextToken();
        // Most servers surround the directory name with quotation marks
        int strlen = directoryName.length();
        if (strlen == 0) return null;
        if (directoryName.charAt(0) == '\"') {
            directoryName = directoryName.substring(1);
            strlen--;
        if (directoryName.charAt(strlen - 1) == '\"')
            return directoryName.substring(0, strlen - 1);
        return directoryName;
     * Wrapper for the command <code>syst</code>.
    public String getSystemType()
        throws IOException
        return excludeCode(getExecutionResponse("syst"));
     * Wrapper for the command <code>mdtm [fileName]</code>.  If the file does
     * not exist, we return -1;
    public long getModificationTime(String fileName)
        throws IOException
        String response = excludeCode(getExecutionResponse("mdtm " + fileName));
        try {
            return Long.parseLong(response);
        } catch (Exception e) {
            return -1L;
     * Wrapper for the command <code>size [fileName]</code>.  If the file does
     * not exist, we return -1;
    public long getFileSize(String fileName)
        throws IOException
        String response = excludeCode(getExecutionResponse("size " + fileName));
        try {
            return Long.parseLong(response);
        } catch (Exception e) {
            return -1L;
     * Wrapper for the command <code>retr [fileName]</code>.
    public boolean downloadFile(String fileName)
        throws IOException
        return readDataToFile("retr " + fileName, fileName);
     * Wrapper for the command <code>retr [serverPath]</code>. The local file
     * path to which we will write is given by <code>localPath</code>.
    public boolean downloadFile(String serverPath, String localPath)
        throws IOException
        return readDataToFile("retr " + serverPath, localPath);
     * Wrapper for the command <code>stor [fileName]</code>.
    public boolean uploadFile(String fileName)
        throws IOException
        return writeDataFromFile("stor " + fileName, fileName);
     * Wrapper for the command <code>stor [localPath]</code>. The server file
     * path to which we will write is given by <code>serverPath</code>.
    public boolean uploadFile(String serverPath, String localPath)
        throws IOException
        return writeDataFromFile("stor " + serverPath, localPath);
     * Set the restart point for the next download or upload operation.  This
     * lets clients resume interrupted uploads or downloads.
    public void setRestartPoint(int point)
        restartPoint = point;
        debugPrint("Restart noted");
     * Gets server reply code from the control port after an ftp command has
     * been executed.  It knows the last line of the response because it begins
     * with a 3 digit number and a space, (a dash instead of a space would be a
     * continuation).
    private int getServerReply()
        throws IOException
        return Integer.parseInt(getFullServerReply().substring(0, 3));
     * Gets server reply string from the control port after an ftp command has
     * been executed.  This consists only of the last line of the response,
     * and only the part after the response code.
    private String getFullServerReply()
        throws IOException
        String reply;
        do {
            reply = inputStream.readLine();
            debugPrint(reply);
        } while(!(Character.isDigit(reply.charAt(0)) &&
                  Character.isDigit(reply.charAt(1)) &&
                  Character.isDigit(reply.charAt(2)) &&
                  reply.charAt(3) == ' '));
        return reply;
     * Added by Julian: Returns the last line of the server reply, but also
     * returns the full multi-line reply in a StringBuffer parameter.
    private String getFullServerReply(StringBuffer fullReply)
         throws IOException
        String reply;
        fullReply.setLength(0);
        do {
            reply = inputStream.readLine();
            debugPrint(reply);
            fullReply.append(reply + lineTerm);
        } while(!(Character.isDigit(reply.charAt(0)) &&
                  Character.isDigit(reply.charAt(1)) &&
                  Character.isDigit(reply.charAt(2)) &&
                  reply.charAt(3) == ' '));
          // remove any trailing line terminators from the fullReply
          if (fullReply.length() > 0) 
               fullReply.setLength(fullReply.length() - lineTerm.length());
        return reply;
     * Added by Julian: Gets a list of files in the current directory.
     public String listFiles()
          throws IOException
          return listFiles("");
     * Added by Julian: Gets a list of files in either the current
     * directory, or one specified as a parameter. The 'params' parameter
     * can be either a directory name, a file mask, or both (such as
     * '/DirName/*.txt').
     public String listFiles(String params)
          throws IOException
          StringBuffer files = new StringBuffer();
          StringBuffer dirs = new StringBuffer();
          if (!getAndParseDirList(params, files, dirs))
               debugPrint("Error getting file list");
          return files.toString();
     * Added by Julian: Gets a list of subdirectories in the current directory.
     public String listSubdirectories()
          throws IOException
          return listSubdirectories("");
     * Added by Julian: Gets a list of subdirectories in either the current
     * directory, or one specified as a parameter. The 'params' parameter
     * can be either a directory name, a name mask, or both (such as
     * '/DirName/Sub*').
     public String listSubdirectories(String params)
          throws IOException
          StringBuffer files = new StringBuffer();
          StringBuffer dirs = new StringBuffer();
          if (!getAndParseDirList(params, files, dirs))
               debugPrint("Error getting dir list");
          return dirs.toString();
     * Added by Julian: Sends and gets the results of a file list command,
     * like LIST or NLST.
    private String processFileListCommand(String command)
        throws IOException
        StringBuffer reply = new StringBuffer();
        String replyString;
        // file listings require you to issue a PORT command,
        // like a file transfer
          boolean success = executeDataCommand(command, reply);
          if (!success)
               return "";
        replyString = reply.toString();
        // strip the trailing line terminator from the reply
        if (reply.length() > 0)
             return replyString.substring(0, reply.length() - 1);
        }  else  {
             return replyString;
      * Added by Julian: Gets a directory list from the server and parses
      * the elements into a list of files and a list of subdirectories.
     private boolean getAndParseDirList(String params, StringBuffer files, StringBuffer dirs)
          throws IOException
          // reset the return variables (we're using StringBuffers instead of
          // Strings because you can't change a String value and pass it back
          // to the calling routine -- changing a String creates a new object)
          files.setLength(0);
          dirs.setLength(0);
          // get the NLST and the LIST -- don't worry if the commands
          // don't work, because we'll just end up sending nothing back
          // if that's the case
          String shortList = processFileListCommand("nlst " + params);
          String longList = processFileListCommand("list " + params);
          // tokenize the lists we got, using a newline as a separator
          StringTokenizer sList = new StringTokenizer(shortList, "\n");
          StringTokenizer lList = new StringTokenizer(longList, "\n");
          // other variables we'll need
          String sString;
          String lString;
          // assume that both lists have the same number of elements
          while ((sList.hasMoreTokens()) && (lList.hasMoreTokens())) {
               sString = sList.nextToken();
               lString = lList.nextToken();
               if (lString.length() > 0)
                    if (lString.startsWith("d"))
                         dirs.append(sString.trim() + lineTerm);
                         debugPrint("Dir: " + sString);
                    }  else if (lString.startsWith("-"))  {
                         files.append(sString.trim() + lineTerm);
                         debugPrint("File: " + sString);
                    }  else  {
                         // actually, symbolic links will start with an "l"
                         // (lowercase L), but we're not going to mess with
                         // those
                         debugPrint("Unknown: " + lString);
          // strip off any trailing line terminators and return the values
          if (files.length() > 0)  {  files.setLength(files.length() - lineTerm.length());  }
          if (dirs.length() > 0)  {  dirs.setLength(dirs.length() - lineTerm.length());  }
          return true;
     * Executes the given FTP command on our current connection, returning the
     * three digit response code from the server.  This method only works for
     * commands that do not require an additional data port.
    public int executeCommand(String command)
        throws IOException
        outputStream.println(command);
        return getServerReply();
     * Executes the given FTP command on our current connection, returning the
     * last line of the server's response.  Useful for commands that return
     * one line of information.
    public String getExecutionResponse(String command)
        throws IOException
        outputStream.println(command);
        return getFullServerReply();
     * Executes the given ftpd command on the server and writes the results
     * returned on the data port to the file with the given name, returning true
     * if the server indicates that the operation was successful.
    public boolean readDataToFile(String command, String fileName)
        throws IOException
        // Open the local file
        RandomAccessFile outfile = new RandomAccessFile(fileName, "rw");
        // Do restart if desired
        if (restartPoint != 0) {
            debugPrint("Seeking to " + restartPoint);
            outfile.seek(restartPoint);
        // Convert the RandomAccessFile to an OutputStream
        FileOutputStream fileStream = new FileOutputStream(outfile.getFD());
        boolean success = executeDataCommand(command, fileStream);
        outfile.close();
        return success;
     * Executes the given ftpd command on the server and writes the contents
     * of the given file to the server on an opened data port, returning true
     * if the server indicates that the operation was successful.
    public boolean writeDataFromFile(String command, String fileName)
        throws IOException
        // Open the local file
        RandomAccessFile infile = new RandomAccessFile(fileName, "r");
        // Do restart if desired
        if (restartPoint != 0) {
            debugPrint("Seeking to " + restartPoint);
            infile.seek(restartPoint);
        // Convert the RandomAccessFile to an InputStream
        FileInputStream fileStream = new FileInputStream(infile.getFD());
        boolean success = executeDataCommand(command, fileStream);
        infile.close();
        return success;
     * Executes the given ftpd command on the server and writes the results
     * returned on the data port to the given OutputStream, returning true
     * if the server indicates that the operation was successful.
    public boolean executeDataCommand(String command, OutputStream out)
        throws IOException
        // Open a data socket on this computer
        ServerSocket serverSocket = new ServerSocket(0);
        if (!setupDataPort(command, serverSocket)) return false;
        Socket clientSocket = serverSocket.accept();
        // Transfer the data
        InputStream in = clientSocket.getInputStream();
        transferData(in, out);
        // Clean up the data structures
        in.close();
        clientSocket.close();
        serverSocket.close();
        return isPositiveCompleteResponse(getServerReply());   
     * Executes the given ftpd command on the server and writes the contents
     * of the given InputStream to the server on an opened data port, returning
     * true if the server indicates that the operation was successful.
    public boolean executeDataCommand(String command, InputStream in)
        throws IOException
        // Open a data socket on this computer
        ServerSocket serverSocket = new ServerSocket(0);
        if (!setupDataPort(command, serverSocket)) return false;
        Socket clientSocket = serverSocket.accept();
        // Transfer the data
        OutputStream out = clientSocket.getOutputStream();
        transferData(in, out);
        // Clean up the data structures
        out.close();
        clientSocket.close();
        serverSocket.close();
        return isPositiveCompleteResponse(getServerReply());   
     * Added by Julian: Executes the given ftpd command on the server
     * and writes the results returned on the data port to the given
     * StringBuffer, returning true if the server indicates that the
     * operation was successful.
    public boolean executeDataCommand(String command, StringBuffer sb)
        throws IOException
        // Open a data socket on this computer
        ServerSocket serverSocket = new ServerSocket(0);
        if (!setupDataPort(command, serverSocket)) return false;
        Socket clientSocket = serverSocket.accept();
        // Transfer the data
        InputStream in = clientSocket.getInputStream();
        transferData(in, sb);
        // Clean up the data structures
        in.close();
        clientSocket.close();
        serverSocket.close();
        return isPositiveCompleteResponse(getServerReply());   
     * Transfers the data from the given input stream to the given output
     * stream until we reach the end of the stream.
    private void transferData(InputStream in, OutputStream out)
        throws IOException
        byte b[] = new byte[BLOCK_SIZE];
        int amount;
        // Read the data into the file
        while ((amount = in.read(b)) > 0) {
            out.write(b, 0, amount);
     * Added by Julian: Transfers the data from the given input stream
     * to the given StringBuffer until we reach the end of the stream.
    private void transferData(InputStream in, StringBuffer sb)
        throws IOException
        byte b[] = new byte[BLOCK_SIZE];
        int amount;
        // Read the data into the StringBuffer
        while ((amount = in.read(b)) > 0) {
            sb.append(new String(b, 0, amount));
     * Executes the given ftpd command on the server and writes the results
     * returned on the data port to the given FilterOutputStream, returning true
     * if the server indicates that the operation was successful.
    private boolean setupDataPort(String command, ServerSocket serverSocket)
        throws IOException
        // Send our local data port to the server
        if (!openPort(serverSocket)) return false;
        // Set binary type transfer
        outputStream.println("type i");
        if (!isPositiveCompleteResponse(getServerReply())) {
            debugPrint("Could not set transfer type");
            return false;
        // If we have a restart point, send that information
        if (restartPoint != 0) {
            outputStream.println("rest " + restartPoint);
            restartPoint = 0;
            // TODO: Interpret server response here
            getServerReply();
        // Send the command
        outputStream.println(command);
        return isPositivePreliminaryResponse(getServerReply());
     * Get IP address and port number from serverSocket and send them via the
     * <code>port</code> command to the ftp server, returning true if we get a
     * valid response from the server, returning true if the server indicates
     * that the operation was successful.
    private boolean openPort(ServerSocket serverSocket)
        throws IOException
        int localport = serverSocket.getLocalPort();
        // get local ip address
        InetAddress inetaddress = serverSocket.getInetAddress();
        InetAddress localip;
        try {
            localip = inetaddress.getLocalHost();
        } catch(UnknownHostException e) {
            debugPrint("Can't get local host");
            return false;
        // get ip address in high byte order
        byte[] addrbytes = localip.getAddress();
        // tell server what port we are listening on
        short addrshorts[] = new short[4];
        // problem:  bytes greater than 127 are printed as negative numbers
        for(int i = 0; i <= 3; i++) {
            addrshorts[i] = addrbytes;
if (addrshorts[i] < 0)
addrshorts[i] += 256;
outputStream.println("port " + addrshorts[0] + "," + addrshorts[1] +
"," + addrshorts[2] + "," + addrshorts[3] + "," +
((localport & 0xff00) >> 8) + "," +
(localport & 0x00ff));
return isPositiveCompleteResponse(getServerReply());
* True if the given response code is in the 100-199 range.
private boolean isPositivePreliminaryResponse(int response)
return (response >= 100 && response < 200);
* True if the given response code is in the 300-399 range.
private boolean isPositiveIntermediateResponse(int response)
return (response >= 300 && response < 400);
* True if the given response code is in the 200-299 range.
private boolean isPositiveCompleteResponse(int response)
return (response >= 200 && response < 300);
* True if the given response code is in the 400-499 range.
private boolean isTransientNegativeResponse(int response)
return (response >= 400 && response < 500);
* True if the given response code is in the 500-5

ok i tried explaining th eproblem in the previous post, but i apologize if my explanation was poor. anyways, i tried to look into it further by doing a printStackTrace() and believe it may be a read error. here is my new updated snippet, and also a link to a screenshot ([click here for screenshot|http://img143.imageshack.us/my.php?image=picture4qr0.png]) of what the error looks like on my end. it seems like a socket is not being read, or maybe it is initialized properly. Again I apologize if my problem is vague, but I do appreciate your input. thanks.
updated code snippet
public void uploadFiles()
          statusLabel.setVisible(true);
          errorLabel.setVisible(true);
          uploadButton.setVisible(false);
          footer.setVisible(false);
          holdingPanel.setVisible(false);
          pbar.setVisible(true);
          pbar = new JProgressBar();
          pbar.setMinimum(0);
          float Total=0;
          for (int i=0; i<fileLengths.size(); i++)
               if(((java.lang.Boolean)model.getValueAt(i,1)).toString().equals("true"))
                    Total+=Float.parseFloat((String)fileLengths.get(i));
          pbar.setMaximum((int)Total);
          String info="";
          try
               ftp=new FTPConnection(false);
               ftp.connect("ftp.chris-malcolm.com");
               if (ftp.login("chrismal", "***"))
                    statusLabel.setText("Status: Connected.");
                    info+="Successfully logged in!\n";
                    info+="System type is: " + ftp.getSystemType()+"\n";
                    info+="Current directory is: " + ftp.getCurrentDirectory()+"\n";
                    if (ftp.changeDirectory("/www/images/"))
                         info+="directory changed to: " + ftp.getCurrentDirectory()+"\n";
                                             try
                         for (int i=0; i<allFiles.size(); i++)
                              if(((java.lang.Boolean)model.getValueAt(i,1)).toString().equals("true"))
                                   String f=client.verifyFileName((String)model.getValueAt(i,0));
                                   String f2=""+((File)allFiles.get(i)).getPath();
                                   info+="filename: "+f2+"\n";
                                   if (ftp.uploadFile(f2))
                                        statusLabel.setText("Status: Uploading "+f+" - "+i+" of "+calculateTotalFiles()+" files(s)");
                                        pbar.setValue(Integer.parseInt((String)fileLengths.get(i)));
                                   else
                                        errorLabel.setText("Error occured while uploading"+f2+"\n");
                    catch(Exception de) 
                         StringWriter sw = new StringWriter();
                              PrintWriter pw = new PrintWriter(sw);
                              de.printStackTrace(pw);
                              pw.close();
                              //errorLabel.setText("<html>ERROR:"+sw.toString().replace("\n", "<br>")+"</html>");
                              info+="Error: "+de.getMessage()+"\n";
                              info+="Trace: "+sw+"\n";
                         try { ftp.disconnect(); statusLabel.setText("Status: disconnected.");}  catch(Exception e2)  {};
                    else
                         info+="could not change directory\n";
               else
                    info+="could not login";
          catch (Exception e)
               StringWriter sw = new StringWriter();
                              PrintWriter pw = new PrintWriter(sw);
                              e.printStackTrace(pw);
                              pw.close();
                              info+="Error: "+e.getMessage()+"\n";
                              info+="Trace: "+sw+"\n";
               try { ftp.disconnect();  statusLabel.setText("Status: disconnected.");}  catch(Exception e2)  {};
          errorLabel.setText("ERROR:"+info);
          JOptionPane.showMessageDialog(this, info, "test", JOptionPane.PLAIN_MESSAGE);
          try { ftp.disconnect(); statusLabel.setText("Status: disconnected.");}  catch(Exception e2)  {};
     Edited by: cjm771 on Jul 13, 2008 7:23 PM

Similar Messages

  • Problems With FTP Upload in Leopard 10.5.3-4

    Hi, I experience a strange problem with ftp upload speed in 10.5.3-4. When I start upload a file to my trusted ftp server the upload speed starts to decrease from 300 kb/sec to 35 -40 kb/sec. It remains normal for 1-2 minutes (about 300 kb/sec) and then smoothly decreases to 35 -40 kb/sec. Pressing Stop and then Resume in Cyberduck makes speed normal for 1-2 minutes and then it starts to decrease again. It does not depend on ftp-client, it does not matter if I use either Cyberduck, Transmit or Fetch. It happens if I use either ethernet or airport connection. I have my old Powerbook with 10.4.11, it's connected to the same router with the same settings and the same time upload speed remains stable about 300 kb/sec.
    But when I transfer files from my Macbook to my old Powerbook via ftp everything is fine. And when I transfer files to ftp server of my local ISP it's also fine.
    Please, help me, I have to upload big 100 Mb files very often and it's significant difference for me 30 or 300 kb/sec
    Boris

    I'm afraid it's not just the Duck or FTP, Boris....It's many many Apps...and protocols... 10.5 appears to have ;broken',a number of file transfer protocols and Apps... (Wired and KDX are two that come to mind- precisely the same symptoms, AND some others) Apple's own 'built-in' FTP appears OK Mac-Mac, oddly enough.
    There's obviously some kind of weird Copy-Paste problem too.
    It's obviously 'fixable' or a workaround is available because several s/w mobs have released 'fixes for 10.5 file transfer Bug'
    The rest of us will just have to wait while another unannounced,unacknowledged, gaping hole in the Mac OS is quietly fixed and our expensive s/w sits unusable...
    Not really good enough, is it ?
    Like: Not being able to automatically detect a part file transfer on FTP and Auto-resume from whence you left off: something we thought was pretty cool- back in about 1984.... and absolutely essential in 86 or so.
    Boris:You will almost certainly find that it happens whatever the client-server server setup and applications or Medium... I've seen precisely what you describe happen with Airport, Cable, 10/100/1000' local' LAN...
    - and watching your throughput drop from 300K to 300 BYTES/Sec is NO FUN.
    I've spent a lot of time and money convincing potential 'Switchers' of the superiority of the Mac way over the last 20 years or so...
    I'm getting pretty tired at defending the indefensible: 'SkoolBoy Misstakes' in a 24 year old 'superior Computer.- Not Good enough, Apple.

  • Big troubles with FTP upload since upgrade to leopard

    Hello out there,
    I made an upgrade from tiger to leopard 3 weeks ago (10.5.7) on my iMac (Intel - early 2006). Since this time I Have big troubles with ftp upload.
    I'm using Cyberduck as FTP client and it worked very well before but since the upgrade it starts quick and falls down to a view kb after a view seconds. Sometimes it stops completely.
    Target Server is checked and working well. Also the ISP is fine (tested with a windows machine).
    As it is important for my business (photographer) I would appreciate if somebody can give me a quick hint how to solve this problem.
    Thanks in advance

    I am also experiencing this problem, but only (so far) with one hosting company of the many I FTP into (web designer). The symptoms are exactly as reported above. Files initially start uploading fine, then slow to a crawl and stall. This is the same regardless of FTP software. Error reports say the server is not responding.
    This problem is the same using my daughter's computer (also running 10.5.7), but my son (being my son) hasn't updated his OS since 10.5.5 and I encounter NO problems whatsoever FTPing from his machine, nor from a PC.
    It's only the uploads that seem to cause a problem. Communicating with the server to download, rename, move or delete files presents no issues.
    (In trying to track down where the problem was, I also discovered that the traceroute command to any site on both 10.5.5 and 10.5.7 stalls at the modem, though pings work fine as does tracert from the PC.)

  • I need help with a browser problem

    I am was given a new iMac G3 (from 2001) which was really never used.I have not yet had any serious problems with it, but really could use some help with a browser problem.
    I have 4 different web browsers that needs the macro media flash player update. The browsers I use are internet explorer, iCab, Netscape, and the original Mozilla Firefox.
    It would be of great appreciation for the readers of this post to answer my question.
    I am also having the problem with installing the plug - ins for the browsers. Thank You For Taking the Time To read This!

    Hi, rynodino -
    As Tom has suggested, plugins need to be installed in the Plug-Ins folder for the browser.
    Typically each browser will have its own Plug-Ins folder, usually located in the same folder containing the browser itself. In order for each of several browsers to access the same plugins, the plugins must be replicated and placed in each of the Plug-Ins folders for each of the browsers. The easy way to do that is to hold down the Option key while dragging a plugin to the new location - a copy (not an alias) of the plugin will be generated at the location it is dragged to.
    Most plugins will display a Netscape icon regardless of where they are located - this is normal.
    It is not unusual for the installer for a plugin to default its install to the Plug-Ins folder for Internet Explorer. So be it. Just replicate the new plugin to the other Plug-Ins folders as needed.
    Note that some plugin installs will involve more than one item. For those, be sure to replicate all items for it. Using labels can help identify what is new, what has been most recently added, in a Plug-Ins folder.

  • I am running OS 10.7.5 on a Macbook. Problems with ftp upload

    I am running OS 10.7.5 on a Macbook. I am trying to upload to an ftp server. The connection is established with no problem but any attempt to upload files times out. This is an intermittent problem. I have been using fetch as an ftp client quuite successfully for a long time. The problem starts when there is trouble with the broadband connection. The ftp upload then falls over. I have managed to re-establish it in the past by setting up the connections from scratch. This has not worked this time. The same thing happens with two other clients that I have, so it is not specifically related to fetch. I can uplad files from PC's and by using my iphone's 3g connection as a personal hotspot. The problem seems to lie with the way the macs (the same thing happens on an older mac also running OSX) communicate with the router. I have tried with and without passive mode.
    Please can anyone help. It is driving me to distraction.
    Oh and I have just downloaded the latest security update.

    For anyone else with the same problem.
    My husband discovered the problem is with the MTU, maximum transmission unit . This article describes the problem and solution very clearly
    http://www.macgurulounge.com/manually-managing-mtu-size-in-mac-os-x/
    Our router was running at 1492 and the mac at 1500. I found that resetting to 1400 cured the problem.
    I hope this is helpful to other folk having the same problem

  • Ftp uploading problem

    I work on a corporate net with CS4. Uploading of sites with ftp is a problem. Is there another way to upload to html folder. I currently have to do design with CS4 DW and publish with Frontpage

    In addition to Lawrences' recommendation I use CuteFTP and have done so for years. I use the commercial version, but there could be a light (free) version still available.  Found it much more reliable than the DW FTP I'm afraid  :-)
    For very basic uploading of static files (haven't tried with dynamic sites), you can use IExplorer (or Firefox for that matter), by typing in ftp://yourdomainurl.com  and entering username and password.   I've used that if I've been away from my wn opc and had to work remotely.
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

  • Please I really need help with this video problem.

    Hi!
    Please I need help with this app I am trying to make for an Android cellphone and I've been struggling with this for a couple of months.
    I have a main flash file (video player.fla) that will load external swf files. This is the main screen.When I click the Sets Anteriores button I want to open another swf file called sets.swf.The app is freezing when I click Sets Anteriores button
    Here is the code for this fla file.
    import flash.events.MouseEvent;
    preloaderBar.visible = false;
    var loader:Loader = new Loader();
    btHome.enabled = false;
    var filme : String = "";
    carregaFilme("home.swf");
    function carregaFilme(filme : String ) :void
      var reqMovie:URLRequest = new URLRequest(filme);
      loader.load(reqMovie);
      loader.contentLoaderInfo.addEventListener(Event.OPEN,comeco);
      loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,progresso);
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completo);
      palco.addChild(loader); 
    function comeco(event:Event):void
              preloaderBar.visible = true;
              preloaderBar.barra.scaleX = 0;
    function progresso(e:ProgressEvent):void
              var perc:Number = e.bytesLoaded / e.bytesTotal;
              preloaderBar.percent.text = Math.ceil(perc*100).toString();
              preloaderBar.barra.scaleX =  perc;
    function completo(e:Event):void
              preloaderBar.percent.text = '';
              preloaderBar.visible = false;
    btHome.addEventListener(MouseEvent.MOUSE_DOWN,onHomeDown);
    btHome.addEventListener(MouseEvent.MOUSE_UP,onHomeUp);
    btSets.addEventListener(MouseEvent.MOUSE_DOWN,onSetsDown);
    btSets.addEventListener(MouseEvent.MOUSE_UP,onSetsUp);
    btVivo.addEventListener(MouseEvent.MOUSE_DOWN,onVivoDown);
    btVivo.addEventListener(MouseEvent.MOUSE_UP,onVivoUp);
    btHome.addEventListener(MouseEvent.CLICK,onHomeClick);
    btSets.addEventListener(MouseEvent.CLICK,onSetsClick);
    function onSetsClick(Event : MouseEvent) : void
              if (filme != "sets.swf")
                          filme = "sets.swf";
                          carregaFilme("sets.swf");
    function onHomeClick(Event : MouseEvent) : void
              if (filme != "home.swf")
                          filme = "home.swf";
                          carregaFilme("home.swf");
    function onHomeDown(Event : MouseEvent) : void
              btHome.y += 1;
    function onHomeUp(Event : MouseEvent) : void
              btHome.y -= 1;
    function onSetsDown(Event : MouseEvent) : void
              btSets.y += 1;
    function onSetsUp(Event : MouseEvent) : void
              btSets.y -= 1;
    function onVivoDown(Event : MouseEvent) : void
              btVivo.y += 1;
    function onVivoUp(Event : MouseEvent) : void
              btVivo.y -= 1;
    Now this is the sets.fla file:
    Here is the code for sets.fla
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    var video:Video;
    var nc:NetConnection;
    var ns:NetStream;
    var t : Timer = new Timer(1000,0);
    var meta:Object = new Object();
    this.addEventListener(Event.ADDED_TO_STAGE,init);
    function init(e:Event):void{
    video= new Video(320, 240);
    addChild(video);
    video.x = 80;
    video.y = 100;
    nc= new NetConnection();
    nc.connect(null);
    ns = new NetStream(nc);
    ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
    ns.bufferTime = 1;
    ns.client = meta;
    video.attachNetStream(ns);
    ns.play("http://www.djchambinho.com/videos/segundaquinta.flv");
    ns.pause();
    t.addEventListener(TimerEvent.TIMER,timeHandler);
    t.start();
    function onStatusEvent(stat:Object):void
              trace(stat.info.code);
    meta.onMetaData = function(meta:Object)
              trace(meta.duration);
    function timeHandler(event : TimerEvent) : void
      if (ns.bytesLoaded>0&&ns.bytesLoaded == ns.bytesTotal )
                ns.resume();
                t.removeEventListener(TimerEvent.TIMER,timeHandler);
                t.stop();
    The problem is when I test it on my computer it works but when I upload it to my phone it freezes when I click Sets Anteriores button.
    Please help me with this problem I dont know what else to do.
    thank you

    My first guess is you're simply generating an error. You'll always want to load this on your device in quick debugging over USB so you can see any errors you're generating.
    Outside that, if you plan on accessing anything inside the SWF you should be loading the SWF into the correct context. Relevant sample code:
    var context:LoaderContext = new LoaderContext();
    context.securityDomain = SecurityDomain.currentDomain;
    context.applicationDomain = ApplicationDomain.currentDomain;
    var urlReq:URLRequest = new URLRequest("http://www.[your_domain_here].com/library.swf");
    var ldr:Loader = new Loader();
    ldr.load(urlReq, context);
    More information:
    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7de0.html
    If you're doing this on iOS you'll need to stripped SWFs if you plan on using any coding (ABC) inside the files. You mentioned iOS so I won't get into that here, but just incase, here's info on stripping external SWFs:
    http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/

  • Hello, im new to mac and I need some help with a java problem.

    Hello, im new to mac. I just need someone who can help with a problem ive come across when playing online games that run java. The game is arcanists. its on the funorb website. really fun game and i love it, but i cant play it without my screen keep scrolling or my character not responding at all. please get back at me ASAP. thx apple friends!

    FF has an extention that can be used to increase the conection speed. Its called Tweak Network 1.1 I see a difference on my iMac G5. Its not huge but it may be a big difference on yours.
    http://www.bitstorm.org/extensions/tweak/

  • Help with this occurring problem group differs on Library should be 0 group is 80

    Please can someone help me with the following problems when using disk utility.
    Keep getting the same repeating errors after repairing.
    Group differs on "Library:; should be 0; group is 80
    Permissions differ on "Library"; should be drwxr-xr-x; they are drwxrwxr-t.
    Group differs on :Library/Preferences:; should be 0; group is 80.
    Permissions differ on "Library/Preferences"; should be drwxr-xr-x; they are drwxrwxr-x.

    You can safely ignore it:
    http://support.apple.com/kb/ts1448

  • Can someone help with a networking problem?

    Here's a situation I need some help with:
    I live in a semi-detached house. My neighbour has broadband, I don't. The phone company (BT) has said it would cost too much to install another line to enable me to have broadband, and would involve digging up the road and the garden, which they're not prepared to do.
    However, someone at work has suggested that I approach my neighbour and ask if I could 'share' their broadband connection and in return pay a contribution to their monthly costs.
    For this, I believe, I would need to buy a router, plus something to make my Mac 'wireless'.
    Now, I consider myself Mac-savvy, but when it coms to wireless stuff I confess I know very little! So if someone could explain in simple terms what I would need to buy and approx costs I be very grateful!
    I have a G5, and I believe my neighbour is a PC user.
    Also, can someone explain how the whole 'share' thing works? Does my neighbour have to have their computer on all the time? Do I need to sign up with an ISP? Will having two computers accessing one line slow it down significantly?
    Many thanks,
    Andy

    Hi Andy, before going too far down the 'sharing' route I would rattle some cages chez BT. If your neighbour has broadband then you and they are within a hair's breadth (line length speaking) of the same distance to the exchange. If they have enabled BB next door, why can't they enable BB for you without the hassle? I live on a mobile home site in the back of beyond in Devon and when I upgraded from dial-up to BB, and then to 1 meg there was no problem. There was a two week hiatus while BT did their stuff 'on the line' but it all went without a hitch. Er...I take it you do have an exclusive landline?
    However, if the situation re the line is as per, then the simplest way (to obviate any wifi interference issues) would be for you or neighbour to route an ethernet cable through walls/window frames from your Mac to a router on their side of the wall. (Approx £30?) This would be connected to their phone line. Their PC would also plug into the router. (Which they may already have if they're on BB, though they may have a nasty USB BB modem &nbsp:&nbsp: No good for what you want.
    If you/they don't want the 'hardwire' option then first you have to wifi enable your Mac if it is not already. Not sure of the costs but check on the Apple website for 'Airport Extreme Card'. Don't go the wifi USB dongle route, apparently they are not VG, though I've no personal experience. You would then have to get a wifi router modem (from £40 I think, it's a long time since I've looked, my Belkin has been virtually faultless) which would sit on their side of the wall plugged into the BT socket. Their PC would either plug into that or connect wirelessly with it, as is their wont. That's basically it, but there could still be interference issues, eg, two households with microwaves, cordless phones; intervening walls, bookcases, filing cabinets etc., etc.,
    If done via either of the above, then no, your neighbour doesn't have to have their PC on all the time, if ever.
    You don't have to sign up with an ISP, it would have to be a 'gentleman's agreement' that you bung him £x pm for your share. He is already paying his ISP.
    In practice, sharing would only slow down large downloads.If you were each downloading a large file at the same time then you would be sharing the bandwidth, so your respective files would download at half the speed than they would otherwise. If you are each surfing and if you both 'clicked' at the same time then, yes, he might think, "Wish I hadn't said yes to Andy, this page is taking ages". I don't really think anyone would notice though unless he was surfing at the same time as you were downloading something big, or vice versa.
    I hope the above is some help but I would have a word with the neighbour first and sound them out, after rattling BT that is...
    Come back here if you want more help.
    Good luck!
    Adrian

  • Need help with simple mask problem

    hi there this is mark from superbooty a band that has played in the bay area for over 10 years...
    i was wondering if someone could help me with a Motion2 problem i'm having regarding masks.
    i'm working on this simple animated scene of a car going by a beach - the photo is from the passenger side and shows the outside mirror.
    i'm moving the background (different from the original that came with the car) and i want to move an image of tokyo inside the mirror housing too.
    i figured out how to do the mask but when i try to animate the image of tokyo the mask layer moves with it. when i lock the mask i can't move the image - ???
    there's got to be a way to lock the mask but be able to move what it is masking..
    here are the links to three images that show what the problem is - the first is
    the shot of the scene unmasked, shot 2 is the scene with the mask enabled, and the third is the shot when i try to animate the tokyo background:
    http://superbooty.com/mirrorbeach1.jpg
    http://superbooty.com/mirrorbeach2.jpg
    http://superbooty.com/mirrorbeach3.jpg
    any help would be most appreciated - thanks!

    Adam's solution is the one I'd use - put the mirror contents in a layer, mask the layer, then manipulate the mirror content image. Did this solve it for you - if so, please click on the or buttons over posts as appropriate...
    Patrick

  • Help with a small problem....

    Hello friends,
    I have 2 minor problems using msaccess....
    1).I was designing a login appln i am having a hard time with case sensitivity...
    say suppose username:Scott,password:Tiger
    it authentication username:ccott,password:tiger
    and so on without checking case sensitivity....
    my sevlet code wud look something like this....
    String username=request.getParameter("username").trim();
    String password=request.getParameter("password").trim();
    rs=stmt.executeQuery(select [some value] from login where uid='"+username+" And pwd='"+password+"'");
    if(rs. next()){
    else{
    out.println("Invalid");
    2).I have a memo field in my table which holds a large set of text data....
    This might include double quotations (") whever this charecter is encountered the servlet or the jsp is replacing this charecter by (?).
    Though i got a hint of why it is happening i'm unable to fix that......
    An advice wud really help me out....
    Thanks In Advance !! !! !!
    REGARDS,
    RAHUL

    I don't do MSAccess, but I found this thread that made some sense:
    http://www.experts-exchange.com/Databases/MS_Access/Q_21645848.html
    Maybe it will help with your case sensitivity problem. It basically says to perform a secondary comparison based on Hex or Decimal values of the returned usernames/passwords. Not optimal, but that's what you get for using Access and not a production quality DB (IMHO). It's not like there aren't free ones out there.
    As far as your "quote" problem. Are you saying that trying something like this doesn't work?:
    String text = request.getParameter("text");
    String id = request.getParameter("id");
    if (text != null) {
      PreparedStatement st = con.prepareStatement("UPDATE table SET text = ? WHERE id = ?");
      st.setString(1, text);
      st.setString(2, id);
      st.executeUpdate();
    }Of course you need to catch exceptions, etc. But the general idea should work. You see Access doesn't need to provide PreparedStatements, the driver (I assume JDBC-ODBC bridge) should.

  • Please help with Nokia N95 problem.

    If anyone can help with this I’d be much appreciated, I have a N95 on contract with T-Mobile. When I try to play videos from myspace, or you tube etc… I get a message telling me the following.
    “Hello, Either you either have JavaScript turned off or an old version of macromedia's flash player click here to get the latest flash player”.
    I then get the option of clicking on a link within the previous sentence statement that directs me to acrobat downloads home page where I get the following message.
    “We are unable to locate a web player that matches your platform and browser. Please visit our table of recommended web players”
    This is deeply frustrating as in nearly every other way I feel the phone is perfect. If Any one can hep me fix this problem I’d be much appreciated.

    daperk,
    You should post this to board "Smartphones, Nseries and Eseries Devices".

  • Please help with column float problem in IE8

    Hi there,
    Sorry to be so pushy - but I am desperate for help!!
    Having serious problems with my site in some PC's showing Internet Explorer 8. My right column floated right is moving down the page underneath the left column..
    It shows fine on IE8 on my PC - however on my clients PC (vista with IE8) it is showing up as mentioned above. Is there a fix for this.
    Here is my link http://www.dooks.com/pgs/welcome.html
    The css is all there! If you need anything please let me know as I need to get this sorted - I have had serious issues with this site that I have never had before with other sites and am starting to think there is a bug in my software. I redid the index page and this one page (linked above) to see what my problems are - so help with query v appreciated.
    Many thanks,
    Karen

    Lawrence_Cramer wrote:
    A point to keep in mind is that IE8 is still in Beta.
    Not anymore.
    http://www.microsoft.com/Presspass/press/2009/mar09/03-18IE8AvailablePR.mspx
    "REDMOND, Wash. — March 18, 2009 — Today Microsoft Corp. announced the availability of Windows Internet Explorer 8, the new Web browser that offers..."
    Mark A. Boyd
    Keep-On-Learnin' :-)

  • Need help with this book problem...Pig game...can ANYONE help!??

    I need help with the following book problem...could someone write this code for me?? Thanks!!
    First design and implement a class called PairOfDice, composed of two six-sided Die objects. Using the PairOfDice class, design and implement a class to play a game called Pig. In this game, the user competes against the computer. On each turn, the current player rolls a pair of dice and accumulates points. The goal is to reach 100 points before your opponent does. If, on any turn, the player rolls a 1, all points accumulated for that round are forfeited and control of the dice moves to the other player. If the player rolls two 1s in one turn, the player loses all points accumulated thus far in the game and loses control of the dice. The player may voluntarily turn over the dice after each roll. Therefore the player must decide to either roll again (be a pig) and risk losing points, or relinquish control of the dice, possibly allowing the other player to win. Implement the computer player such that it always relinquishes the dice after accumulating 20 or more points in any given round.
    I realize this is a long code, so it would be greatly appreciated to anyone who writes this one for me, or can at least give me any parts of it. I honestly have no clue how to do this because our professor is a dumbass and just expects us to know how to do this...he doesn't teach us this stuff...don't ask. Anyways, thanks for taking the time to read this and I hope someone helps out!! Thank you in advance to anyone who does!!!

    Nasty comments? It's not a matter of not liking you, it's a matter of responding to the
    "I'ts everyone else's fault but mine" attitude of your post.
    If you are genuine, the program is very easy to write, so, your Professor is correct when he said you should
    be able to do it. I'm still very much in the beginner category at java, and it took me only 20 mins to write
    (+5 mins to design it on paper). 2 classes in one file < 100 lines. Most of the regulars here would do it in half the time / half the lines.
    All of the clues are in the description, break them down into their various if / else conditions. Write it down on paper.
    Have a go. Try to achieve something. Post what you've tried, no-one will laugh at you, and you will be
    pleasanty surprised at the level of help you will get when you've "obviously" made some effort.
    Again, have a go. If you don't like problem-solving, then you don't like programming. So, you gotta ask
    yourself - "what am I doin' here?"

Maybe you are looking for

  • Error in PO net price currency JPY

    sir, PO was created with currency japanese YEN using Tcode ME21N . The net price was showing 142502300 (in JPY). when checked in EKPO table , it saved with a value 1425023.00  instead of  142502300 .  what can be done to correct this.       In PO Pri

  • Query regarding Transports in BI system

    Hi All, We want to transport some change requests from BI system( running on MSSQL database) to another BI system (running on oracle database). Will there be any problem in doing the same??? one BI system is running on Windows platform and other is r

  • CDrom usage on solaris 10

    Hi , I installed Solaris 10 , but cannot play any CD or DVD. I'm using the JS3 console. When i put a CD in my ASUS DVD or NEC DVD-writer JS3 ejects him after 10 seconds without playing anything. Hints ? Hans

  • ETL and DAC clustering for high availaibility in OBIAPPS installed in AIX

    Hello Gurus Could you let me know how to configure teh clustering and failover for Informatica and DAC for obiapps 7963 installed in AIX 6.1 . We have license for HACMP cluster. Any guide to help me out. I coudn't find it in obiapps deplyment guide.

  • Badi for MB1A transaction

    Hi, The BADI CKML_UPDATE is being triggered when I save in the MB1A transaction. But not all the methods are triggered. Could any one please let me know when the method CURRENCY_TRANSLATION_RULES will be triggered. The solution will be of great help.