Search:

Type: Posts; User: ineedahero

Page 1 of 3 1 2 3

Search: Search took 0.20 seconds.

  1. Replies
    12
    Views
    259

    Re: How to I update my java compiler?

    Thanks!! I'll look into it.

    --- Update ---

    I actually wound up connecting to a different server on MobaXTerm, and it happens to work on that one. Pretty weird, this stuff is such a headache. I...
  2. Replies
    12
    Views
    259

    Re: How to I update my java compiler?

    Errrr....I'm using MobaXTerm Personal Edition v7.3. And something involving Ubuntu. I'm not entirely sure how else to answer your question (not too familiar with the jargon).

    My assumption would...
  3. Replies
    12
    Views
    259

    Re: How to I update my java compiler?

    Apparently I'm not; it says I'm still using version 1.6


    java -version
    java version "1.6.0_34"
    OpenJDK Runtime Environment (IcedTea6 1.13.6) (6b34-1.13.6-1ubuntu0.12.04.1)
    OpenJDK 64-Bit...
  4. Replies
    12
    Views
    259

    Re: How to I update my java compiler?

    The installation went smoothly; I did not uninstall 1.6 before installing the new version.

    To be honest, I have no memory of ever even installing 1.6. When I click "uninstall a program", I see the...
  5. Replies
    12
    Views
    259

    Re: How to I update my java compiler?

    It attempts to compile with 1.6 version, but detects errors that only the 1.7 version is able to handle:


    javac MyLinkedList.java
    MyLinkedList.java:37: illegal start of type
    beginMarker...
  6. Replies
    12
    Views
    259

    How to I update my java compiler?

    I'm running Windows 8.1, but I program via MobaXterm in a UNIX environment. My java version is 1.6.0_34. This creates problems because, from what I understand, I need 1.7 or greater to have my...
  7. [SOLVED] Re: Regarding static variables as global variable in Java....

    Yeah, I tried doing that before and I hit a brick wall.

    I made the Server its own class, and I made the Game its own class, and kept them separate.

    But then I had the Game as a class within the...
  8. [SOLVED] Re: Regarding static variables as global variable in Java....

    Well I would have deleted this topic if I knew how. The formatting of the code is so annoying

    --- Update ---

    Anyways, since you're a mod, couldn't you just delete this topic? I doubt anyone...
  9. [SOLVED] Re: Regarding static variables as global variable in Java....

    What's exactly the point of that? Please don't post in my topic if you aren't going to try to supply an answer.
  10. [SOLVED] Regarding static variables as global variable in Java....

    I kind of want a variable to be global, except you can't do that in Java. I tried making it static instead, but it's still not working when I do that....

    Here's the situation:

    I am making a...
  11. Re: Why isn't my synchronized function acting synchronized?

    Sorry for the confusion.

    run() and processMessage() are both in the player class. The player class implements runnable.

    The player class itself is a part of the server class.

    It seems like...
  12. Why isn't my synchronized function acting synchronized?

    I have a multi-threaded network/client program that plays a game of tic-tac-toe.

    I always begin by asking the client if he's a new or existing player.

    If he's a new player, I ask him what he...
  13. Re: How do I read data from a Random Access File?

    Naw, I don't have any of that.

    I thought Random Access Files took care of everything automatically.

    I'm not even going to both with this stuff then. Thanks for the clarification.
  14. How do I read data from a Random Access File?

    Let's say I have a random access file that holds the names of 1000 students.

    Somewhere in there is a student with the first name "Eli". (assume only one student has the first name Eli).

    Maybe...
  15. Replies
    3
    Views
    292

    Re: Convert int to a bool

    I guess I'm just used to C++ where you could say 'while(integer)'

    I feel like that's cleaner than always saying 'while (integer == 1)'.....
  16. Replies
    3
    Views
    292

    Convert int to a bool

    How do I make this work?



    int i = 0;

    do
    {
    System.out.println("blah blah blah");
    Scanner input = new Scanner(system.in);
  17. Re: When you have a multi-threaded Server and Client program....

    Well....what if the Server sends something, then in the next line of code sends another message.

    Then the client receives the first message....has to do stuff with it...then, when it's done, the...
  18. Re: When you have a multi-threaded Server and Client program....

    I see what you're saying.

    Here, though, the Server is kind of sending two messages in a row.

    I suppose that's bad practice?
  19. Re: When you have a multi-threaded Server and Client program....

    I'm sorry...I don't understand what you mean.

    All I have is the client saying "System.out.println(b.readLine());"

    So, he's waiting for the Server.

    But that's useless if the Server sends the...
  20. Re: When you have a multi-threaded Server and Client program....

    Yes, but the code is kind of complicated. I'll try to give a brief version here.

    The Client is playing a game. He connects to the server, and the server executes the game and gives the client...
  21. When you have a multi-threaded Server and Client program....

    ...how exactly do you ensure that the Server always sends the data after the Client has entered a wait state for the data?

    As in, if I have the Server write something and the Client read something...
  22. Re: How do you add two actionListeners (in a GUI)?

    Ah, so, among the other problems, I have to IMPLEMENT the ActionListener -- not extend it, correct?

    --- Update ---

    Ooohhhh I got it working!!

    What you said was really helpful!!! thanks a lot!
  23. Re: How do you add two actionListeners (in a GUI)?

    Ok so I want to go off your third option!!

    I played around with it in my head for a while and I'm a little confused?

    So I'm thinking it ought to look something like this?


    ...
  24. How do you add two actionListeners (in a GUI)?

    Like, I have one button: submit.

    When I click this button, I take in the data and stuff.

    Then I have a second button: done.

    When I click this button, I close everything down.


    I don't...
  25. Re: Is there a way to clear a java text field in a GUI?

    Yup, that makes sense. Thanks!
Results 1 to 25 of 72
Page 1 of 3 1 2 3