Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/906941/#msg_906941
I walked through the tutorial to build HelloWorld! and it worked. Then I tried walking through the tutorial for HelloWorldSWT. When I had problems, I deleted the HelloWorldSWT project and started over, I let the tutorial "do it for me" as much as possible.
But it still doesn't work.
I've tried the Organize Imports and can see no change. Where would I look to see the changes from this command?
Here's the code for the HelloWorldSWT.java:
public class HelloWorldSWT {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Hello world!");
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
Here's the errors after I compile:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Display cannot be resolved to a type
Display cannot be resolved to a type
Shell cannot be resolved to a type
Shell cannot be resolved to a type
at HelloWorldSWT.main(HelloWorldSWT.java:9)
The tutorial says:
You will get compile errors. Right click in the Java editor and select Source > Organize Imports, then save your changes.
I've done this. Many times. I've tried the ctrl+shift+o and I still get the compile errors.
Why does this not work?
I really appreciate any help you can give me. Thank you!
]]>Jason Clark2012-09-03T01:31:44-00:00Re: HelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/908566/#msg_908566
org.eclipse.swt.{platform}.{os}.{arch} and not the org.eclipse.swt.like mine would be
org.eclipse.swt.win32.win32.x86 then continue on with the rest of the tutorial. when you click Source > Organize Imports in the java editor these two lines of code should appear
at the top automatically and the compile errors should be resolved.From there just run your application.
Hope this helps !!!! ]]>Glen Zanabe2012-09-05T15:16:50-00:00Re: HelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/990932/#msg_990932
luis villegas2012-12-15T01:53:42-00:00Re: HelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/1012203/#msg_1012203
This is what I have also. The only missing code is
instances of this class is responsible for managing the connection between SWT.
]]>Andrew Geriane2013-02-21T04:39:29-00:00Re: HelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/1047614/#msg_1047614
org.eclipse.swt.{platform}.{os}.{arch}
i can only find this org.eclipse.swt 3.0.8.
pls help ]]>Aditya Iyer2013-04-23T12:50:56-00:00Re: HelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/1047840/#msg_1047840
Have a look: http://www.eclipse.org/forums/index.php/t/477829/
Good luck!
]]>Baruch Youssin2013-04-23T18:23:56-00:00Re: HelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/1635564/#msg_1635564
Mario Ramirez Velasquez2015-02-25T21:28:44-00:00Re: HelloWorldSWT tutorial
https://www.eclipse.org/forums/index.php/mv/msg/372232/1651919/#msg_1651919
Mario Ramirez Velasquez2015-03-05T15:40:28-00:00