Mar
17
2005
OK… duh… I read a couple of different articles tonight about using the ApplicationWindow class from JFace, but I missed both times that I had to include the org.eclipse.ui.workbench_<version>/workbench.jar and org.eclipse.core.runtime_<version>/runtime.jar to get it to work.
I was having another problem with my JFace demo application tonight when it came to Actions. I had created a couple of private inner classes to handle exit and another action that I was playing around with. Unfortunately, whenever I clicked on the menu item or the toolbar entry, I would get a stack trace in the Console window in Eclipse.
After doing some searching on Google for the past hour, I finally found out that you also have to include org.eclipse.osgi_<version>/core.jar. I am not sure exactly what this is for as of yet, but it allows everything to work properly, so it got added.
Technorati Tags: JFace, ApplicationWindow, Java, Eclipse
Mar
17
2005
After using Ant and jCoverage at work as of late, I decided to creat a build.xml for my small application that I am writing for myself at home. I have run into a problem that I cannot figure out at this point, though. Whenever I do a full build (including jCoverage reports), I get the error shown below. Has anyone seen anything like this?
coverage:jcoverage.instrument:
[instrument] jcoverage 1.0.4 copyright (c)2003 jcoverage ltd. http://jcoverage.com/
[instrument] instrumenting 13 classes to C:\Projects\MyContacts\build\instrumented
[instrument] Exception in thread “main” org.apache.bcel.classfile.ClassFormatException:
Invalid constant pool reference: 1066. Constant pool size is: 1024
I am not sure what the problem is with this build. It follows everything that we do at work. Unfortunately, this is definitely something that I do not know enough about and I am unable to find too much information about it on Google.
If anyone has any insight on this problem, I would greatly appreciate any help.
Technorati Tags: Java, Ant, jCoverage
Mar
17
2005
OK… I took a dive into JFace tonight. This is the first time that I have played around with it. For those who do not know, JFace allows you do UI development using the SWT widgets without a lot of the overhead code that you would require if you were using the raw widgets.
I was following along with an article on JavaWorld called “Rich clients with SWT and JFace”. The article shows a very simple demo that displays a simple window. The class extends ApplicationWindow, which is a more robust version of the JFace abstract Window class. Unfortunately, when I type in everything as shown and try to run it in Eclipse, I get an error that says:
Exception in thread “main” java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor at com.pshack.application.Application.main(Application.java:30)
I changed the demo to create a separate Window class and use that instead of extending from ApplicationWindow. This works. I am not sure why extending from ApplicationWindow does not work for me. It might be because I am using JDK5, but I doubt it. I am sure it is just something that I do not understand as of yet.
Technorati Tags: Java, JFace, SWT