June 6, 2000

Copying Files

Question: Is there a simple way of copying a file from one directory to another? Answer: There is no predefined convenient method for copying a file from oneplace to another. You have to do it the old fashioned way. Open thesource file, open the destination file, read the source file

No Response From Server Process

Question: When I use onstat -d, the message “No response from server process” pops up. Then I can’t shutdown the database or do any other jobs. I could use dbaccess, but my dbspace is 1GB and doesn’t have any blobspace. What do I do? Answer: I’m assuming you’re on a

DWORD Equivalent

Question: I’m trying to translate from VC++ to Java. Can you declare a variableDWORD in Java? If not, what is the Java equivalent? Also, what is theequivalent for HINSTANCE? Answer: Java differs from C and C++ in that all of its fundamental data types havespecified sizes that are guaranteed to

Preprocessor Support

Question: Is there something similar to the C/C++ compiler directive #ifdef,#define, and #endif in Java? I would like to compiledebugging code conditionally. Answer: This is one of the first questions that crossed my mind when I firststarted programming in Java. The disappointing answer is no. Noteveryone agrees on the need

Exception.what() Gives Vague Description

Question: I’m using a catch(exception e). When I come in the catch-block and print the message belonging to the exception, I receive the message “9exception.” What does it mean? Answer: The exact textual description of C++ exception is compiler-dependent. The Standard requires that they be null-terminated C-strings, but nothing more.

Return Values from Java to Unix

Question: I am calling a java program from a Unix script and passing threeparameters. Once the Java program is done, I want to return two valuesback to the Unix program from the Java program. How do I return data backfrom a Java program to a Unix script? Answer: The simplest,

TextField Max Characters

Question: How do I restrict the number of characters to be entered in a TextField? Answer: Setting a maximum character count is not a built-in function ofTextField. You have to subclass TextField to implement this yourself.You want to intercept the keystrokes before they are recorded andcount how many characters have

Exchange Server Incorrectly States Out of Licenses

Question: An error occurs in the Exchange event log stating that my customers are out of licenses when clearly they are not. How come? Answer: Since they have enough legal licenses, disable the Licensing service. I know that sounds odd, but frankly the problem you describe is very common and

Standard Input Exception

Question: Why do I have to catch an exception when I use System.in.read()? Answer: System.in is an InputStream, and like any InputStream, an I/O errormay occur when you read from it. For example, the Java program mayhave been run as a background process with no standard input, causingan error during

No more posts to show