Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Wednesday, October 5, 2011

Eclipse Proxy settings - bug and workaround

Many a times I experienced weird behavior of eclipse network connectivity (despite providing proxy settings) especially while installing plugins from update sites.
However, didn’t pay enough heed to the issues and many a times moved on with installing the plugins by manually downloading it.

With Eclipse Indigo, as the Eclipse marketplace makes plugin installation quite easier, I thought of checking out the exact issue with eclipse network connectivity.

As always, found the bug and work around easily by searching on net (community power!!!)

The bug is with Eclipse proxy settings. Normally, when we enable proxy on eclipse, we enable all types of proxies – HTTP, HTTPS and SOCKS.
The issue is that if you add ‘SOCKS’ proxy entry, eclipse will ignore HTTP/HTTPS whereas normally you will always connect to an HTTP/S url.
So the solution is that remove ‘SOCKS’ proxy entry and keep only HTTP/HTTPS entry. (Make sure you select Active provider as ‘Manual’)

Following is the screenshot for the proxy setting.


Update: You need to restart your eclipse after making this change.

Cheers,
Sarang
Enhanced by Zemanta

Subclipse plugin installation in Eclipse Indigo on RHEL- Bug and resolution

I was facing issue while using subclipse plugin in my Eclipse Indigo on my RHEL (Redhat Linux) box.
Installation was successful but was giving error while connecting with SVN.

On searching for the solution, I found out that the issue was related to JavaHL. JavaHL is a "High Level" API and is provided with custom written C++ code to serve as the JNI bridge between Java code and the native libraries (C-libraries).

So the solution to the issue is providing JavaHL in eclipse classpath.
For me, the solution was relatively simple as I already had CollabNet SVN client installed on my box. If you don’t have thisclient installed, you will have to install it first from here – http://www.collab.net/downloads/subversion/redhat.html

CollabNet client contains required library (library name is libsvnjavahl-1.so)
So add following vm argument in your eclipse.ini right after the line that reads “-vmargs” and that should resolve the issue.
 
-Djava.library.path=/opt/CollabNet_Subversion/lib
 
Your eclipse.ini might look like this –
 
-showsplash
org.eclipse.platform
-framework
plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar
-vmargs
-Djava.library.path=/opt/CollabNet_Subversion/lib
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m

Refer this wiki page for more details and for resolving this issue on other operating systems - http://subclipse.tigris.org/wiki/JavaHL

Cheers,
Sarang
Enhanced by Zemanta

Friday, September 30, 2011

Eclipse settings for performance improvement

If you use eclipse, I am sure you have come across moments when you banged your head waiting for eclipse to respond.
By applying following settings, your eclipse performance should become bad, which otherwise is worst! (There is no such thing in this world called "Good Eclipse performance".)

Update your eclipse.ini file (in your <ECLIPSE-HOME> directory) with following settings.
(VERYIMPORTANT: Do NOT miss to update the “-vm” parameter (in bold below) to your own <JAVA_HOME>)

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
-showlocation
-vm
C:\PROGRA~1\Java\jdk1.6.0_20\jre\bin\client\jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512M
-Xmx512M
-Xss128k
-XX:NewSize=128M
-XX:MaxNewSize=128M
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-XX:CompileThreshold=5
-Dcom.sun.management.jmxremote

After applying these settings, if you ever get StackOverflowError, increase the value of “-Xss” to 192m (or 256m, if required).
To understand the significance of “-Xss” parameter, read this post on my blog.
Enhanced by Zemanta