|
|
Re: "Hello World" Project Lauching Problemshooting [message #666081 is a reply to message #666009] |
Tue, 19 April 2011 01:53 |
Peggy Messages: 3 Registered: April 2011 Location: Shanghai |
Junior Member |
|
|
Saurav,
Thks for your answer.
Just like you said, Before running this "Hello World!" project, the system prompted a frame with two options: Java applet or Java application. I ran the applet and it was void. Then I ran Java application. It shoots the problem: Quote: | selection doesn't contain a main type.
|
(1) To run this project in a correct way, what type of element/function should be added to the system.
(2) where to paste the code:
Quote: | System.out.println("HelloWorld")
|
BTW, The tutorial I read was the help file attached to "Eclipes Version 1.67"( I dowloaded it from the official site). My PC is Windows 7. So I installed the Java JDK.exe package and SDK .exe package.
Saurav, if you know any resources for building sites, please tell me the way to get them.
P.S. I try to view your blog, but it was unable to be opened up. It's a pity to miss your articles.
Anyway, Thanks a lot for your help. I wish we can exchange the learnings. My email address: zhangmeryl@gmail.com
B.R.
Peggy
|
|
|
Re: "Hello World" Project Lauching Problemshooting [message #666089 is a reply to message #666081] |
Tue, 19 April 2011 04:10 |
|
On 2011.04.18 19:53, Peggy wrote:
> Saurav,
>
> Thks for your answer. Just like you said, Before running this "Hello
> World!" project, the system prompted a frame with two options: Java
> applet or Java application. I ran the applet and it was void. Then I ran
> Java application. It shoots the problem: Quote:
>> selection doesn't contain a main type.
>
>
> (1) To run this project in a correct way, what type of element/function
> should be added to the system.
> (2) where to paste the code: Quote:
>> System.out.println("HelloWorld")
>
>
> BTW, The tutorial I read was the help file attached to "Eclipes Version
> 1.67"( I dowloaded it from the official site). My PC is Windows 7. So I
> installed the Java JDK.exe package and SDK .exe package.
> Saurav, if you know any resources for building sites, please tell me the
> way to get them.
> P.S. I try to view your blog, but it was unable to be opened up. It's a
> pity to miss your articles.
> Anyway, Thanks a lot for your help. I wish we can exchange the
> learnings. My email address: mailto:zhangmeryl@gmail.com
>
> B.R.
> Peggy
Peggy,
A really good site for beginning tutorials is http://www.vogella.de
Your Java class should look something like this:
public class HelloWorld
{
public static void main( String[] args )
{
System.out.println( "Hello world." );
}
}
Yes, you could dig the message out of some resource as your mysterious
sample code seems to suggest, but that would be for advanced credit,
something to get into down the road when your Java legs are more solid
underneath you. (When you're interested, check out
http://www.javahotchocolate.com/resbundle.html)
|
|
|
|
Powered by
FUDForum. Page generated in 0.08844 seconds