Hybris Commerce workspace settings for Eclipse/STS IDE

Posted by Unknown on

Recently I took up the task of setting up Hybris Commerce development environment and in the process I had to setup Hybris workspace on my eclipse and STS IDE, Hybris comes with a ton of extensions and modules and I ended up having atleast 30 different projects on my workspace to resolve the build errors, with additional projects came the requirement of increased heap memory else STS and Eclipse would either freeze or crash during the ant build phase with an out of memory error.

So here are couple of steps that should be included to support a clean Hybris commerce workspace.
There is a very detailed document on the Hybris WIKI for recommended Eclipse and STS settings so make use of these steps as a addendum to Hybris official document.

64 bit JVM

No matter which IDE you make use of it is important to make sure your system is running a 64 bit version of the Oracle JVM, 32 bit JVM has a upper limit of 2GB RAM , so to break this ceiling we need to make use of 64 bit JVM. you can validate this by running the "java -version" command, the output should be as follows and this indicates that we have a 64 bit version of the JVM.

$java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

64 bit IDE and Java Heap Setting (Eclipse or STS)

Make sure you download 64 bit version of  Eclipse or STS IDE, once you have extracted and installed the respective IDE go ahead and edit Eclipse.ini or STS.ini file and make changes to increase the max heap size, refer following file as a reference from my toolkit setup.




Java Heap Setting for the ANT Task

The heap setting defined for the IDE in the previous step is only allocated to the IDE, something that most of us misunderstand here is this heap setting does not automatically apply to the process launched within within the IDE, for instance if we launch ANT build task the heap setting is still capped at 2gb.

To increase the max heap setting within the IDE you have to set the VM arguments for the Ant Build in the Run->External Tools->External Tools Configurations dialog. Click the JRE tab and set the usual -Xmx and -Xms params as needed.



Restart the IDE and perform a ANT build, monitor the heap usage from the Task manager and you should notice that the IDE is crossing the threshold of 2GB limit now.



12 comments:

  1. Hello, just wanted to say, I loved this article. It was practical.
    Keep on posting!
    baixar whatsapp , descargar whatsapp , descargar facebook , descargar facebook apk

    ReplyDelete
  2. Hi Hari, Munmun here.

    I am now working full time on hybris platform (version 5.4) so you can route some hybris queries my way, if you wish.
    Again, your blog is very useful. I have been following it since its inception :)

    Cheers,
    Munmun

    ReplyDelete
    Replies
    1. Hi Munmun,

      I am facing some issues while 5.4 initial installation.
      Sucussefully comand setantenv.bat is setting up ant home. But unable to call the ant to build. Error is showing as it is not an internal or external comand , operable program or batch file. I have tried all methods of setting the environment variables.

      Your suggestions would be appreciative on this...
      Nagaraja Sarangamath

      Delete
  3. Hello admin how are you doing?
    I read your post about Hybris Commerce workspace settings for Eclipse/STS IDE.
    Thank you so much for sharing this post.
    123movies

    ReplyDelete
  4. A camp-follower in ratty apparel free online movies quietly surpassed him a canteen. Mennaus stopped to look at her. She used to be homely with an sick temper, however still a greater sight than what he used to be used to.

    ReplyDelete
  5. I really thank you for the valuable info on this great subject and look forward to more great posts. Thanks a lot for enjoying this beauty article with me. I am appreciating it very much! Places you need to visit in 2019. ... Upgrade your travel photos with these lightweight cameras that pack a punch ... Enjoy the world's best places to travel with Things to do.

    ReplyDelete
  6. Thanks For Posting This usefull Information Techdhyan

    Thank You For This Article

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. I can relate to some of the experiences you mentioned. Dealing with uncertainty is never easy. However, it's encouraging to hear how you were able to push through challenges with perseverance and hope. It's inspirational to see others overcome adversity through resilience and hard work. tarpaulins

    ReplyDelete
  9. By Implementing these best practices and leveraging existing resources at your disposal, you can simplify the setup of your Hybris Commerce development environment. boats for sale abu dhabi

    ReplyDelete