PRSSA Logo
Home  |  About  |  Events  |  Calendar  |  Membership  |  Members   |  Resources   |  Contact

How to install eclipse and JDK on Windows:

To download eclipse go to http://www.eclipse.org/downloads/ and choose the classic version.
To get the JDK go to http://www.oracle.com/technetwork/java/javase/downloads/index.html and choose the Java download option.

Trouble shooting:

If eclipse is not starting or you are unable to create new classes try renaming your .eclipse folder. The command to do so is “mv ~/.eclipse ~/backupEclipse”. If this does not work try moving your workspace directory to a different folder and move projects back one at a time.

If your java files are not showing you errors or any other usefull information make sure they are stored in the “src” folder.

Show line numbers:

Right click on the "src" directory under your project, New->Class
Give the new class a name
check create "public static void main(String[] args)" method stub

New class:

Right click on the "src" directory under your project, New->Class
Give the new class a name
check create "public static void main(String[] args)" method stub

Debugging:

Double click in the grey bar on the left to set your break point(s). Run the program, when the code execution hits your break point Eclipse will ask to change modes into "Debug" mode. In debug mode, you can use the run button to continue running the program, or you can use the step over/into buttons to execute one line at a time or follow method declarations. As the debug runs, you can see all of the active values change in the top right panel. To exit debug mode, click "Java" view in the top right corner.

Getters/setters

As your code becomes more complex, you will need to add accessors methods. Fortunately Eclipse can do this for you.
   source->generate getters and setters
   check the variables you want
   click finish, and Eclipse will generate the getters/setters for you.

Formatting:

Ctrl-Shift-f auto format/indent code
options can be controlled through
Window->Preferences->Java->Code Style->Formatter->Edit->Indentation

Addons:

This example will show how to install the Vrapper plugin, but this method is used for any plugin.
Vrapper (use vi commands in eclipse)
Help->Install New Software
workwith: http://vrapper.sourceforge.net/update-site/stable/
check Vrapper->next->next->Read the liscense/accept->Finish

Themes:

install eclipse plugin:
  http://eclipse-color-theme.github.com/update/
find theme:
  eclipsecolorthemes.org
window->Preferences->General->Apperance
Select desired theme.

Contact Us    |    Site Design by Blair Greenwood