[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Java Threading



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matt Mason wrote:
> I'm new to linux and having difficulties getting threads
[...]

This has nothing to do with Linux ;-)

> Compiling this code:
> 
> import java.lang.*;

Maybe you are new to Java? You don't need to import java.lang.

> public class RunnableExample implements Runnable {
>      public void RunnableExample() {
>      }

If this is your constructor, it must *not* have a return type!

public RunnableExample() {}

[...]

> gives me an error of:
> RunnableExample.java:12: cannot find symbol
> symbol  : constructor Thread(RunnableExample,java.lang.String)
> location: class Thread
>          Thread mythread = new Thread(new RunnableExample(),
> "RunnableExample");
>                                          ^
> 1 error

If you have a return type, it's not a constructor... so you don't have a
constructor ;-)

I'm glad to help, but this list is not for general java discussion, it's
only for debian-java related purpose.

Plus, we do *not* support non-free JDK's, we put our effort (our free
time!) in helping free java virtual machines and free java runtimes like
kaffe, cacao, jamvm, gcj, sablevm, etc... and of course classpath.

Cheers,

- --
  .''`.
 : :' :rnaud
 `. `'
   `-
Java Trap: http://www.gnu.org/philosophy/java-trap.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDu5RF4vzFZu62tMIRAiWyAKCWqAoJX6ensXRjC4ClkdL631tlUgCeKXB4
/6TQ07bfU8ImDswSAb4Xqy0=
=tHYq
-----END PGP SIGNATURE-----



Reply to: