Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Sunday, February 24, 2008

Java: Eclipe's notion of classpath 101

In Eclipse, if you don't specify the build path, your classes by default will be placed in the base classpath of your project module. E.g.
C:\workspaces\myproject\myModuleEJB\classes\xxx

Therefore, your base classpath is C:\workspaces\myproject\myModuleEJB\classes\xxx

Consider two spring config source folders :
C:\workspaces\myproject\myModuleEJB\testsrc\spring\testApplicationContext.xml
C:\workspaces\myproject\myModuleEJB\configsrc\spring\businessRules.xml

testApplicationContext.xml is referring to businessRules.xml e.g.

testApplicationContext.xml
===================

<bean id="businessRules" init="false" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list><value>spring/businessRules.xml</value></list>
</constructor-arg>
</bean>


both testApplicationContext.xml and businessRules.xml are compiled by Eclipse into
C:\workspaces\myproject\myModuleEJB\classes\spring\testApplicationContext.xml
C:\workspaces\myproject\myModuleEJB\classes\spring\businessRules.xml

therefore, if testApplicationContext.xml wants to refer to businessRules.xml, the testApplicationContext.xml has to refer to the base classpath location of businessRules.xml
ie. /spring/businessRules.xml

Sunday, January 06, 2008

eclipse: Installing JBoss Tools (formerly known asn JBoss IDE or Hibernate Tools) and SpringIDE via Update Manager

Hibernate tools can be obtained from JBoss tools. To add JBoss tools in eclipse, add this as a "Remote Site" in your Eclipse Update Manager
http://download.jboss.org/jbosside/updates/stable
http://download.jboss.org/jbosstools/updates/stable

For more info, see :
http://docs.jboss.com/jbosside/install/build/en/html/installation.html
http://labs.jboss.com/tools/download/index.html

SpringIDE - just add this to your download manager
http://springide.org/updatesite