Ben David

Ranch Hand
+ Follow
since Oct 01, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ben David

Is there some good way to find out if there are Classes already made that you can use to do something that you need in a program?

12 years ago
Of course -- the thing I dont check the FAQ for is in there. (But not most of the things I did check it for) Dang Murphy.

Sorry and thanks!!

Strange that it worked on my PC just fine though. Curious why that is. Oh well -- just glad its working 100% now.

Thanks again for all your help!


13 years ago
hmmm..,.. I can run it from command line on the same PC i have eclipse on (a windows 7 PC)

but I can not run it on another PC (win XP PC)

I would not think the OS should make a difference. but it is the only difference I can think of in how I am doing it.

Any ideas?

(I get the following on the other PC)
Cannot send email. com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. e2sm8774885ibe.0
13 years ago
Thanks for clarifying! I see now I can run it like the following...

java -classpath ".;.\mail.jar" DSSRecordingCheck


But now I get a new error. I dont get this when I run it in eclipse. any ideas?

Cannot send email. com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. e2sm8774885ibe.0

13 years ago
Sorry if I ask newb questions... I am aware of classpath. I was under the impression that the current directory was always part of the class path. (how else does java find the other two of my own class files in the same folder when I run Java on the one with the static Main method) So when I put the jar in the current folder I thought I was putting it in the classpath.

Is that not correct? The current directory is not always in the class path? and if not, just so I can have a clearer understanding, can someone explain how Java finds my other two class files in the current folder, but fails to find the jar?

13 years ago
spoke too soon. This works in eclipse, but I get an error when I try to run on another PC from command line

I tried putting the mail.jar in the folder with the class files incase it needed that to run. Still get the exception below.

Can someone point me in the right direction?



13 years ago
got it working. For anyone stumbiling on this thread here is the class and config file I used to sent through gmail. I hard coded the password in the class. Obviouslyi this is probably really bad form. But for a newb just trying to make a script to send a warning email, it gets the job done. I just used a "junk" gmail account that is not really used for anything.




13 years ago
I found and got the mail.jar set up and in my classpath. I am a bit confused with the config file.

This is the documentation I am looking at
http://javamail.kenai.com/nonav/javadocs/
I dont see where I can specify the password that goes with the user I specify.

Also -- how do I tell it if it needs to use SSL or not? (I will be trying to connect to a gmail smtp server
13 years ago
Thanks! I am working with Java SE, but the links are broken for the downloads it suggests if you are working with SE. Any chance you could point me to the correct current download links for JavaMail, and JavaBeans Activation Framework?
13 years ago
I was hoping to be pointed to what people think are the most helpful, easy to use classes that facilitate the process of connecting to an smtp server to send email.
13 years ago
what is the easiest way to send an email from a java program?
13 years ago
good point. the long values are the seconds since "epoch" right? What is the easiest way to get the long values? I don't see a method on the Date Class to retrieve it.
13 years ago
Basically I am trying to write something to compare a bunch of recording files with date and time int he file name, to a spreadsheet of calls.

I plan to match based on phone number and date/time of call. But the time on the recording and the time in the spreadsheet are bound to be off by up to a few minutes.

Does the compareTo method on java.util,date return a value based on the amount of difference or does it just return -1,0,1?

13 years ago