Posts

Showing posts from April, 2016

Getting started with Java in Eclipse

Image
1. Download Eclipse Obtain the installer from the following site: https://eclipse.org/downloads/ and complete the installation: 2. Create a new Eclipse project Open Eclipse and select File > New > Java Project. Give the project a name ('HelloWorld'): Click Next. And then click Finish. 3. Add your Java class Select File > New > Class: Set the Name field to 'HelloWorld' and check the box labelled 'public static void main(String[] args)': Click Finish. So that your project looks like this: 4. Write your code In this example, the proverbial "Hello World" example: [code language="java"] public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } } [/code] 5. Build and run your Java project: Select the down arrow next to the Run icon and select Run As > Java Application: Giving the desired "Hello World" console output: ...

Getting started with Mono in Linux

Image
Some instructions on how to get started with using Mono in Linux environments: from installation to running your first "Hello World!" example. Open up your terminal and issue the following commands: [code language="text"] sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF [/code] [code language="text"] echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list [/code] [code language="text"] sudo apt-get update [/code] [code language="text"] sudo apt-get install Mono-Complete [/code] Check that your Mono has installed by using the 'version' command: [code language="text"] mono --version [/code] We can now test our installation of Mono by writing some code, in this case the proverbial "Hello World!" example. Open a text editor of your choice and enter ...