Matt Siegel

Ranch Hand
+ Follow
since Jul 18, 2000
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 Matt Siegel

Either . . .
1. Do not use another JDK
or
2. Always have the jar file that contains Sun's tools.
[ April 11, 2002: Message edited by: Matt Siegel ]
18 years ago
Try trimming the String after you call the getText() method, like this:

HTH,
Matt
18 years ago
Try this --
Thread.getContextClassLoader().loadClass(driver);
Let me know if that works,
Matt
18 years ago
Hi Amit,
You are going to want to use the Runtime.exec(String[] cmdarray) method. Here's some code:

But remember you won't see any output from the batch file on the command line when it is run. You will need to grab the streams from the Process object.
HTH,
Matt
18 years ago
Try using the IP Address of the remote machine, and if this works it's probably a DNS issue.
Matt
I assume you mean that you want to check when a new file is put into a directory. I had to do something like this once. Here's what I did:
Using java.io.File.listFiles() I got an array of files in the directory. And then after a period of time, something like 5 secs which is configurable, I used some set operations to determine if any new files were put in the directory.
Unfortunately I do not have any of the code anymore, but here's something:

HTH,
Matt
18 years ago
Here's a recent article from Sun's site that may help your cause.
http://developer.java.sun.com/developer/technicalArticles/Programming/compression/
hth,
Matt
18 years ago
Check out the java.util.Timer and the corresponding java.util.TimerTask classes. They will do exactly what you want.
HTH,
Matt
18 years ago
Typically I do the exact opposite of that. Usually I find it helpful when I am already redirecting System.out to a file or somewhere else, but I still want to see important messages such as errors.
18 years ago
File.lastModified()
18 years ago
To me the biggest difference is when you use instantiate(), you don't have to know the Class name of the object at development time. The class that you want an instance of can be determined at runtime from a String.
Matt
18 years ago
You need to use a java obfuscator. Try searching for it on Google. You get some really good links.
Matt
[This message has been edited by Matt Siegel (edited August 31, 2001).]
19 years ago
Person person = (Person) hm.get(id);
String fname = person.fname();
or, in one line:
String fname = ((Person) hm.get(id)).fname();
19 years ago