Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Brett Anthoine

Greenhorn
+ Follow
since Mar 12, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brett Anthoine

Thanks you vijay.
21 years ago
Hello,
I'm trying to get an exact copy of an object's instance. example

The problem is the compiler says clone() is protected. I'm confused.
21 years ago
Hello folks,
This is about a small college project, a network card game.
There is a server and 4 clients.
I have a special class who does handle all the network messaging stuff called respectively NetClientInterface for the server side and NetServerInterface for the client side.
Both these classes use ObjectOutput and ObjectInput streams to write objects. The object sended are from class "Message".
In the class message I have an int for the type of message identification and a vector of arguments which contains quite often elements of the class "Card".
My problem is the following :
Sometimes the server seems to send the things but it is empty on the client side. That's it my vector of arguments is empty.
Here some code :
When I send messages I use the following :

To receive message :

note that messagesOut is like a queue.
because the main app use another method called send which only adds the mess to the queue until postMessages really send it.
It is the same for messagesIn, the main app call receive to see if there is a new message.
I 'm afraid that it is not really clear.
Anyway the real problem is about writing objects that seems okay on a side and empty in the other.
Thanks for your time
[ May 20, 2002: Message edited by: Brett Anthoine ]
Thanks Peter,
I'm investigating in that way. If someone is interessted, check this link
Merlin non blocking IOs Javaworld's article
Hello,
I have the following problem :
I've got a piece of code checking for information from a server via a ObectInputStream, say every 2 secs.
My problem is I don't want the Thread to hang on waiting for ever if the stream is empty, so i tried the following :

Message is a very simple class with some String and int fields.
Anyway, my available() return value seems to always be 0 , even if there is data available.
Help
Thank you
ps : by the way I don't like to check my stream every 2 seconds, is there a way to register a kind of listeners on the stream an generate an event when something is arriving ?
Thanks for the answer.
21 years ago
What about the speed issue ? In one word ? Comparing to a "normal" java app.
slower ? faster ?
21 years ago
Haaaaaaaaaaaaaaaaaaaaaaaaaaaargh
21 years ago
You try to shoot yourself from within an applet but aren't able to access the ressource foot...
Finally you decide to do it with a servlet but realize that someone allready made it with Python using cgi
21 years ago
I don't get it either
Maybe the author means that Java is a like a toy (to use) but can handle real stuff
21 years ago
Hi Andres,
Sorry if I've been confusing on this one. (English is my third language )
You're right the JRE doesn't include the compiler (javac).
The JRE is part of the JDK but can be used alone.
If you look into your Jdk directory , you'll find a directory named JRE...
Hope it's clearer now
21 years ago
Hi folks,
Here a small joke about programming languages, but Java is missing. Any idea ?

HOW TO TELL WHICH PROGRAMMING LANGUAGE YOU'RE USING
C
You shoot yourself in the foot.
C++
You accidentally create a dozen instances of yourself and shoot them all
in the foot. Providing emergency medical assistance is impossible since
you can't tell which are bitwise copies and which are just pointing at
others and saying, "That's me, over there."
FORTRAN
You shoot yourself in each toe, iteratively, until you run out of toes,
then you read in the next foot and repeat. If you run out of bullets,
you continue anyway because you have no exception-handling ability.

COBOL
Using a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER.
on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK
whether shoelace needs to be retied.
BASIC
Shoot yourself in the foot with a water pistol. On big systems,
continue until entire lower body is waterlogged.
Pascal
The compiler won't let you shoot yourself in the foot.
Visual Basic
You'll shoot yourself in the foot, but you'll have so much fun doing it
that you won't care.
Ada
After correctly packaging your foot, you attempt to concurrently load
the gun, pull the trigger, scream and shoot yourself in the foot. When
you try, however, you discover that your foot is of the wrong type.
Assembly
You try to shoot yourself in the foot only to discover you must first
reinvent the gun, the bullet, and your foot.
21 years ago
Hi,
JRE means Java Runtime Environment and is the runtime necessary to run a compiled java class. In fact JRE is the entire package with all the necessary files to run a java program, including the :
JVM ,Java Virtual Machine which is part of either the JRE and the SDK (standard development kit), and is used to run the java program. It is like an interpreter.
Java plugins are (I think) all the optional packages like Java3D or the Java Media Framework.
feel free to look at Sun java website for more info.
Bye
[ April 06, 2002: Message edited by: Brett Anthoine ]
21 years ago