Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

Tom Hill

Ranch Hand
+ Follow
since Aug 24, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Tom Hill

I have a question about the purpose of one of the features of Annotations.
If I have an annotation and create a class which implements this annotation what do I get from my class?

If I create an annotation such as:



What does it mean, or what is the purpose of:



I can't find any examples of why you might want to do this or even why its valid. I'm thinking this class could be created and cast as a MyAnnotation, perhaps to replace an existing annotation or add another annotation to an Element.

Any insight would be great! Cheers guys


Tom
12 years ago
Eclipse is your best bet: http://www.eclipse.org/
There is quite a lot of config for a newbie java programmer tho.

I quite like:
TextPad http://www.textpad.com/ for a stepup from notepad.
with the the java ide. There are a few other useful things to help as well like auto completers. http://www.textpad.com/add-ons/index.html


Hope that helps

Cheers
14 years ago
...because Im calling reset on the wrong stream at the wrong time!

Cheers guys, once again youve given me lots to think about!



Tom
14 years ago
The out of memory error was being caused by an ObjectInputStream.
The chunks Im reading are being put into a Transfer object that contains some other useful information. I was using an ObjectIn/OutputStream to write the transfer objects between sever and client. I have discovered that references are not being updated. Calling reset causes various Exceptions. Is there an easier mechanism for transfering objects that may change during the reading file loop?
14 years ago
Im developing in java 1.4.2. Im using a FileInputStream to read in (1MB) chunks of a large file and transfer them to another machine which is read to write the chunk to a file. Im getting an out of memory error reading in the file (after about 60mb) any ideas? Have a feeling that there is some zombie references sitting about inside of my reading loop.
Also are there any good mechanisms for checking memory usage?

Cheers

Tom
14 years ago
Hi guys, I hope you can help:
Im developing in java 1.4.2 is there a mechanism to get the current time in Nano seconds rather than just milliseconds?
14 years ago
Lemonhead! I was deleting it from the wrong (default) keystore!
14 years ago
I am trying to add a certificate using keytool. I am using an Alias for the certificate but an alias already exists on the machine. The old certificate is no longer required so I attempted to preform a keytool -delete. It appears that the certificate .keystore directory has been manually deleted and the keytool application will throw an IOException, but not remove the alias (and thus allow me to reassign it).

Has anyone got any ideas how to delete a certificate in keytool when the certificate that no longer exists to be deleted!

Cheers

Tom
14 years ago
Ive discovered that cmd /c start /D<dir> <command> is a way of doing it. It may be necessary if you wish to close the existing terminal and start a new one.
Cheers

Tom
14 years ago
Is it possible to start a Command Prompt using Runtime.exec()

I know its possible to start applications running and i know you can use cmd /c to start a command terminal inside of java.

I would quite like to actually start a terminal up, so that if a user was watching the machine a terminal would appear for them. Any ideas?

Tom
14 years ago
wow, i didnt expect so many responses. Basically im just trying to kick off another application, as part of an automated testing suite im working on. The application can be installed on windows and unix but obviously they have to be executed in different ways depending on the OS.

I really just want to know whether i should be executing a sh or a cmd to attempt to start the application.

Thanks for all the input so far

Tom
14 years ago
Hi guys, does anyone know if there is an easy/quick way of determining if the operating system is windows/unix/mac based? I know you can use System.getProperty("os.name") to get the name of the operating system, but a lot of the unix based OSs are given names that dont contain: "unix" or "linux".
It seems daft to ahve to cater for every possible Operating System, when some are very similar but with different names.

Cheers!

Tom
14 years ago
Hi there!
The thread will keep waiting until it is notified.
And if it isnt notified, it will attempt to wait forever.

So youll probably kill the process by some means.


Tom
I see!
I was using seperate lock objects to notify and wait but I was using the boolean messageAvaliable/messsageProcessed parameters. I shall give it a go straight away.

Thanks very very very much!

Tom
Sounds like i havent explained very well. This was my attempted structure:



the problem is that the 2nd notify is called before the 2nd wait has started.