We use a combination of Ubuntu + Eclipse + PHPEclipse + Subclipse in the office as a stock standard developer machine setup. Developers are free to make changes, but when in doubt this is what they get.

Over the pass couple of months though, as we have added more code into the repository we noticed that the Eclipse had really been slowing down and crashing frequently, primarily due to large memory consumption. However , developers who had dropped the Subclipse plugin and resorted to the command line client (which is the way I like it ;-) ) did not seem to be having any issues.

We had until then also been using the  packaged version of eclipse that was provided by Ubuntu. Seeing that there was a new version of Eclipse 3.4 and Subclipse 1.4 out we decided to see if there was a way to solve this issue and upgrade our default install.

Long story short, it turns out that the Subclipse can either be made to use SVNKit which is a pure Java implementation  or JavaHL which is a wrapper for the native C library. Turns out we had been using SVNKit all this while. No prize for guessing which one is faster and handles large repositories better ;-) .

The problem though (as identified in the FAQ entry) that since the JavaHL requires local library support you need to make sure that the version of Subclipse you are using supports the version you have installed in your machine. With Ubuntu 8.04, the  packaged version is libsvn-javahl_1.4.6 , which means that you are stuck with Subclipse 1.2, as Subclipse 1.4 requires the  libsvn from Subversion 1.5. Looking through Google I stumbled upon Basilisk’s blog entry that details the problem out and enumerates possible solutions. I choose the option of running Subclipse 1.2.

So a quick recipe to getting Eclipse 3.4 (directly from the download site) + Subclipse 1.2 with the JavaHL binding running on Ubuntu 8.04 is as follows:

1. In a terminal window, do the following. This line of command is used for installing java6-jre. You need to use the Sun provided java for things to work properly.

sudo apt-get install sun-java6-jre

2. Then type this to install the libsvn-javahl library that will be used by Subclipse.

sudo apt-get install libsvn-javahl

3.Type the following to set the Sun-Java as your default JVM. This will make sure that whenever an application looks for the java command it will be using the Sun provided version.

sudo update-java-alternatives -s java-6-sun

4. Then go to the eclipse site http://www.eclipse.org – got to the download section and (http://www.eclipse.org/downloads/) and download the Eclipse package relevant for your use case. For my case I downloaded Eclipse Classic from http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.4-200806172000/eclipse-SDK-3.4-linux-gtk.tar.gz

5. Save it into your destination folder. For my case I saved it into my home dir. (And that is what the instructions will assume from this point onwards).

6. The in a terminal do the following. Please note that the path to cd into (in the example’s case it is ~) should be replaced with the path that you actually saved the download into during Step 5.

cd ~
tar -xvzf eclipse-SDK-3.4-linux-gtk.tar.gz

7. If you type ‘ls’ now there should be an additional folder called ‘eclipse’.

8. Now we need to edit the eclipse.ini file which is in the newly created eclipse folder and add a single line at the end of the file as follows “-Djava.library.path=/usr/lib/jni” I found out that this is so that the JavaHL libraries are picked up by Eclipse.

gedit ~/eclipse/eclipse.ini

Original text:
-startup
plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.100.v20080606
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m

After editing:
-startup
plugins/org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.100.v20080606
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m
-Djava.library.path=/usr/lib/jni

9. Now you can start Eclipse by clicking on the Eclipse icon with the eclipse folder.

10. Startup Eclipse.

11. Click on Help->Software Updates->Available Software from file menu in Eclipse.

12. Click on the “Add Site” button.

13. Enter a name i.e subclipse, and the URL: http://subclipse.tigris.org/update_1.2.x (Thanks Basilisk!) (Note the link to ver 1.2 not 1.4)

14. Click on “Finish”.

15. A list of features will be presented, open the list and check the one labeled “subclipse”. There will be optional packages available as well. I was only interested in the core subclipse components.

16. Click on “Next”

17. Keep clicking through till your done.

18. The install will ask you to restart your eclipse, choose yes and continue.

19. Upon Eclipse restarting go to Menu item Window>Preferences. Once the pane Pops up select the item Team > SVN. The preference should come up and there should not be any errors. If errors come up it is probably caused because for some reason your default java is still not pointing to the sun java. For more info on this you can refer to this ubuntu forum discussion.

Anyway – I hope somebody finds this useful. Feel free to add amendments and corrections in the comments.

4 Responses to “Ubuntu Subclipse woes – use JavaHL bindings”
  1. oka says:

    > No prize for guessing which one is faster and handles large repositories better
    Hello! I can’t say I like the above statement :) , but do you have any exact issues to report when SVNKit Adapter was used? Please also note, that using Subclipse 1.2 will not allow one to use Subversion 1.5 features.

    Alexander, SVNKit developer :)

  2. admin says:

    Hello Alexander,

    Thanks for dropping by. I was being flippant with that statement my statement and I apologise for not backing it up with more concrete data. I did not keep enough data to pin point to an exact issue, but what we did experience is that when using the SVNKit adapter the memory consumption was noticeably higher (in comparison with the JavaHL adapter ) So much higher that it Eclipse kept crashing. Yes I do understand that using Subclipse 1.2 limits us to Subversion 1.4 features. We will probably move to Subclipse 1.4 when Ubuntu Intrepid Ibex is out (which I believe will ship with subversion 1.5). I will also probably give SVNKit another run and see if I can come up with more useful data for you.

    Thanks again for dropping by.

    Mohan

  3. SVN + Eclipse 3.4 + Ubuntu 8.04 « Victor V. Serta’s Tech Blog says:

    [...] http://mohangk.org/blog/2008/09/ubuntu-subclipse-woes-use-javahl-bindings/ [...]

  4. sillyxone says:

    Updated 5/20/2009:

    Eclipse PDT 2.0 using SVNKit 1.2.2 with Subclipse 1.4.x is still slow. While the CLI svn client takes less than 5 seconds for an update with very little network bandwidth and just a few blinks of HDD, Subclipse takes about 15 seconds with saturated network bandwidth (DSL 768Kb/s) during the whole time with the HDD crunching like crazy (click..click…click…)

    Anyway, changed to Subclipse 1.2.x with JavaHL, as fast as CLI.

Leave a Reply

online vitamins order prozac natural pet products breast enlargement hypnotherapy cds medication to help stop smoking buying generic cialis delivery tramadol generic online ultram antibiotic control pain cheap sustiva online cialis without prescriptions blood pressure symptoms lisinopril dosages pneumonia vs bronchitis alprazolam xenical for sale cialis viagra osteoporosis calcium drug cheap zocor muscle women itching eczema viagra fast treatment for blood clots order sublingual cialis ambien overdose drug phenergan tips for increasing breast size stop smoke valium used treatment of depression how does xanax work buy betapace chloramphenicol antibiotic benadryl dosage scabies cure asthma cures dog ear problem synthroid doses How To Buy Viagra Online atacand generic bust enlarge buy cialis delived next day metoprolol dose alzheimer drugs buy prandin claritin dose control blood pressure klonopin mg dose buy cialis in the uk ambien max dosage new pain meds what is an antibiotic male erectile dysfunction cures for blood clots buy cheap cialis free samples viagra voltaren 100mg clonazepam treatment taking viagra after cialis pet health care hoodia order medical skin care lines womans health how to increase bust effects of celexa order medication without prescription weight loss diflucan fungus hydrochlorothiazide 25mg natural cure arthritis muscles human body online antibiotics high blood pressure treatments relafen effectiveness diet hoodia gum clean dogs ears antibiotics uses anti nausea medications stopping snoring voltaren tablets order cardizem recurrent urinary tract infection new arthritis medicine viagra diazepam 10 mg capsule omeprazole clomid side effects body building diet online viagra prescription januvia treating lung infection buy mexiletine azithromycin penicillin xanax no prescritions acai cleanse how to prevent pregnancy what is antibiotics withdrawal soma information nexium information celebrex weight loss product for women treatment for vomiting allergy treatments side effects ativan treatment scabies strattera generic parkinson disease medicine buy cheap tadalafil uk order zoloft cialis cheap no prescription valium maximum dosage diovan drugs no prescription nolvadex dosage ordering condom stop premature ejaculation water pill tramadol 100 mg famotidine 20mg weight loss system phentermine 37.5 mg arthritis support pharmacy software levitra online buy cialis tadalafil new blood pressure drug trental drug hair loss treatment prices drug doxepin levitra online eye infections in dogs ativan medication diet pill prescription buy ambien online cheap advair 250 diskus alprazolam levitra without a prescription a reliever of arthritic pain chronic pain management high blood pressure symptoms how to prevent hangover cialis online without prescription treatment for leukemia scabies treatments prescription drugs build muscle strength zyban prescription back muscle pain body building info treatment of gout increase your erection cheapest place to buy phentermine better erection citalopram medication i need to buy viagra online drugs without prescription natural cure for erectile dysfunction no hangover flovent asthma klonopin effects diazepam lorazepam betablockers women's health online weight loss program care health pet effective acne products discount brand viagra acne care treatment calcium bone loss purchase medicine on line men health taking 20mg valium lilly cialis buy cheap cialis xanax cheapest generic cialis online how to make my teeth white drugs lower heart rate treating urinary tract infection viral skin infection cat health care phentermine no perscription soma online prescription healthy human bones viagra to buy dental care for cat calcium chanel blocker buy zyrtec over the counter drugs cardura alcoholism treatment program back pain medicine drugs online prevacid online sertraline tablets xanax usa medications for high blood pressure allegra effects side skin fungal infections viagra fast cheap anxiety pills powerful weight loss cheap online cialis free prescription drugs cialis buy online hair loss prevention for men generic prilosec buy karela face skin care pravachol drug treatment for high blood pressure xanax by mail dog antibiotics drug loratadine zoloft dosages tooth whitening procedures treatments chlamydia effexor and tramadol amitriptyline uses insomnia pills buy viagra soft online sleep disorders treatment breast enhancement products viagra how long does it last active ingredient cialis pain drugs removing retention fluids buy pain medications cure vaginal yeast infection chlamydia cures menstrual cycle problems discount cialis online fluconazole capsule acne treatment for teenager viagra with out prescription lower my blood pressure clonazepam high doses cat infections fat burning discount hiv medications weight loss web sites plan b buy cheap cialis how to prevent pregnancy how to get pain meds body building diets ambien withdrawl symptoms where to buy cheap phentermine ativan what is free stop smoking products diet supplements that work how to buy diet pills loss of hair help with sleep prostate cancer treatments new hair loss remedies asthma treatments medication for anxiety buy canada levitra natural help sleeping chlamydia symptoms men depression and anxiety cheap wellbutrin arthritis support cialis softgel drug stores pharmacies prescription medications Secure Viagra levothyroxine dosages what does viagra do Levitra Online Pharmacy new cat products body acne treatment buy cialis generic online drug for depression xenical no prescription treatment of chest pain ultram used for eye infections in dogs sildenafil kamagra mobic tablets prescription for acne viagra online purchase cheap effexor anti smoking zolpidem breast augmentation information help for snoring viagra order xenical for sale antibiotic natural klonopin vs valium online vitamins drug trileptal weight loss information bipolar disorder treatment attention deficit hyperactive disorder buy phentrimine prescription flomax cancer treatment drugs drugs to help sleep drug store cholesterol treatment itching ointment left heart failure attention deficit best weight loss products cure for aids retin a buy viagra online cheap sinusitis antibiotics metoclopramide pediatric side effects ativan generic valtrex natural arthritis cure online kamagra cialis without rx pet safe products male sexual power internal human parasites heart attack and prevention buy lincocin buy levitra viagra online how to find medication prescriptions xanax ceftin zantac ranitidine build muscle strength viagra buy online viagra buy viagra viagra for sex buy cialis without a perscription drugs for alzheimer's disease glutamine erythromycin online medication for dogs maxalt dosage hair loss home remedy prevention and osteoporosis blood pressure discount cialis online buy premarin on line stop smoking tablets natural breast enhancer discount hiv medications sleep problems with children clindamycin drug osteoporosis treatment acne treatment for teenager diet for diarrhea buy mevacor treatment for insomnia left side pain phentermine with hoodia relieve lower back pain drugs use to treat herpes lexapro medication diet pills cheap vigrx cialis prescription online breast cancer support body building program viagra online increase women sex drive care for a cat cheap revatio discount medicines for pets pfizer viagra treating sleep disorders what is premature ejaculation cialis levitra viagra diazepam vs clonazepam medications on line acne tips cheap uroxatral immune system support products carbamazepine online imitrex health product woman irritable bowel soma for sale weight loss for women over 50 diabetes drugs best fat blockers minocycline free nexium nolvadex 20mg med orders buy valium online cheap natural arthritis cure cheapest celebrex ativan pills exercise for increasing breast size products for back pain pain meds order online dog bowel problems lisinopril dosing bacteria producing antibiotics how to get viagra dementia treatment professional viagra best birth control dog ear canal klonopin effects canada in levitra cialis comparison depakote overdose remove fluid natural acne products bupropion 150mg skin repair allopurinol drug ambien overdose gonorrhea women symptoms before and after weight loss finasteride dosage dog stress dog skin disorder information on valium purchase birth control online ultram used for cialis on line crestor dosage tramadol high over weight dog buy glyset diet pill dosage zoloft over the counter drugs viagra canada prescription purchase cytotec treatment for hypertension side effects of prescribed pain pills motion sickness stop premature ejaculation drugs affecting levitra long term ambien new medication for cancer treatment medication skelaxin prescription chlamydia viral throat infection vardenafil effectiveness buy online viagra viagra blood clot drugs wellbutrin dosages total health avapro 150mg ramipril medication buy cialis online viagra weight loss meds on line