Casper Maxwell

Ranch Hand
+ Follow
since Aug 04, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Casper Maxwell

Probably you meant "blank .txt file manually" instead of "black .txt file"

You can create new files as follows:

File file = new File(fileName);

So if the filename "blank.txt" then the code snippet above creates an empty file named "blank.txt" in the current folder. (normally application folder)

And if you want to make sure that its directories exist before saving the file:

File dir = new File(dirName);
17 years ago

The former is efficient and fast, but quite difficult to program. The latter is inefficient and slow, but much easier to program.

Yes. You are right. I just noticed your answer..
[ July 27, 2006: Message edited by: Casper Maxwell ]
17 years ago
I dont know your exact aim so i wanted to show one more approach if your problem does not require a shell script strictly.

You can invoke Java programs from C programs using JNI as described below:
17 years ago
If you want to use Java libraries from C side then you can use JNI. The following chapter of the JNI book describes this usage:
17 years ago
You can also search for similar scripting languages to Perl available for Java. For example, the article below says Sleep and Perl is similar:
17 years ago
For reading/writing files, the following tips may help:

Reading Text from a File

Writing to a File
[ July 21, 2006: Message edited by: Casper Maxwell ]
17 years ago
For a list of HTML parsers, you can try the following link:

And if you want to see some examples of usage of regex package, you can visit the following url:

One related example available there is:

How to find and display hyperlinks contained within a web page
17 years ago
And if you want to check whether other alternatives support this or not, here is a list of similar libraries:
17 years ago
These tips may help:

How to find contacts from PhoneBook of mobile phone

How to import Contact into phonebook
17 years ago