Tuesday, November 15, 2011

Eclipse - Run Configuration

To run HelloWorld.jar in Eclipse, we will create a 'Run Configuration'

Go to Run->Run COnfigurations->Java Application->HelloWorld

Eclipse created this Run Configuration when we earlier ran the /bin/HelloWorld.class
Now we want to run /target/HelloWorld.jar

Go to the Classpath tab -> User Entries:
Remove -> 'HelloWorld(default classpath)'
Add jar -> /target/HelloWorld.jar

If you run this configuration, it will execute the HelloWorld.jar

No comments: