This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-12-09 00:32:08

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Java: Telnet Chat Server

I have created a telnet chat server in Java.  To connect to your server, just type:

Code:

telnet [your ip address]

in command prompt/terminal/whatever you call it.
How to set up a server
1) Download JTelnetChat.jar to an empty folder.
2) Type the following in notepad and save it as a .bat file in the same folder:

Code:

@echo off
java -jar JTelnetChat.jar

3) Run your new file
4) Try it out
5) Stop your server and edit motd.txt
6) (If you want) edit the banlist (IP addresses, delimit with whatever you want.)
7) Run your server again.
Downloading
1) JTelnetChat.jar
Source:
1) JTelnetChat.zip

Last edited by GeonoTRON2000 (2012-12-09 18:31:04)


http://i.imgur.com/BAEgGDL.png

Offline

 

#2 2012-12-09 05:46:52

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Java: Telnet Chat Server

Nice. But wouldn't there be a problem with the fact that telnet easily disconnects?


I'm back.
Maybe.

Offline

 

#3 2012-12-09 11:38:52

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Java: Telnet Chat Server

DigiTechs wrote:

Nice. But wouldn't there be a problem with the fact that telnet easily disconnects?

How would that be a problem?


http://i.imgur.com/BAEgGDL.png

Offline

 

#4 2012-12-09 18:23:07

ohaiderstudios
Scratcher
Registered: 2010-10-31
Posts: 100+

Re: Java: Telnet Chat Server

This is really cool...could you post the source file?


Fork Clamor on GitHub!

Offline

 

#5 2012-12-09 18:27:18

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Java: Telnet Chat Server

ohaiderstudios wrote:

This is really cool...could you post the source file?

Sure!


http://i.imgur.com/BAEgGDL.png

Offline

 

#6 2012-12-09 18:31:45

zippynk
Scratcher
Registered: 2011-07-23
Posts: 500+

Re: Java: Telnet Chat Server

Hmm... doesn't work for me.


Code:

Exception in thread "main" java.lang.UnsupportedClassVersionError: JTelnetChat : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Running on Mac OS X Snow Leapord 10.6.8.

Last edited by zippynk (2012-12-09 18:32:37)


https://dl.dropbox.com/u/60598636/trifocal_interlude_soundcloud_button.png

Offline

 

#7 2012-12-09 18:51:05

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Java: Telnet Chat Server

zippynk wrote:

Hmm... doesn't work for me.


Code:

Exception in thread "main" java.lang.UnsupportedClassVersionError: JTelnetChat : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Running on Mac OS X Snow Leapord 10.6.8.

Try recompiling from the source... that seems like a compiler error rather than an error on my end...


http://i.imgur.com/BAEgGDL.png

Offline

 

#8 2012-12-11 01:39:52

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Java: Telnet Chat Server

zippynk wrote:

Hmm... doesn't work for me.


Code:

Exception in thread "main" java.lang.UnsupportedClassVersionError: JTelnetChat : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Running on Mac OS X Snow Leapord 10.6.8.

You need to update to Java 7 or compile it for Java 6.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#9 2012-12-11 03:46:33

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Java: Telnet Chat Server

Cool.

DigiTechs wrote:

Nice. But wouldn't there be a problem with the fact that telnet easily disconnects?

I play a text-based game with telnet once and it kept disconnecting every minute or two. I think it was actually the first or one of the first telnet Multi-User Dungeons or something like that.

Last edited by nathanprocks (2012-12-11 03:48:38)


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#10 2012-12-11 10:04:40

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Java: Telnet Chat Server

MathWizz wrote:

zippynk wrote:

Hmm... doesn't work for me.


Code:

Exception in thread "main" java.lang.UnsupportedClassVersionError: JTelnetChat : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Running on Mac OS X Snow Leapord 10.6.8.

You need to update to Java 7 or compile it for Java 6.

So that's what that means!  That happened on my friend's computer once, too.


http://i.imgur.com/BAEgGDL.png

Offline

 

Board footer