Results 1 to 15 of 15

Thread: Connecting Java Programs to the Interwebs

  1. #1
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default Connecting Java Programs to the Interwebs

    Yeah I want to make some kick ass internet games and maybe a pokemon simulator, hey I have the time lol.

    But first I need to know... how to connect to the internet. This sites seems just right up my ally http://docs.oracle.com/javase/tutori...ets/index.html

    At first it went through BS stuff about connection to sites to see their code, which is cool and all, but not useful. Finally it got to sockets which I believe is what ones needs to connect to servers and have shit done, and play multiplayer games.

    But when I get to the first input site code: http://docs.oracle.com/javase/tutori...ockServer.java
    it doesn't work, I don't know if it is my compiler, but it doesn't understand -

    KnockKnockProtocol kkp = new KnockKnockProtocol();

    On the note of my compiler, I don't think it is operating correctly for this, I think im suppose to get a pseudo-c++ layout where I impit things, but all it does is give me red errors.

    does anyone here have any experience in this kinda shit?

  2. #2
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default

    If I can make an online version of generation1 simulator, which currently does not exist, it would put PD on the map as the only site with one. Also if I can implement double and triple battles for later generations online, that would also put us on the map.

  3. #3
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default

    you all suck

  4. #4
    Defenestration is imminent pichubro's Avatar
    Join Date
    Mar 2005
    Location
    Kaleidoscope Of Mathematics
    Posts
    18,314

    Default

    Quote Originally Posted by Kirby View Post
    it doesn't work, I don't know if it is my compiler, but it doesn't understand -

    KnockKnockProtocol kkp = new KnockKnockProtocol();
    Because you didn't define it. Make a constructor or new class to define KnockKnockProtocol. Your complier can't acess it from the KnockKnockServer.

  5. #5
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default

    ah I just downloaded the shit from the site and it doesn't work because my computer is to new... to make things worse if I do somehow get it to run, my computer than identifies it as c++ code and opens up codeblocks...

    what is a good compilerer to actually connect to the internet AND is user friendly

  6. #6
    Defenestration is imminent pichubro's Avatar
    Join Date
    Mar 2005
    Location
    Kaleidoscope Of Mathematics
    Posts
    18,314

    Default

    Notepad++?

  7. #7
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default

    huh that looks cool

    I think the site just sucks, I found some newer sites and the code there works fine for bluejay.

  8. #8
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default

    nope also shit, made in 1996... still better than the #1 link on google though

  9. #9
    Registered Users Regular Rayne's Avatar
    Join Date
    Mar 2009
    Posts
    8,610

    Default

    notepad++ isnt a compiler

  10. #10
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default



    1000 times better than anything else ive seen

    I didn't know I could make my own computer a server O.o

  11. #11
    Defenestration is imminent pichubro's Avatar
    Join Date
    Mar 2005
    Location
    Kaleidoscope Of Mathematics
    Posts
    18,314

    Default

    Quote Originally Posted by Rayne View Post
    notepad++ isnt a compiler
    arg

    I know...

    I have no idea why I post stuff sometimes

  12. #12
    Registered Users Regular Rayne's Avatar
    Join Date
    Mar 2009
    Posts
    8,610

    Default

    Quote Originally Posted by Kirby View Post


    1000 times better than anything else ive seen

    I didn't know I could make my own computer a server O.o
    http://www.wampserver.com/en/

  13. #13
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default



    yo Im so ripping this shit, fuck learning it, Im having this entire process spoon-fed

  14. #14
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default

    Ok I finally got around to coping the code for the first video and downloading netbeans, overall it is "working" although its not giving me the message it is doing so, infact unlike the video is opens up another window where it fires off a whole slew of connections until it gets to the client. The client side also doesn't appear to work as wanted... here is the code... maybe I am missing something

    http://pastebin.com/4sn12maK
    http://pastebin.com/VtSTnnzM

  15. #15
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,117

    Default

    yeah I had to get outside help

    apparently, since I don't own my server IP address it doesn't work

    I have to use 127.0.0.1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •