Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Steven Ho

+ Follow
since Jan 16, 2003
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 Steven Ho

I have added the entire complete classpath
CLASSPATH=.:/usr/local/jdk/lib/ jar:/usr/local/jakarta/lib/jaxr-ri.jar:/usr/local/jakarta/lib/jaxrpc-api.jar:/usr/local/jakarta/lib/jaxrpc-ri.jar:/usr/local/jakarta/lib/jcert.jar:/usr/local/jakarta/lib/jdbc2_0-stdext.jar:/usr/local/jakarta/lib/jmx_remoting.jar:/usr/local/jakarta/lib/jmxgrinder.jar:/usr/local/jakarta/lib/jmxri.jar:/usr/local/jakarta/lib/jmxtools.jar:/usr/local/jakarta/lib/jndi.jar:/usr/local/jakarta/lib/jnet.jar:/usr/local/jakarta/lib/jsse.jar:/usr/local/jakarta/lib/jta.jar:/usr/local/jakarta/lib/ldap.jar:/usr/ local/jakarta/lib/log4j.jar:/usr/local/jakarta/lib/mail.jar:/usr/local/jakarta/lib/mailapi.jar:/usr/local/jakarta/lib/mm.mysql-2.0.11-bin.jar:/usr/local/jakarta/lib/mof2mbean.jar:/usr/local/jakarta/lib/mofcomp.jar:/usr/local/jakarta/lib/pop3.jar:/usr/local/jakarta/lib/providerutil.jar:/usr/local/jakarta/lib/relaxer.jar:/usr/local/jakarta/lib/smtp.jar:/usr/local/jakarta/lib/soap.jar:/usr/local/jakarta/lib/tyrex- cal/jakarta/lib/xercesSamples.jar:/usr/local/jakarta/lib/xml.jar
The exception is gone, but no output either
Anyway thanks for the help. Have a nice day.
16 years ago
I am trying to run a Java application weekly that update database, and I am using Cron Job to do so.
The problem is I am trying to instantiate the Driver using

and got exception as output "com.mysql.jdbc.Driver" others are stack trace...
I have developed database application on the same environment over many times, this problem only occured now because I am using Cron Job.
I tried to set the class path to the jar file without success.
Does anyone have any experience similar to this, and have found a solution?
Please help. Thanks.
16 years ago
I have a file in
I am trying to delete it using new (File(filepath)).delete(); without successing. I have to manually shutdown Tomcat, and delete the file, if I didn't shutdown Tomcat, windows 2k will display "sharing violation" message.
What can I do to delete the file smoothly?
Any help is appreciated, Thanks.
16 years ago
I am new to the Cron Job, I am trying to schedule a Java program that print current Date on System.out every 5 minutes. I put inside the command line
is "java printBeep"
But the output I get from email is

Please tell me where I went wrong, btw the interface only permits 1 line of command to input, and I can't seem to put more lines of command lines.
Please help if can, thank you all.
Have a nice day!
[ September 17, 2003: Message edited by: Steven Ho ]
17 years ago
Thank you very much Andrew for answering my question. I will try the solution you posted. Have a nice day.
17 years ago
I am trying to run a thread on web server. The following is part of the code.

which checkmail() is another class that will read all email messages from particular account and update statistic into database. I have succeeded in executing this program in my Windows PC by running it in the command prompt.
My question is how to run this program on a redhat linux7.1 (no xwindows) web server? Do I execute it with "java undelivered &" in shell to make it execute in the background? If true, so how do I stop the thread if needed? (assume it is too heavy etc.) And where should I put the class files? Is there any restriction for thread to work in web server?
Any help will be highly appreciated. By the way, I am glad the server is working today.
Have a nice day,
Steven Ho
17 years ago

sorry, I forgot to mention the last character is always line break.
Thanks all for replying.
17 years ago
Hello all,
I have the code below,

The length of string may change often, more character may appear at the start or end sometime as the variable is modified, but the "this is email:" part exist all the time.
There is always 1 valid email only inside the string.
How do I extract the email from the string? Please provide code samples.
Thanks all.
[ September 09, 2003: Message edited by: Steven Ho ]
17 years ago
I am trying to develope a web application using JSP or Servlets that will
1. read all email inside email account.(done in JSP)
2. summarize the total of emails, put in database (done in JSP).
Currently the administrator have to open the JSP files, click a button and
only then the process will start to put the total of emails inside database.
But I need to make these processes automated, like once every week, without administrator or anyone. How do I do that? Is using JSP and Servlets suitable for accomplishing the task above? Please help
Thanks in Advance!!!
[ September 04, 2003: Message edited by: Steven Ho ]
[ September 04, 2003: Message edited by: Steven Ho ]
17 years ago
I am trying to format a nested table content from outside of this table but I am unable to change any coding within this nested table structure.
I have tried using <basefont> and BODY html tags in stylesheets without success.
In case anyone want to know, I can't change the coding because the table is extracted entirely from another website.

Thanks in advance,
Steven Ho
Thank you Jon, I have done my work based on your guidance.
I hava a BLOB column inside sample table. On the other hand I manage to get a byte array (byte[]) from files uploaded by form input field.
Is it possible to upload the byte array into the field? I am trying to add a file into database.
I tried to find a way to convert the byte array into BLOB using
byte[] b = .... populate it with byte data
Blob blob = null;
blob.setBytes(1, b);
This doesn't work because the blob object is null.
Please help, thank you all.
Thank you so much, I am so relieved now. And I will examine the later.
[ March 16, 2003: Message edited by: Steven Ho ]
17 years ago
I have been developing a simple application where I need to encrypt and decrypt a short password sent by end user accross internet. The coding is working just fine. But I am worry whether I have violated the US cryptographic export restrictions by using these coding.
If I am, can anyone suggest an alternative to encrypt and decrypt the password?
Thank you all.

[ March 14, 2003: Message edited by: Steven Ho ]
17 years ago
I am trying to download a pdf file from database.
The coding did download some content, but these downloaded file's size appear to be smaller than it should be, comparing to blob in database. Original file size is 40kb but downloaded file size is 39kb as such.
Below is what I've done. Can someone please tell me what did I do wrong?

Have a nice day. Thank you all.
[ February 18, 2003: Message edited by: Steven Ho ]
17 years ago