University of Malta

UOM Main Page
Apply - Admissions 2016
Campus Map button

To use LarvaLight, include the JAR file in the class path. Subsequently, the asserted Java system should be compiled and run using AspectJ. It is also crucial to include the JAR file in the aspect path and enable assertions.
If you are running your system outside of Eclipse:

1.     First compile your code (assuming a main class in a package called “ordinary”) using AspectJ:

ajc -cp ".\aspectjrt.jar;.;.\larvalight.jar"

-aspectpath ".\larvalight.jar" src\ordinary\


2.     Secondly, run your application using AspectJ with assertions enabled:

call aj5 –ea -cp ".\larvalight.jar;.\src" ordinary.Main


In Eclipse (assuming AJDT plugin is installed):

1.     First ensure that the project to be monitors has been converted to an AspectJ project. This can be done by: Right-click Java project >> Configure >> Convert to AspectJ Project

2.     Next, setting the class path can be done by:

a.     Paste larvalight.jar under the project folder and refresh the project in Eclipse

b.     Right-click Java project >> Build path >> Configure build path...

c.     Go to the Libraries tab >> Add JARs... | Choose larvalight.jar

3.     The aspect path parameter can be set through the following steps: Right-click Java project >> AspectJ Tools >> Configure AspectJ Build Path | Choose larvalight.jar

4.     Finally, it important to ensure that Eclipse is using a JDK to run the monitored system and that assertions are enabled:

a.     Go to Window >> Preferences

b.     From below Java choose Installed JREs

c.     Select a JDK (if no JDK is available add one by choosing Add...) and click Edit...

d.     In the “Default VM arguments” add -ea

Ongoing projects page updated
We are proud to present our team of graduates and postgraduates and the list of projects we are currently working on. Click <Ongoing Projects> to find out more...
LarvaLight tool launched
Visit the <LarvaLight tool page> for more information
Interested in collaborating?
Checkout our industry collaboration models <here>
Last Updated: 7 March 2014

Log In back to UoM Homepage