Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Problem by resolving typs by HalloWorld(typ handling problem)
Problem by resolving typs by HalloWorld [message #1435174] Wed, 01 October 2014 05:40 Go to next message
Franz Raaber is currently offline Franz RaaberFriend
Messages: 2
Registered: September 2014
Junior Member
After mine starting with Java, did I have by the Realisation of "HelloWorld.java" treyed to realise "HelloWorldSWT". But this Windows Version of HelloWorld [
public class HelloWorldSWT {

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();
}

}

] didn't be compiled or interpreted in mine sense.
I get in the line "Display display = new Display();" the message/errore "Display can not resolved to a type", and in the "Shell shell = new Shell(display);"-line the errore "Shell shell = new Shell(display);" in the similar way!
What do I've to do? What is wrong?
I think and thought that the problem the missing definition of the variables "Display" and "Shell" is, but is that realy the fact, by the reason that I found these code on a book and a popluar web-page?

Cu
Franz Sad
Re: Problem by resolving typs by HalloWorld [message #1499542 is a reply to message #1435174] Fri, 05 December 2014 07:57 Go to previous message
George Maravich is currently offline George MaravichFriend
Messages: 7
Registered: December 2014
Junior Member
Try reinstalling eclipse....
Previous Topic:random java.lang.IllegalStateException with Eclipse 4.4 and java 8
Next Topic:Đăng Ký Dịch Vụ Internet FPT Sài Gòn
Goto Forum:
  


Current Time: Fri Apr 26 23:24:21 GMT 2024

Powered by FUDForum. Page generated in 0.02999 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top