Ignore PROXY settings for a given IP

Hi,
I use a socks proxy to reach email outside the corporate lan. One account on my Mail though is local Lan (Exchange Server). I put the IP of the Exchange Server to the ignore proxy configuration text box but I still cant connect to the local server.
Please Help

Hi,
My problem sounds really similar. I connect to an exchange server at one university but when I am physically located in another university that I also work at I cannot access the server using the Mail program.
I don't really understand the details but I was able to use a program called PROXIFIER to force mail to use a SOCKS proxy (or something like that).
Result... Mail now works from behind the university firewall.
Good luck!

Similar Messages

  • Safari ignores proxy settings for AJAX requests?

    I'm using Safari 4 on Mac OS X 10.5.7.
    When I configure Safari's proxy settings (which redirect to System Preferences -> Network -> Advanced -> Proxies), all my page requests go through the proxy I configured, except for AJAX requests.
    I configured an intercepting proxy (burp suite) to verify this, and indeed, AJAX requests are not being sent to the proxy. I double checked the exact same page on Firefox 3.5 on the same Mac with the same proxy being configured, and in this case the AJAX requests do go via the proxy.
    For Safari, I configured the "Web Proxy (HTTP)" and "Secure Web Proxy (HTTPS). Is there anything else I need to do? Is this a bug in Safari?
    Thanks in advance for all help.

    I'm seeing the same problem. I use privoxy, a local security/privacy/ad-blocking proxy that lives on my computer. Firefox always sends its requests through the proxy, but Safari sometimes ignores the proxy settings. Vienna, my RSS reader, stops going through the proxy when Safari stops doing it. A restart fixes the problem for a while, but eventually the ads start showing up in Safari and Vienna.
    I didn't start seeing this problem until Safari 4. I'm currently using the most up-to-date version of Safari, 4.0.3, with Mac OS X 10.5.8 and all other updates as of 12 Sep 2009. Privoxy is version 3.0.10, not the very latest, but it's working.

  • Strange info in "Bypass Proxy Settings for These Hosts and Domains"

    For my Mac Mini my Network IP Address always has a self-assigned 169.254 number that I cannot change. Strangely, this same IP number is similar to info that is in the Proxies section (of Network Settings) under "Bypass Proxy Settings for These Hosts and Domains".
    No matter what I do, this info (*,local, 169.254/16) appears in my Network Settings in the Proxies section under "Bypass Proxy Settings for These Hosts and Domains". (I tried removing the info and it would cause the "Configure Proxies" selection to default to "Always Use PAC File". Had to go back and retrash all the plist files to have Proxies go back to "Configure Proxies-Manually". Still, the info (*,local, 169.254/16) continues to appear in the "Bypass Proxy Settings for These Hosts and Domains" section and my IP address is always a 169.254 number.)
    Comcast cable modem via direct hardwired Ethernet works fine with my other computer, so not the modem. Also, other computer does not have any info in the "Bypass Proxy Settings for These Hosts and Domains" section.
    Installed a fresh copy of OS X 11.5 on a new hard drive. Still the same problem.
    I posted this issue before but only got one responder and the problem still exists. Any clues? Somebody must know about this stuff. Help please.
    Thanks

    When your Mac wakes up, it does not yet have an IP Addresss. It wants to send a request to a Router for an apprpriste IP address to use now. But it needs to have an IP address (like a return address) to receive any messages. So, ... wait for it,
    ... it (your Mac) makes one up. There are rules that ensure it is a random address, but they always start with 169.254. It is on the same subnet with any low-order 16 bits This is the "self-assigned" range of IP Addresses. This address is only good for talking on a local network segment, for things like asking for a valid IP Address from a DHCP-enabled Router.
    In most cases, on most networks, the 169.254 self-assigned IP Address is replaced by a valid Local IP Address such as 192.168.xxx yyy or 10.0.xxx.yyy so quickly that you never even see the 169.254 Address.
    If you do see the 169.254 Address, it can be read as "Nobody will talk to me" or "Nobody will give me an IP Address". When you have this IP Address for more than an instant, you should suspect bad cables for Ethernet connections, bad signal strength or interference for wireless, Router configuration problems, or Mac configuration problems.
    Mac configuration problems are often solved by using the "Assist Me" button is System Preferences > Network  and choosing to set up again.
    Another diagnostic is to try using Network Utility and the Ping function, and Ping-ing the address of your Airport base Station, often 192.168.0.1 or 10.0.0.1 or similar. This will tell you if the Router is reachable, or there are cabling/wirelss signal problems.
    In this case, proxies are not an issue, and are simply a distraction from the real problems.

  • I have lost the correct proxy settings for the ethernet connection using Safari.  How do I get back to the original ethernet proxy settings?

    I changed the ethernet proxy settings for Safari on my Mac Pro, when I was in a particular place that required extra security.  Now I cannot get the ethernet connection to work when back home.  The wireless connection works fine.  What are the original ethernet proxy settings.  How do I make the changes?
    Thanks

    From your Safari menu bar click Safari / Preferences then select the Advanced tab. Click Change Settings next to Proxies. Select Automatically from the Configure pop up menu.
    You may also have to select the Proxies tab. If any of the boxes are selected, deselect then click OK.

  • How could I set the proxy settings for just some URLs and not for all?

    Hello,
    I am using HttpURLConnection to establish a HTTP connection . The connection pass through a proxy, and it requires security.
    I know that I can set the proxy settings in the system properties, and this works perfect.
    But I don't want to set the proxy settings in the system properties, because this proxy settings will be for ALL the URLs, and I just want for a few URLs.
    How could I set the proxy settings for just some URLs and not for all?
    Thanks

    java.net.URL.openConnection(java.net.Proxy proxy)
    @since 1.5

  • Bypassing proxy settings for IPv6-adresses.

    My MacBook is currently connected both via IPv4 and IPv6, and I prefer using a squid-proxy when surfing. Alas, my proxy only supports IPv4.
    In network preferences I can type in hosts to bypass proxy settings for, but I'd like to do this for every single IPv6 host. Any solutions?
    Martin

    The format should be comma-delimited, like:
    <pre class=command>localhost, *.domain1.com, www.domain2.com</pre>
    However, IIRC, Network Preferences is pretty tolerant - it'll accept most forms of input and will reformat it into something that makes sense to it.

  • Contribute 4 - no proxy settings for outgoing CPS authorization

    Does CS4 have any access to proxy settings for publishing
    server identification?
    There are three outgoing requests in Contribute:
    1) FTP or SFTP --> this has a proxy setting
    2) contribute browser -> this uses proxy settings inside
    of Start->Settings->Control panel -> Internet Options
    3) HTTPS: validating CPS un/pw -> this has no proxy
    setting that I can find.

    Thank you for the quick reply! But the solution provided by you, it seems, has still not been able to address my issue. I ran the program at command prompt with your said parameters, but the download still gave an error in the App window.
    Also, is there some way of defining these parameters in the source code? I am keen in using NetBeans to run the program.
    Cheers!

  • Where can I read the proxy settings Firefox chose, when configured to use "Auto-detect proxy settings for this network"?

    I would like to set my system network proxy settings to those, Firefox chose. Firefox is configured to use "Auto-detect proxy settings for this network" and this works fine. How can I read out the settings Firefox chose, so I can adapt these system?

    Hello Richard,
    Download MozBackup and make a backup of your bookmarks and passwords. Uninstall firefox and remove ALL folders with the name "Firefox".
    Install Firefox and restore your bookmarks and passwords. Now you should have a fresh install so you have to make all settings again.

  • Configure proxy settings for WebEngine

    I had no luck in finding any docs about how to configure the proxy server for a WebView/WebEngine.
    I assume the system properties "http.proxyHost" and "http.proxyPort" are used if they are set, is this correct?
    Is there also a way to configure the proxy settings for each WebEngine instance?
    Regards,
    Heiko

    I am also getting this "error".  The printer (8500 A910) connected to the web well enough that it went out and supposedly downloaded a new update, but then it was supposed to print a page showing the email address, but did not.
    So I go in and try to set up the eprint, and it tells me it cannot connect to the sever and I'll need to enter a proxy address and port number.  But my ISP's cable modems do NOT have any static IP address nor do they provide any sort of proxy service.  Everything works just fine with "automatic discovery" (DHCP) for every computer in the house.  No problems there.
    So, since  that's the case, of course I cannot look up some proxy address and port number in my web browser because they're all set up for "automatically detect settings".
    What's baffling is that the printer connected to something at HP to download the "update", and it went through a process that appeared to be what I'd expect it to do if it was updating its firmware.  But it won't connect to whatever it's supposed to connect to to have an email address assigned.
    Does HP supply a proxy server?  If so, what's its IP address or URL, and what port should a person set the printer to try to use?
    UPDATE:
    It appears that the HP site must have just been "down" for about six or seven hours while I was trying to get the printer to connect because it now connected and I got an email address asigned without needing to have any "proxy" stuff set up at all.  It's a shame that the printer does not simply report "HP Site down - try again later" instead of reporting that you need to use a proxy when that's impossible.
    "Now, on to the next problem which is that my emails to the assigned address are all bouncing with a "550 5.7.1 Command rejected" error!

  • Steps to apply Proxy settings for all Server in a specific OU using Group Policy ?

    People,
    I have several terminal server (2008 R2) running as RDSH in an OU called Terminal Servers.
    So how can I create the GPO setting to make sure that everyone who login to this terminal server will be getting the proxy settings automatically to proxy.domain.com on port 3128 ?
    I've created the GP object and then link it directly to the Terminal Servers OU using the following options:
    User Configuration (Enabled) > Policies > Windows Settings > Internet Explorer Maintenance >
    Connection/Proxy Settings > Enable proxy settings 
    But somehow when I login as myself and DOMAIN\Administrator the proxy settings in the IE11 is still unchecked with the old Proxy value and sometimes blank in some servers.
    /* Server Support Specialist */

    > I've created the GP object and then link it directly to the Terminal
    > Servers OU using the following options:
    >
    > User Configuration (Enabled) > Policies > Windows Settings > Internet
    > Explorer Maintenance >
    > Connection/Proxy Settings > Enable proxy settings
    User policies apply to user objects - the servers will ignore them, and
    as long as there is no user in your terminal servers OU, no one will get
    this setting.
    Link your policy to the OUs where the users are, then use item level
    targeting to filter for a security group you create for this purpose,
    and add all your terminal servers to this group. Don't forget to reboot
    the servers after changing group memberships...
    Greetings/Grüße,
    Martin
    Mal ein
    gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me -
    coke bottle design refreshment (-:
    Martin,
    Since the browser in the Terminal Servers are all running IE 11, do I need to do the GPO using IEAK or GPP with the new ADMX template ?
    /* Server Support Specialist */

  • IPad and proxy settings for more than AppStore and Safari?

    Why am I having problems w/ most apps and the proxy settings?  My corp. network requires proxy settings to get to the internet and only the AppStore and Safari (and a few specifically designed apps) will use the proxy settings.  All other apps simply do not work.
    Is this an Apple problem?  Why was this not addressed by Apple?

    NestOfRobins wrote:
    That sounds like a "cop-out" to me.  Do individual applications on desktop machines have to be "proxy aware"?
    Yes, they have. Not only on iPad, but every internet application, on Mac or on PC or on *nix, have to be coded internally to use proxies. Some are, and are also smart enough to check for any proxy info on network options of your system, some other will have the proxy info to be given in internal application setup, and some other, simply does not know what proxies are.
    NestOfRobins wrote:
    How can Apple expect to compete in the Enterprise space with this glaring hole in their operating system?  Why can't there be a setting, e.g., "all internet traffic to use proxy server".?
    That is a SOCK, and is another different stuff. There is no hole in the O.S., it is the app you want to use, because that app wants connect the internet by herself, without using your proxy.
    Best advice is, you ask that app's developer, to add in future releases, proxy connectivity or (best) to check if network requires a proxy and act accordingly without bother the user on the issue
    Anyway, I'd like answer also your other questions:
    NestOfRobins wrote:
    Why am I having problems w/ most apps and the proxy settings?
    You have problems because that apps don't think about the proxy setting you have in your network configuration (app poorly coded), or they require direct internet access in their specs (app aware of proxy, and do not want use it), access that you don't have because of proxy. Not your fault. Nor Apple's
    NestOfRobins wrote:
    this an Apple problem?  Why was this not addressed by Apple?
    Not an Apple problem, so there is nothing to address.

  • Shockwave Player ignoring proxy settings?

    For security reasons, ALL outbound user traffic is proxied.
    In at least some situations, the Shockwave player appears to
    ignore browser proxy settings and make attempts to go
    directly to Internet sites on ports 80,443,1935. This is filling up
    our
    firewall logs making them less useful for real
    troubleshooting. The client should always use the HTTP proxy and
    NEVER
    attempt direct connections to Internet hosts. Can we control
    this behavior on the client in any meaningful way? I have read:
    http://www.adobe.com/devnet/flashcom/articles/firewalls_proxy02.html#
    and what we're seeing appears to be default behavior. Surely
    this can be controlled client side and we are not at the whim
    of the way the client is called by HTML served up from who
    knows?
    For an example of this, see --this is a Viagra ad...sorry,
    but this is the one I was able to track down;-):
    http://ads.pointroll.com/PortalServe/?pid=511654F38020070808222931&pos=h&flash=9&redir=htt p://us.ard.yahoo.com/SIG=12jc7dq14/M=607608.11098438.11852106.8528710/D=sports/S=96625734: LREC/Y=YAHOO/EXP=1194540739/A=4834290/R=0/id=CTURL/*$CTURL$&r=0.7514780048609885

    I am running into the same issue with a few
    sites...especially since the TCP timeout to realize that is has to
    revert to a proxy is not conducive. I would think a client side or
    registry setting would fix this, but cannot find where to change
    that. Any ideas?

  • Skype partially ignoring proxy settings

    Skype is partially ignoring my proxy settings, the video and audio itself is going through the proxy but for some reason it is ignoring my proxy and is making direct connections to db3msgr6012716.gateway.messenger.live.com and blu405-m.hotmail.com, I have researched this issue and apparently it was discovered in 2012 so why isn't this fixed yet?

    I am running into the same issue with a few
    sites...especially since the TCP timeout to realize that is has to
    revert to a proxy is not conducive. I would think a client side or
    registry setting would fix this, but cannot find where to change
    that. Any ideas?

  • 9ias and Proxy Settings for Client(Urgent !!! )

    Dear All,
    I am facing a very strange problem.
    Our application is running on Oracle 9ias installed on Windows2000.
    When I access this from a WindowsXP M/C with browser(IE 6.0) privacy settings as medium(which is by default medium)and without IP address of 9ias m/c.(Which is infact not required),I do not get the menu of my application generated.
    I some how did some hit and trial and now when I put
    the IP in proxy settings of my client Browser, I am able to get the menus.
    Can anyone give some hint or somebody has faced the
    problem like this.
    Thanks in advance.
    Regards
    Dushyant

    NestOfRobins wrote:
    That sounds like a "cop-out" to me.  Do individual applications on desktop machines have to be "proxy aware"?
    Yes, they have. Not only on iPad, but every internet application, on Mac or on PC or on *nix, have to be coded internally to use proxies. Some are, and are also smart enough to check for any proxy info on network options of your system, some other will have the proxy info to be given in internal application setup, and some other, simply does not know what proxies are.
    NestOfRobins wrote:
    How can Apple expect to compete in the Enterprise space with this glaring hole in their operating system?  Why can't there be a setting, e.g., "all internet traffic to use proxy server".?
    That is a SOCK, and is another different stuff. There is no hole in the O.S., it is the app you want to use, because that app wants connect the internet by herself, without using your proxy.
    Best advice is, you ask that app's developer, to add in future releases, proxy connectivity or (best) to check if network requires a proxy and act accordingly without bother the user on the issue
    Anyway, I'd like answer also your other questions:
    NestOfRobins wrote:
    Why am I having problems w/ most apps and the proxy settings?
    You have problems because that apps don't think about the proxy setting you have in your network configuration (app poorly coded), or they require direct internet access in their specs (app aware of proxy, and do not want use it), access that you don't have because of proxy. Not your fault. Nor Apple's
    NestOfRobins wrote:
    this an Apple problem?  Why was this not addressed by Apple?
    Not an Apple problem, so there is nothing to address.

  • How do I set proxy settings for a Java app behind a corporate server?

    I have the source code of a Download Manager program written in Java. It has to be run within my college network in which we use the "Corporate Client" server to access the internet. The HTTP proxy is 172.16.68.6 and Port number is 3128. How do I define these parameters in my java program so that it can download files from the internet?
    The source code for the program is:
    There are four classes:
    1. DownloadManager.java
    2. Download.java
    3. DownloadTable.java
    4. ProgressRenderer.java
    /*__DownloadManager.java__*/
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    // The Download Manager.
    public class DownloadManager extends JFrame
            implements Observer {
        // Add download text field.
        private JTextField addTextField;
        // Download table's data model.
        private DownloadsTableModel tableModel;
        // Table listing downloads.
        private JTable table;
        // These are the buttons for managing the selected download.
        private JButton pauseButton, resumeButton;
        private JButton cancelButton, clearButton;
        // Currently selected download.
        private Download selectedDownload;
        // Flag for whether or not table selection is being cleared.
        private boolean clearing;
        // Constructor for Download Manager.
        public DownloadManager() {
            // Set application title.
            setTitle("Download Manager");
            // Set window size.
            setSize(640, 480);
            // Handle window closing events.
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    actionExit();
            // Set up file menu.
            JMenuBar menuBar = new JMenuBar();
            JMenu fileMenu = new JMenu("File");
            fileMenu.setMnemonic(KeyEvent.VK_F);
            JMenuItem fileExitMenuItem = new JMenuItem("Exit",
                    KeyEvent.VK_X);
            fileExitMenuItem.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionExit();
            fileMenu.add(fileExitMenuItem);
            menuBar.add(fileMenu);
            setJMenuBar(menuBar);
            // Set up add panel.
            JPanel addPanel = new JPanel();
            addTextField = new JTextField(30);
            addPanel.add(addTextField);
            JButton addButton = new JButton("Add Download");
            addButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionAdd();
            addPanel.add(addButton);
            // Set up Downloads table.
            tableModel = new DownloadsTableModel();
            table = new JTable(tableModel);
            table.getSelectionModel().addListSelectionListener(new
                    ListSelectionListener() {
                public void valueChanged(ListSelectionEvent e) {
                    tableSelectionChanged();
            // Allow only one row at a time to be selected.
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            // Set up ProgressBar as renderer for progress column.
            ProgressRenderer renderer = new ProgressRenderer(0, 100);
            renderer.setStringPainted(true); // show progress text
            table.setDefaultRenderer(JProgressBar.class, renderer);
            // Set table's row height large enough to fit JProgressBar.
            table.setRowHeight(
                    (int) renderer.getPreferredSize().getHeight());
            // Set up downloads panel.
            JPanel downloadsPanel = new JPanel();
            downloadsPanel.setBorder(
                    BorderFactory.createTitledBorder("Downloads"));
            downloadsPanel.setLayout(new BorderLayout());
            downloadsPanel.add(new JScrollPane(table),
                    BorderLayout.CENTER);
            // Set up buttons panel.
            JPanel buttonsPanel = new JPanel();
            pauseButton = new JButton("Pause");
            pauseButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionPause();
            pauseButton.setEnabled(false);
            buttonsPanel.add(pauseButton);
            resumeButton = new JButton("Resume");
            resumeButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionResume();
            resumeButton.setEnabled(false);
            buttonsPanel.add(resumeButton);
            cancelButton = new JButton("Cancel");
            cancelButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionCancel();
            cancelButton.setEnabled(false);
            buttonsPanel.add(cancelButton);
            clearButton = new JButton("Clear");
            clearButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    actionClear();
            clearButton.setEnabled(false);
            buttonsPanel.add(clearButton);
            // Add panels to display.
            getContentPane().setLayout(new BorderLayout());
            getContentPane().add(addPanel, BorderLayout.NORTH);
            getContentPane().add(downloadsPanel, BorderLayout.CENTER);
            getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
        // Exit this program.
        private void actionExit() {
            System.exit(0);
        // Add a new download.
        private void actionAdd() {
            URL verifiedUrl = verifyUrl(addTextField.getText());
            if (verifiedUrl != null) {
                tableModel.addDownload(new Download(verifiedUrl));
                addTextField.setText(""); // reset add text field
            } else {
                JOptionPane.showMessageDialog(this,
                        "Invalid Download URL", "Error",
                        JOptionPane.ERROR_MESSAGE);
        // Verify download URL.
        private URL verifyUrl(String url) {
            // Only allow HTTP URLs.
            if (!url.toLowerCase().startsWith("http://"))
                return null;
            // Verify format of URL.
            URL verifiedUrl = null;
            try {
                verifiedUrl = new URL(url);
            } catch (Exception e) {
                return null;
            // Make sure URL specifies a file.
            if (verifiedUrl.getFile().length() < 2)
                return null;
            return verifiedUrl;
        // Called when table row selection changes.
        private void tableSelectionChanged() {
        /* Unregister from receiving notifications
           from the last selected download. */
            if (selectedDownload != null)
                selectedDownload.deleteObserver(DownloadManager.this);
        /* If not in the middle of clearing a download,
           set the selected download and register to
           receive notifications from it. */
            if (!clearing) {
                selectedDownload =
                        tableModel.getDownload(table.getSelectedRow());
                selectedDownload.addObserver(DownloadManager.this);
                updateButtons();
        // Pause the selected download.
        private void actionPause() {
            selectedDownload.pause();
            updateButtons();
        // Resume the selected download.
        private void actionResume() {
            selectedDownload.resume();
            updateButtons();
        // Cancel the selected download.
        private void actionCancel() {
            selectedDownload.cancel();
            updateButtons();
        // Clear the selected download.
        private void actionClear() {
            clearing = true;
            tableModel.clearDownload(table.getSelectedRow());
            clearing = false;
            selectedDownload = null;
            updateButtons();
      /* Update each button's state based off of the
         currently selected download's status. */
        private void updateButtons() {
            if (selectedDownload != null) {
                int status = selectedDownload.getStatus();
                switch (status) {
                    case Download.DOWNLOADING:
                        pauseButton.setEnabled(true);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.PAUSED:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(true);
                        clearButton.setEnabled(false);
                        break;
                    case Download.ERROR:
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(true);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
                        break;
                    default: // COMPLETE or CANCELLED
                        pauseButton.setEnabled(false);
                        resumeButton.setEnabled(false);
                        cancelButton.setEnabled(false);
                        clearButton.setEnabled(true);
            } else {
                // No download is selected in table.
                pauseButton.setEnabled(false);
                resumeButton.setEnabled(false);
                cancelButton.setEnabled(false);
                clearButton.setEnabled(false);
      /* Update is called when a Download notifies its
         observers of any changes. */
        public void update(Observable o, Object arg) {
            // Update buttons if the selected download has changed.
            if (selectedDownload != null && selectedDownload.equals(o))
                updateButtons();
        // Run the Download Manager.
        public static void main(String[] args) {
            DownloadManager manager = new DownloadManager();
            manager.show();
    This example shows how to create a simple download manager in Java. It contains four classes in foru Java source files:
    Download.java: Contains Download class which downloads a file from a URL.
    DownloadManager.java: Contains the main class for download manager application.
    DownloadsTableModel.java: Contains the class which manages the download table's data.
    ProgressRenderer.java: Contains the class which is responsible to render a JProgressBar in a table cell.
    The contents of the listed files are written below.
    /*__Download.java__*/
    import java.io.*;
    import java.net.*;
    import java.util.*;
    // This class downloads a file from a URL.
    class Download extends Observable implements Runnable {
        // Max size of download buffer.
        private static final int MAX_BUFFER_SIZE = 1024;
        // These are the status names.
        public static final String STATUSES[] = {"Downloading",
        "Paused", "Complete", "Cancelled", "Error"};
        // These are the status codes.
        public static final int DOWNLOADING = 0;
        public static final int PAUSED = 1;
        public static final int COMPLETE = 2;
        public static final int CANCELLED = 3;
        public static final int ERROR = 4;
        private URL url; // download URL
        private int size; // size of download in bytes
        private int downloaded; // number of bytes downloaded
        private int status; // current status of download
        // Constructor for Download.
        public Download(URL url) {
            this.url = url;
            size = -1;
            downloaded = 0;
            status = DOWNLOADING;
            // Begin the download.
            download();
        // Get this download's URL.
        public String getUrl() {
            return url.toString();
        // Get this download's size.
        public int getSize() {
            return size;
        // Get this download's progress.
        public float getProgress() {
            return ((float) downloaded / size) * 100;
        // Get this download's status.
        public int getStatus() {
            return status;
        // Pause this download.
        public void pause() {
            status = PAUSED;
            stateChanged();
        // Resume this download.
        public void resume() {
            status = DOWNLOADING;
            stateChanged();
            download();
        // Cancel this download.
        public void cancel() {
            status = CANCELLED;
            stateChanged();
        // Mark this download as having an error.
        private void error() {
            status = ERROR;
            stateChanged();
        // Start or resume downloading.
        private void download() {
            Thread thread = new Thread(this);
            thread.start();
        // Get file name portion of URL.
        private String getFileName(URL url) {
            String fileName = url.getFile();
            return fileName.substring(fileName.lastIndexOf('/') + 1);
        // Download file.
        public void run() {
            RandomAccessFile file = null;
            InputStream stream = null;
            try {
                // Open connection to URL.
                HttpURLConnection connection =
                        (HttpURLConnection) url.openConnection();
                // Specify what portion of file to download.
                connection.setRequestProperty("Range",
                        "bytes=" + downloaded + "-");
                // Connect to server.
                connection.connect();
                // Make sure response code is in the 200 range.
                if (connection.getResponseCode() / 100 != 2) {
                    error();
                // Check for valid content length.
                int contentLength = connection.getContentLength();
                if (contentLength < 1) {
                    error();
          /* Set the size for this download if it
             hasn't been already set. */
                if (size == -1) {
                    size = contentLength;
                    stateChanged();
                // Open file and seek to the end of it.
                file = new RandomAccessFile(getFileName(url), "rw");
                file.seek(downloaded);
                stream = connection.getInputStream();
                while (status == DOWNLOADING) {
            /* Size buffer according to how much of the
               file is left to download. */
                    byte buffer[];
                    if (size - downloaded > MAX_BUFFER_SIZE) {
                        buffer = new byte[MAX_BUFFER_SIZE];
                    } else {
                        buffer = new byte[size - downloaded];
                    // Read from server into buffer.
                    int read = stream.read(buffer);
                    if (read == -1)
                        break;
                    // Write buffer to file.
                    file.write(buffer, 0, read);
                    downloaded += read;
                    stateChanged();
          /* Change status to complete if this point was
             reached because downloading has finished. */
                if (status == DOWNLOADING) {
                    status = COMPLETE;
                    stateChanged();
            } catch (Exception e) {
                error();
            } finally {
                // Close file.
                if (file != null) {
                    try {
                        file.close();
                    } catch (Exception e) {}
                // Close connection to server.
                if (stream != null) {
                    try {
                        stream.close();
                    } catch (Exception e) {}
        // Notify observers that this download's status has changed.
        private void stateChanged() {
            setChanged();
            notifyObservers();
    /*__DownloadTableModel.java__*/
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class manages the download table's data.
    class DownloadsTableModel extends AbstractTableModel
            implements Observer {
        // These are the names for the table's columns.
        private static final String[] columnNames = {"URL", "Size",
        "Progress", "Status"};
        // These are the classes for each column's values.
        private static final Class[] columnClasses = {String.class,
        String.class, JProgressBar.class, String.class};
        // The table's list of downloads.
        private ArrayList downloadList = new ArrayList();
        // Add a new download to the table.
        public void addDownload(Download download) {
            // Register to be notified when the download changes.
            download.addObserver(this);
            downloadList.add(download);
            // Fire table row insertion notification to table.
            fireTableRowsInserted(getRowCount() - 1, getRowCount() - 1);
        // Get a download for the specified row.
        public Download getDownload(int row) {
            return (Download) downloadList.get(row);
        // Remove a download from the list.
        public void clearDownload(int row) {
            downloadList.remove(row);
            // Fire table row deletion notification to table.
            fireTableRowsDeleted(row, row);
        // Get table's column count.
        public int getColumnCount() {
            return columnNames.length;
        // Get a column's name.
        public String getColumnName(int col) {
            return columnNames[col];
        // Get a column's class.
        public Class getColumnClass(int col) {
            return columnClasses[col];
        // Get table's row count.
        public int getRowCount() {
            return downloadList.size();
        // Get value for a specific row and column combination.
        public Object getValueAt(int row, int col) {
            Download download = (Download) downloadList.get(row);
            switch (col) {
                case 0: // URL
                    return download.getUrl();
                case 1: // Size
                    int size = download.getSize();
                    return (size == -1) ? "" : Integer.toString(size);
                case 2: // Progress
                    return new Float(download.getProgress());
                case 3: // Status
                    return Download.STATUSES[download.getStatus()];
            return "";
      /* Update is called when a Download notifies its
         observers of any changes */
        public void update(Observable o, Object arg) {
            int index = downloadList.indexOf(o);
            // Fire table row update notification to table.
            fireTableRowsUpdated(index, index);
    /*__ProgressRenderer.java__*/
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    // This class renders a JProgressBar in a table cell.
    class ProgressRenderer extends JProgressBar
            implements TableCellRenderer {
        // Constructor for ProgressRenderer.
        public ProgressRenderer(int min, int max) {
            super(min, max);
      /* Returns this JProgressBar as the renderer
         for the given table cell. */
        public Component getTableCellRendererComponent(
                JTable table, Object value, boolean isSelected,
                boolean hasFocus, int row, int column) {
            // Set JProgressBar's percent complete value.
            setValue((int) ((Float) value).floatValue());
            return this;
    }

    Thank you for the quick reply! But the solution provided by you, it seems, has still not been able to address my issue. I ran the program at command prompt with your said parameters, but the download still gave an error in the App window.
    Also, is there some way of defining these parameters in the source code? I am keen in using NetBeans to run the program.
    Cheers!

Maybe you are looking for

  • Last played & play count

    I noticed a couple of my playlists are showing high play counts. ie an album with all tunes played 172-175 times .. this strikes me as odd .. not only is it something that is not often listened to and outstripping all other playcounts but it would be

  • Selection for (InfoObject only date) cannot be uniquely assigned in RRI

    Hello, I have created RRI using 6 queryies. When i do jump from sender to receiver, i found the warning messages for two date fields saying that Selection for ZORAPLIC cannot be uniquely assigned and Selection for ZOR_CREAT cannot be uniquely assigne

  • After kernal panic, zeroed HD but Fresh Tiger install fails...

    Our little brave 12" PowerBook G4 started to behave a little odd today. It all started with iTunes being empty all of a sudden. And when I tried to import the old playlist, iTunes [9.2] crashed. Did this a few times when something started nagging in

  • How do I get safari to autofill my email address everytime I type it on a webform?

    I have been on "safari preferences"  and couldn't find it. My autofill is on and It fills up forms using info form my contacts, but it doesn't autofill my email address each time I start typing it.. hELLP! It's very boring to have to type your  whole

  • Using Clipboard content in script

    file:///C:/Documents%20and%20Settings/uSER/Desktop/clipboard%20forum.indd Hi friends, While i am using "find & change or GREP clipboard content" it automated lot of things in Indesign file. But i dont know how can i used in the script. We are using G