Depending on what type of application you are talking about you can simply add this parameter to the 'java' command like 'java -Xmx1024m your.class.name.here'. For other environments like application servers etc. there are usually different configuration files where you can specify these settings. You can also specifiy the heap size if you start a Java application from within an IDE.
There are 2 possible reasons why it didn't fix the problem:
1) Your application really needs more memory (withour more details impossible to say). What do you think?
2) Now only Eclipse (the IDE) uses more memory but the applications you start from Eclipse use other settings. Unfortunately I don't have an Eclipse installation here to check where you can explicitly specify the JVM settings for a specific application. It's somewhere in the run configuration dialogs.
My preferred way to configure Tomcat is to use the CATALINA_OPTS environment variable. For Linux systems you can add something like export CATALINA_OPTS="-Xmx1024m" to your bashrc script. On Windows you can add the variable like any other environment variable.