# Network classes not recognised

**URL:** <https://discourse.processing.org/t/network-classes-not-recognised/13035>\
**Category:** Beginners\
**Created:** [July 29, 2019, 9:30am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035 "2019-07-29T09:30:01Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgrogandesign](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dgrogandesign](https://discourse.processing.org/u/dgrogandesign)\
**Post date:** [July 29, 2019, 9:30am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/1 "2019-07-29T09:30:01Z")

</div>

Hi there, i was testing oout the network library on my old computer (with an older version of processing) and the network library and associated classes (Server and Client) worked fine. I’ve just tried to run the same sketch on my newer mac and PC and both dont recognises the Client or Server Class from the same sketch. Whats going on? thanks.

```auto
//client test	

import processing.net.*; 

Client myClient; 
Serial myPort;

char val; 
String word = "";
 
void setup() { 
  size(200, 200); 
  // Connect to the local machine at port 5204.
  // This example will not run if you haven't
  // previously started a server on this port.
  myClient = new Client(this, "2a02:c7f:7058:e100:21d:4fff:feff:1747", 5204);

} 
 
void draw() { 
  background(0);
// if (myClient.available() > 0) { 
// val = myClient.readChar(); 
// myPort.write(val);
// } 
  if (myClient.available() > 0) { 
    word = myClient.readString(); 
  } 
  fill(255);
  text(word,width/2,height/2);
 
} 

```

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 29, 2019, 10:17am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/2 "2019-07-29T10:17:47Z")

</div>

here is no problem with the integrated [processing.net](https://processing.org/reference/libraries/net/index.html) lib of processing 3.5.3

 ![SNAG-0139](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/bf97097a497b636c4adc15ef64d59852aa8990b6.jpeg)

- using a win7 PC ( as client ) and a Raspberry Pi ( as server )  
and a ivp4 for server.

- you sure your network ok, and the new PC’s can reach that server?  
and the server code is running?

- ping works?

---

<div class="post-metadata">

**Author:** ![dgrogandesign](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dgrogandesign](https://discourse.processing.org/u/dgrogandesign)\
**Post date:** [July 29, 2019, 10:20am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/3 "2019-07-29T10:20:24Z")

</div>

Hi thanks. ive not even tried connecting to the server as the Classes aren’t even recognised so the sketch wont compile…

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 29, 2019, 10:23am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/4 "2019-07-29T10:23:57Z")

</div>

hm, might be a install problem?  
after processing 3.5.3 download / unzip / start / set new sketchbook path,  
how/what you copy your old sketch source?  
please show copy or snapshot your exact error msg.

* * *

if i use (ONLY, without the server running )  
/ File / Examples / Libraries / Network / SharedCanvasClient  
and start it i get ERROR

```auto
java.net.ConnectException: Connection refused: connect

```

PLEASE test exactly same example code

---

<div class="post-metadata">

**Author:** ![dgrogandesign](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dgrogandesign](https://discourse.processing.org/u/dgrogandesign)\
**Post date:** [July 29, 2019, 10:26am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/5 "2019-07-29T10:26:28Z")

</div>

Its would be strange for it to be an install problem because im getting the same error on two completely different machines (mac and PC) - the error message is: "The class “Client does not exist”

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 29, 2019, 10:31am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/6 "2019-07-29T10:31:59Z")

</div>

if i start your above sketch code  
win7 / 64bit / processing 3.5.3 64bit /  
i get

```auto
Cannot find a class or type named “Serial”

```

if i disable that line the canvas open and after some time show ERROR:

```auto

java.net.ConnectException: Connection timed out: connect

```

---

<div class="post-metadata">

**Author:** ![dgrogandesign](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dgrogandesign](https://discourse.processing.org/u/dgrogandesign)\
**Post date:** [July 29, 2019, 10:41am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/7 "2019-07-29T10:41:06Z")

</div>

Even with the most simple sketch, the class simply cannot be found:

```auto
import processing.net.*; 

Client myClient; 

void setup(){
 
}

void draw(){
 
}

```

this still gives me the same error

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 29, 2019, 10:42am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/8 "2019-07-29T10:42:49Z")

</div>

![SNAG-0140](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/cfb150a63fc541bc499983f994056fc752b1ff13.jpeg)

can you show us a snapshot of the full processing window? ( with error msg )

---

<div class="post-metadata">

**Author:** ![dgrogandesign](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dgrogandesign](https://discourse.processing.org/u/dgrogandesign)\
**Post date:** [July 29, 2019, 10:48am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/9 "2019-07-29T10:48:13Z")

</div>

![31](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/9746c9340865a673abd9e383dae42d4754ec4f1c.png)

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 29, 2019, 10:49am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/10 "2019-07-29T10:49:19Z")

</div>

hm, why you are in android MODE, try JAVA first

and why you not run 3.5.3?  
if you need older versions pls. stick with the so called  
STABLE RELEASES  
[https://processing.org/download/](https://processing.org/download/)

---

<div class="post-metadata">

**Author:** ![dgrogandesign](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dgrogandesign](https://discourse.processing.org/u/dgrogandesign)\
**Post date:** [July 29, 2019, 10:50am UTC](https://discourse.processing.org/t/network-classes-not-recognised/13035/11 "2019-07-29T10:50:18Z")

</div>

haha, yes i have literally just realised that now, doh! Problem resolved, thanks for your help!
