Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Useful tips for Eclipse

...

http://benpryor.com/blog/index.php?/archives/4-Top-10-Tips-For-New-Eclipse-Users.html

An interesting link to hide the jar files from the left section of the files in the Eclipse IDE.
http://raibledesigns.com/page/rd?anchor=eclipse_tips 

Use Eclipse Short Cuts: http://eclipse-tools.sourceforge.net/shortcuts.htmlImage Removed
Most important shortcuts

  1. CTRL SHIFT R for finding ressources!
  2. CTRL H for finding text in files

...


Configuring Eclipse to work with OFBiz

Setting up Eclipse to work with OFBiz is easy. There are two ways to import OFBiz into Eclipse: You can either allow Eclipse to download OFBiz directly from SVN, or you can import an already downloaded copy of OFBiz (from SVN or otherwise) from the filesystem.

Importing OFBiz from the filesystem into Eclipse

If you have already downloaded OFBiz and do not wish to have Eclipse handle SVN pulls for you, Eclipse can import OFBiz from the filesystem as well. OFBBiz includes a ".project" file to allow Eclipse to automatically configure the project for you. This means that if you have already downloaded the code (from SVN or otherwise), all you have to do to import the project is:

  • Right-click in the Navigator window and click on Import.
  • Select "Existing Project into Workspace" and click Next.
  • Click Browse and select the directory that contains the ".project" file, then click Finish.When this is complete, a new project named "ofbiz" will now appear in your Navigator. This will not copy the project to Eclipse's workspace directory: it will remain wherever it was before the import. If you want the OFBiz files in your workspace directory, you must move them there before you do the import.

Building OFBiz with Ant from within Eclipse

You will next need to build OFBiz with Ant. To do this, go to the Naviagator panel and do the following:

  • Click the "+" next to the ofbiz project.
  • Right click on the "build.xml" in the root of the ofbiz project and select "Run Ant..."
  • The defaults are fine for the initial build. Click Finish.If you get the following error message:

javac[ BUILD FAILED: file:<Project Dir>/build.xml:32: Unable to find a javac compiler;

com.sun.tools.javac.Main is not on the classpath.

Perhaps JAVA_HOME does not point to the JDKsee the instructions for modifying the Eclipse JVM below.

...

Using SVN from within Eclipse

If you want to do the SVN pull from within Eclipse, use the following steps:

First you need to install Subclipse

  • see Installation Instructions for Eclipse 3.xThen connect to the repository:
  • Bring up the "SVN Repository" panel in Eclipse (Window/Open Perspective/SVN Repository Exploring)
  • Right-Click within panel/New/Repository Location
  • Click on Finish.Now, do the initial checkout:
  • Click the "+" next to the new repository, then Right-Click on trunk and select "Checkout...". Select "Check out as project in the workspace" and click on "Finish".This will create a new project called "ofbiz" and download the OFBiz files directly from SVN. To sync your project with SVN in the future, right-click on the project and click Teams/Syncronize with Repository.

...

Additional Eclipse and OFBiz resources

Changing Eclipse's JVM

If you are running Eclipse using JDK 1.5 then you will also need to ensure Eclipse knows where to find your JDK 1.4 install: "Windows - Preferences - Java - Installed JREs" add it and make sure it is checked as the default. Although this says JREs make sure you add the JDK and not the JRE install!
javac[ BUILD FAILED: file:<Project Dir>/build.xml:32: Unable to find a javac compiler;
If you have received the above error, you most likely have more than one JVM (e.g. a JRE and a JDK) installed. Eclipse uses the first Java VM it finds on your computer's PATH variable. In this case, it is most likely a JRE, not a JDK. Ant uses the same Java environment as Eclipse, no matter what you may specify in the compiler attribute. Because it is a JRE, you will not be able to compile.

To correct this, you must tell Eclipse to use the SDK. To do this, modify the shortcut you use to launch Eclipse and change the target to the following:

<ECLIPSE_DIR>\eclipse.exe -vm <SDK_DIR>\bin\javaw.exe

Original source: http://www.ryanlowe.ca/blog/archives/000386.phpImage Added

...

Tuning Eclipse

Tuning the JVM heap size can help improve WSAD/Eclipse's responsiveness. You can do that by using the -vmargs -Xms -Xmx settings in the command-line argument (or wsappdev.ini file).
Windows:
C:\java\eclipse_3_0_1\eclipse\eclipse.exe -vmargs -Xmx1024M -Xms1024M
For more on tuning Eclipse JVM heap size, you can refer to this IBM article. |