Jump to content




NetBeans IDE and Telnet Communication


  • You cannot reply to this topic
9 replies to this topic

#1 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 22 January 2013 - 07:08 AM

Hey guys, a friend of mine are 'attemping' to make a chat/messenging type-program using Telnet communcation and using NetBeans to create the GUI of the program.

He's making the simple GUI of the program where he has left me to do the communication part which I'm clueless about because I'm trying to teach myself off their websites and other sources.

I was just wondering if anyone by any chance has used Telnet before and could maybe lead me in the right direction with a sample code or something I could work with to help me :P

#2 D3matt

  • Members
  • 830 posts

Posted 22 January 2013 - 09:20 AM

Telnet is incredibly simple. You open the stream, and you just send whatever stream of characters you want. Don't forget to use newlines at the end of each message is pretty much the only suggestion I can give.

#3 dissy

  • Members
  • 181 posts

Posted 22 January 2013 - 03:29 PM

View PostremiX, on 22 January 2013 - 07:08 AM, said:

Hey guys, a friend of mine are 'attemping' to make a chat/messenging type-program using Telnet communcation and using NetBeans to create the GUI of the program.

He's making the simple GUI of the program where he has left me to do the communication part which I'm clueless about because I'm trying to teach myself off their websites and other sources.

I was just wondering if anyone by any chance has used Telnet before and could maybe lead me in the right direction with a sample code or something I could work with to help me :P

You should check out the IRC protocol (RFC 1459) - It's line based and plain text and so works over sockets (and thus telnet)

For example, you can telnet to an irc server and send the proper HELO, NICK, and USER commands. You then show online.
To talk to a person the client sends PRIVMSG nick :msg goes here
PRIVMSG #channel :this is ironically how one talks in a channel too

Plus IRC has been around since 1987 (compared to the web, which was 1993) so is very tried and true

#4 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 22 January 2013 - 11:12 PM

You guys make it soundso easy :P yeah I know how irc works but I need to know how to use telnet within the gui code in netbeans for communication can work.

Could you guys provide me with some links and/or even an example?

#5 dissy

  • Members
  • 181 posts

Posted 23 January 2013 - 12:58 PM

View PostremiX, on 22 January 2013 - 11:12 PM, said:

You guys make it soundso easy :P yeah I know how irc works but I need to know how to use telnet within the gui code in netbeans for communication can work.

Could you guys provide me with some links and/or even an example?

Ahh, I misunderstood backwards then. Sorry about that!

I have over 20 years of way-more-than-I-really-want in depth experience with the IRC protocol, however I've never used netbeans ever.

A good starting point would be to Google for "netbeans socket programming".
"Socket" is the more correct term for what you want in order to do "telnet" and telnet-like things.

Technically speaking, "telnet" is terminal cursor control over a plain socket, however most people use the terms interchangeably, since all telnet clients can function perfectly well as socket clients without getting or needing any cursor control commands.

#6 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 23 January 2013 - 03:11 PM

I had to google all these terms.....and when I came back, I am very excited to see this in action. Please post some videos, once you have some working code. I really want to be able to chat on IRC while in Minecraft.

#7 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 24 January 2013 - 02:52 AM

I have next to no experience with telnet, I can just use it to remote control CMD and test RDP etc but I too would really love to understand it more, please post your progress for those of us who would also like to learn

#8 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 26 January 2013 - 05:57 AM

View Postdissy, on 23 January 2013 - 12:58 PM, said:

View PostremiX, on 22 January 2013 - 11:12 PM, said:

You guys make it soundso easy :P yeah I know how irc works but I need to know how to use telnet within the gui code in netbeans for communication can work.

Could you guys provide me with some links and/or even an example?

Ahh, I misunderstood backwards then. Sorry about that!

I have over 20 years of way-more-than-I-really-want in depth experience with the IRC protocol, however I've never used netbeans ever.

A good starting point would be to Google for "netbeans socket programming".
"Socket" is the more correct term for what you want in order to do "telnet" and telnet-like things.

Technically speaking, "telnet" is terminal cursor control over a plain socket, however most people use the terms interchangeably, since all telnet clients can function perfectly well as socket clients without getting or needing any cursor control commands.

Ahh, okay, thanks. I'll get to googling then...

View PostCranium, on 23 January 2013 - 03:11 PM, said:

I had to google all these terms.....and when I came back, I am very excited to see this in action. Please post some videos, once you have some working code. I really want to be able to chat on IRC while in Minecraft.

I wasn't going to use it to connect minecraft to an IRC server, though...

View PostKaoS, on 24 January 2013 - 02:52 AM, said:

I have next to no experience with telnet, I can just use it to remote control CMD and test RDP etc but I too would really love to understand it more, please post your progress for those of us who would also like to learn

Sure I will, but it will be a while from now

#9 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 26 January 2013 - 06:02 AM

View PostremiX, on 26 January 2013 - 05:57 AM, said:

I wasn't going to use it to connect minecraft to an IRC server, though...
But this would allow for that won't it?

#10 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 26 January 2013 - 06:09 AM

View PostCranium, on 26 January 2013 - 06:02 AM, said:

View PostremiX, on 26 January 2013 - 05:57 AM, said:

I wasn't going to use it to connect minecraft to an IRC server, though...
But this would allow for that won't it?

Hmm.. no clue to be honest...

ps: gratz on becoming a staff :P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users