• Entries (RSS)
  • Comments (RSS)

Increase the console output size in RAD

Posted by | Posted in RAD | Posted on 01-04-2008

Tagged Under : ,

To increase the console output in RAD, WSAD, or eclipse, go to Window -> Preferences -> Run/Debug -> Console.

Select the Limit console output and enter the number of characters you want in the console buffer size. Save the setting.

 

 

Java and HTTP Proxy Settings

Posted by | Posted in Java | Posted on 29-11-2007

Tagged Under : ,

How to connect to internet from Java program through a proxy? The answer is very simple Just add the following arguments to the virtual machine

    java -Dhttp.proxyHost=hostname -Dhttp.proxyPort=port -Dhttp.proxyUser=username  -Dhttp.proxyPassword=passowrd

or just put set these System properties using the code.

   System.getProperties().put("http.proxyHost", "hostname");
   System.getProperties().put("http.proxyPort", "port");
   System.getProperties().put("http.proxyUser", "username");
   System.getProperties().put("http.proxyPassword", "password");

If your proxy doesn’t require an authentication, you just need to set proxyHost and proxyPort properties only.

But the fist method wouldn’t work if we are running our program from within Eclipse as we don’t have command line access. So to set the proxy properties in Eclipse just go to Run menu and click on Run. A dialog box would appear and in the first tab (Main tab) enter your main class and other information and in the Arguments tab under VM arguments just add the following line.

   -Dhttp.proxyHost=hostnmae -Dhttp.proxyPort=port