Saturday, February 21, 2015

How to run Shell Script on Windows –Eclipse Kepler version

Quick How-To for Eclipse + ShellEd plugin.

Today, I would like to provide a how-to, or best saying - a tutorial for Eclipse Plugin ShellEd . This approach will help you to increase productivity, and avoid the need to login on linux and write your code. You can use your windows machine as virtual box and only publish your linux code when it is ready

0. Here it is my configuration:
Windows  7   professional
Eclipse (Version:Kepler Service Release 2)

1. Install Linux Tools Plugin
Within Eclipse: click Help --> Install New Software
Click "Available Software Sites" (link slightly below Add button)
Enable (check box): Shelled - http://sourceforge.net/projects/shelled/files/shelled/update/
Click OK
Under "Work with:" --> Select the recently enabled shelltools
Click Next --> Next --> Accept license agreement --> Finish
Restart Eclipse









Creating A New Shell Project
Create a new project: New Project Wizard --> Select Shell Script Project Wizard --> Click Next
Input the Project Name --> Click Finish (default setting are fine for now




Download Shell Interpreter
Link: http://sourceforge.net/projects/win-bash/?source=typ_redirect

Setting Up The Shell Interpreter
Navigate to Eclipse Preferences (Eclipse Menu --> Preferences)
Navigate to ShellEd Options --> Select Interpreters
Click Search --> Select the interpreter you would like to use --> Click OK



Entering Code
Insert a new file into the project --> Right click on Shell Project Name --> Select New --> Select File
Input file name --> Click Finish
Enter a few commands (Bash Interpreter for this example) and Save




Run The Script Within Eclipse
Click Run Menu --> Run As --> Run shell script



 Happy coding!

I hope it helps you,
Thiago Leoncio.