org.eclipse.jface.util.Assert$AssertionFailedException Caused by Display == null [message #445179] |
Wed, 27 October 2004 10:54  |
Eclipse User |
|
|
|
Originally posted by: alfiewong.gmail.com
Hello,
I seem to have a problem creating a Display object where everytime I try
to create a display object I get this problem.
java.lang.ExceptionInInitializerError
Caused by: org.eclipse.jface.util.Assert$AssertionFailedException: null
argument;
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:139)
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:116)
at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:77)
at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:65)
at
org.eclipse.jface.resource.JFaceResources.getImageRegistry(J FaceResources.java:255)
at org.eclipse.jface.wizard.Wizard.<clinit>(Wizard.java:64)
Exception in thread "main"
and All I do is:
public static void main(String[] args)
{
Display display = new Display();
Shell shell = new Shell(display);
shell.setSize(300,300);
Label label1 = new Label(shell, SWT.WRAP);
label1.setText("Does this work?");
label1.setSize(100,20);
label1.setLocation(30,30);
shell.open();
while(!shell.isDisposed())
{
if(!display.readAndDispatch())
{
display.sleep();
}
}
display.dispose();
}
Am I missing something? I'm running Windows XP home on Acer Laptop.
Thanks
|
|
|
Re: org.eclipse.jface.util.Assert$AssertionFailedException Caused by Display == null [message #445274 is a reply to message #445179] |
Mon, 01 November 2004 09:30  |
Eclipse User |
|
|
|
Since your main does not use any JFace code, it is a mystery to me. Are you
sure the code below is exactly what you are running? The error comes when
instatntiating a JFace Wizard class. Where in your code are you doing this?
"Alfred Wong" <alfiewong@gmail.com> wrote in message
news:clocgc$dge$1@eclipse.org...
> Hello,
>
> I seem to have a problem creating a Display object where everytime I try
> to create a display object I get this problem.
>
> java.lang.ExceptionInInitializerError
> Caused by: org.eclipse.jface.util.Assert$AssertionFailedException: null
> argument;
> at org.eclipse.jface.util.Assert.isNotNull(Assert.java:139)
> at org.eclipse.jface.util.Assert.isNotNull(Assert.java:116)
> at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:77)
> at org.eclipse.jface.resource.ImageRegistry.<init>(ImageRegistry.java:65)
> at
> org.eclipse.jface.resource.JFaceResources.getImageRegistry(J FaceResources.java:255)
> at org.eclipse.jface.wizard.Wizard.<clinit>(Wizard.java:64)
> Exception in thread "main"
>
> and All I do is:
>
> public static void main(String[] args)
> {
> Display display = new Display();
> Shell shell = new Shell(display);
> shell.setSize(300,300);
> Label label1 = new Label(shell, SWT.WRAP);
> label1.setText("Does this work?");
> label1.setSize(100,20);
> label1.setLocation(30,30);
>
> shell.open();
> while(!shell.isDisposed())
> {
> if(!display.readAndDispatch())
> {
> display.sleep();
> }
> }
> display.dispose();
> }
>
> Am I missing something? I'm running Windows XP home on Acer Laptop.
>
> Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03855 seconds