torstai 17. lokakuuta 2013

Java - Hello World with Eclipse Quickly

Open Eclipse and create new "Java Project"
Give a name for your project

Click Finish

Create new class inside src folder

Write "main" inside hello and press CTRL + SPACE and ENTER to autocomplete

public class Hello {

public class Hello {
    public static void main(String[] args) {

write "syso" and press CTRL + SPACE
then add print text

public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello World!");

 It prints Hello World! to Console.

TIPS: to install JDK on Linux:  sudo apt-get install openjdk-7-jdk

keskiviikko 2. lokakuuta 2013

How To Use CVS-VersionControl (School notes)

How to pull existing project from CVS:
Start Eclipse

Notice that only one person in team pushes the project into workspace and then other team members pull the project from cvs.

Select File -> New -> Project
and select CVS - Projects from CVS

From the next window select existing project.

Host: // 999 change this to your own group number
Repository path: /home/cvs
user: accountname
password: your pw
Connection type: extssh
click next
Enter Module Name:
choose use an existing module
select the project you want and click finnish

How to push
Right click your project, first select update and then commit

Creating new project:
Simply right click again your project, select team menu and choose share project.