trying to get started

I made this file.

class HelloWorld {

public static void main (String args[]) {

Syustem.out.printin("Hello World!");

}

}

tried to compile thus

jdk1.3\bin\javac.exe HelloWorld.java

this apeared

HelloWorld.java:3: cannot resolve symbol

Symbol : class out

Location: package System

System.out.printin(揌ello World?;

^

1 error

trying to do this first time need help I couldn抰 find what抯 wrong.

[485 byte] By [iwanttolearna] at [2007-11-26 20:08:21]
# 1

First, you should use the code tag when posting your code, it makes your code more readable.

Second, the error is pretty obvious, you mispelled System and println

you have

class HelloWorld

{

public static void main (String args[])

{

Syustem.out.printin("Hello World!"); // It should be System.out.println("Hello World!");

}

}

Be careful and look closely next time

Good Luck!

java4life87a at 2007-7-9 23:10:59 > top of Java-index,Java Essentials,New To Java...
# 2
Yikes. Almost a month after this: http://forum.java.sun.com/thread.jspa?threadID=5134451and you're still stuck at the very beginning?Better think about a different career path.
warnerjaa at 2007-7-9 23:10:59 > top of Java-index,Java Essentials,New To Java...
# 3
> Yikes. Almost a month after this:> http://forum.java.sun.com/thread.jspa?threadID=5134451> > and you're still stuck at the very beginning?> > Better think about a different career path.ROFLMAO
fastmikea at 2007-7-9 23:10:59 > top of Java-index,Java Essentials,New To Java...
# 4
Let's not be too critical. Perhaps the OP set it aside for a month.At least he's typing HelloWorld with capital 'H' and 'W' now.
DrLaszloJamfa at 2007-7-9 23:10:59 > top of Java-index,Java Essentials,New To Java...
# 5

I corrected it

class HelloWorld

{

public static void main (String args[])

{

System.out.printIn("Hello World!");

}

}

Now this error appeared

HelloWorld.java:5: cannot resolve symbol

Symbol: method printIn (java.Iang.String)

Location : class java.io.PrintStream

System.out.printIn(揌ello World?;

^

1 error

please help.

iwanttolearna at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 6
> Yikes. Almost a month after this:> http://forum.java.sun.com/thread.jspa?threadID=5134451> > and you're still stuck at the very beginning?> > Better think about a different career path.ROFL
qUesT_foR_knOwLeDgea at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 7
println: it must be an l, like language, not an I, like Inventory ;)
Papilliona at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 8

jwana, are you still stuck?

If so you really should have a look at Sun's [url=http://java.sun.com/developer/onlineTraining/new2java/]New to Java Center[/url]... and bookmark it... it's an incredibly good free resource... in my day you paid about $500 for a half a dozen textbooks to learn not so much not so easily.

And please take up the previous advise to upgrade your JVM... 1.3 is an anacronism... your time will be much better spent learning the current API, and common programming paradigms... and besides 1.6 is just a lot more user friendly (unlike this pack of carnivores) to deal with than 1.3

keith.

corlettka at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 9

jwana, are you still stuck?

If so you really should have a look at Sun's New to Java Center... and bookmark it... it's an incredibly good free resource... in my day you paid about $500 for a half a dozen textbooks to learn not so much not so easily.

And please take up the previous advise to upgrade your JVM... 1.3 is an anacronism... your time will be much better spent learning the current API, and common programming paradigms... and besides 1.6 is just a lot more user friendly (unlike this pack of carnivores) to deal with than 1.3

keith.

... and it's println not printIn dopey. Sheesh!... still, I suppose anyone could be forgiven for making that mistake once.

I once spent 3 days on a bug which turned out to be IMP0SSIBLE.

corlettka at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 10

Run this.

class HelloWorld

{

public static void main (String args[])

{

System.out.println("Hello World!");

}

}

qUesT_foR_knOwLeDgea at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 11

Thanks for helping me now there抯 no problem in HelloWorld. I made another file name 揌elloWorldApplet.java?it抯 been compiled. When I run it gives this error.

Exception in thread 搈ain?java.NoSuchMethodError: main

What could be wrong now? Keith I tried to download it but of because my connection so slow that it抯 gonna take almost 15 hours. That why I didn抰 download it. I抣l try again. I want to download only JDK without jre give me a URL where I can download only jdk.

[code]

iwanttolearna at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 12

Thanks for helping me now there抯 no problem in HelloWorld. I made another file name 揌elloWorldApplet.java?it抯 been compiled. When I run it gives this error.

Exception in thread 搈ain?java.NoSuchMethodError: main

What could be wrong now? Keith I tried to download it but of because my connection so slow that it抯 gonna take almost 15 hours. That why I didn抰 download it. I抣l try again. I want to download only JDK without jre give me a URL where I can download only jdk.

[code]

iwanttolearna at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 13

> Exception in thread 搈ain?java.NoSuchMethodError: main

Because you cant "run" an applet. It needs to be loaded by your browser/applet viewer.

Read this tutorial about applets:

http://java.sun.com/docs/books/tutorial/deployment/applet/index.html

> I want to download only JDK without jre give

> me a URL where I can download only jdk.

Every JDK ships with a JRE. Otherwise you would not be able to run the code you write.

prometheuzza at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 14
sorry abaut this inconvience i didn't have a look at my book. again sorry
iwanttolearna at 2007-7-9 23:11:00 > top of Java-index,Java Essentials,New To Java...
# 15

> What could be wrong now? Keith I tried to download it

> but of because my connection so slow that its gonna

> take almost 15 hours. That why I didnt download it.

> Ill try again. I want to download only JDK without

> jre give me a URL where I can download only jdk.

You can't just have the JDK without the corresponding JRE

JDK (Java Development Kit) is used to compile bytecodes from

a Java source, while the JRE (Java Runtime Environment) runs

those bytecodes so your Java program actually runs.

Clem1986a at 2007-7-21 17:52:09 > top of Java-index,Java Essentials,New To Java...
# 16
And it should be String[] args not String args[] although it seems to compile either way.
stilea at 2007-7-21 17:52:09 > top of Java-index,Java Essentials,New To Java...
# 17
> And it should be >> String[] args>> not>> String args[] >> although it seems to compile either way.That's because both define an array of Strings.
prometheuzza at 2007-7-21 17:52:09 > top of Java-index,Java Essentials,New To Java...