The finally block is good for ensuring that something happens in your program, as the contained code always executes. However, if you open a connection in the try-catch-finally block and do not explicity close it (i.e. if you want to pass the connection to another method) the connection will...
Java does not have destructors. However, you can try two things.
1. Have thread that has references to all of your connections and calls Connection.isClosed() at regular intervals. If it detects that a connection is closed, it can output a message, etc.
2. Extend the Connection class. In...
Im not saying that its not possible, because I'm sure that you can use native classes to find a way to do this. However, doing so would go against the principles of a machine-independant langauge. Other languages are able to interface with the native environment much more seamlessly, but if...
Where's the unpost button when you need it? :-)
Anyway, this error seems similar to the one you got. (I can't tell for sure, since you used borland and this is from javac)
java.lang.NoSuchMethodError: Blop.<init>(Ljava/lang/String;)at ConstTest.main(ConstTest.java:5)
In order to get this...
As of a week ago, a database connection to a sybase server using the Sybase System 11 ODBC driver was working fine. However, it has suddenly stopped working, and seemingly without any reason whatsoever. I am running an NT machine and have checked both the registry and the Data Source setup...
I use JCreatorLE. Its not as feature filled as the IDE's wushitwist mentioned, but its free and gets the job done. Its not at all bulky. Just another option. [morning] HavaTheJut
In short, only use the batch file. The syntax should be:
validate file1 file2 file3 file4 and it looks like file2-4 might be optional. The java command is setup in there already. Read on if you want to know more details.
Explaination:
The simplest syntax to run a java class is:
java...
I replied to your thread in the other forum as well (you really shouldn't double-post). I agree with Hattusas in saying that you should start with a Visual IDE. Another option is Sun's Visual IDE (Formerly called Forte - I think its 'One' now). This will take a little while to load up on a P2...
Heres a recursive function in pseudocode to do that:
delete(int id) {
int array[] kids = get all children
for x = 0 to kids.length
if (kids[x] has no children)
find info on kids[x] and delete it
else
get the parent id of kids[x]
delete(id)
end for
delete this parent
}...
I've read over Sun's information on jar signing, but there's still one thing that's not 100% clear to me. Can certificates alone allow file access, property permission, etc.? Or does the certificate just allow the user to change these settings in the Policy Tool for all instances of the signer...
To get this functionality, the JTextArea must be in one thread and the file read must be done in another.
Since you say that your are redirecting the system out, I assume you have taken care of the first part. Just make sure that the file reading process is threaded and is not in the text area...
Do you mean switching tasks within the JVM or on an OS level? Because if your trying to do that with the OS, Java is not the right language. [morning] HavaTheJut
Two things I can think of:
1. Use a private boolean field. Lets call it bChanged. Whenever a method makes a change, set bChanged to true. At the start of your paint method, check bChanged before doing anything. After the paint, set it to false.
2. (Not sure if this will work)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.