devxlogo

May 31, 1998

Cross-platform socket communication

Question: I am writing a server written in Java that needs to take input from a game written in Visual Basic and sends the output to clients on the Internet.

Object passing between threads

Question: Am implementing a network simulation program thatrequires a sender and receiver thread, with a frame object being passed between the two threads.Could you suggest a way of connecting the

Java and videoconferencing

Question: I am conducting a study of operating system capabilities to support desktop videoconferencing.Would Java be a good Operating System for this purpose? Answer: Java itself is not an operating

File permissions

Question: How do you change UNIX file permissions in Java? I’ve seen it done and I need to replicate it. Answer: There is no platform-independent way of changingfile permissions in

StringTokenizer

Question: After: StringTokenizer st = new StringTokenizer(line); Do I have to write: String key = new String(st.nextToken()); or is it enough to write: String key = st.nextToken(); Answer: It is

Environment Variables

Question: How do I access environment variables? Answer: There is an undocumented method in java.lang.System with the signature: public static String getenv(String) You can use this method to fetch the

Templates in java

Question: Any suggestions on a good way to implement templates in java? Answer: The normal way to implement template behaviorin Java is to create an interface defining thecommon behavior that

Clipboard

Question: I’m having problems with application clipboard usage for “non strings”. If I try to create my own dataflavor it still seems to think the clipboard is a string. Answer: