Hosted By

Contact Me

Misc Links

OpenNTF BlogSphere LotusGeek CoComment Custom Button

Ads by Google

Welcome to keithstric.com!

I hope you find this site useful in some way or another. I strive to bring you all sorts of geeky information and solutions to your most frustrating of issues with the occasional rant on whatever topic, technical reviews and weblog. You'll also find many products that I've developed and make available for you to use however you like. So, grab a cup of coffee, sit down and visit for a while.

« Comments Fixed | Home Page| Enhancements to keithstric.com »

Delving into Java a little bit more....

08/24/2007 2:40 PM By Keith Strickland

This week I've been delving more into Java to determine what benefits it will provide me on the Lotus Notes development side. I've wrote about doing this a few times in the past but never really pursued it. I think I haven't pursued it becauase there really isn't a lot so far that I can do with Java that I can't do with LotusScript and plust I haven't really had a need for Java until a couple of weeks ago. But I would like to start using it more to widen the possibilities a little. I wrote about a Java agent to lookup the sAMAccountName in active directory a couple of weeks ago which was a good start at using Java a little bit more. Also today I dug out the sample database and slides from the LotusPhere 2006 Java Jumpstart session presented by Julian Robichaux and Thomas Duff to come up with some statistics reporting for an application that was wanting a couple of charts. I think this just goes to show what kind of information gets put out at sessions like these especially being that it is still very relevant today.

I've been using the Eclipse IDE with the Domiclipse plug-in. I really like this setup but when you start having to use Java Libraries it doesn't bring that import over into Domino. It includes an import statement in the code, but that doesn't work, you've got to click the "Edit Project" button in Domino Designer and point it to the Java Library. That's really no biggie but for someone just starting that's kind-of confusing.

So hopefully I will start to find more uses for Java in my day to day duties as so far I really like coding it. But the biggest problem is I don't know yet just when it "should" be used and when it "shouldn't" be used. Also, I'm not sure of my capabilities of adding useful features to the applications I develop using Java. Such as... Can you do ABC with this new application? I can't do it with LotusScript but can I do it with Java??? I don't know, but we'll find out I guess.

So, I know I've been rambling on now, so hopefully I'll start progressing more and more with Java and it'll become a useful part of my developer toolbox. I look forward to learning more about it.

Keith

Comments

ID: 1
Date: 08/25/2007 10:29:53 PM
Name: Kevin Pettitt
Website: http://www.lotusguru.com

I'm at a similar stage in my Java on Domino evolution. I even have the DVD of Julian and Tom's session Emoticon.

ID: 2
Date: 08/26/2007 03:46:22 PM
Name: Keith Strickland
Website: http://www.keithstric.com

I don't know about you but so far my biggest problem is knowing exactly what I can do with Java Emoticon. It seems pretty straight forward so far but what is it best at? I know I can't get frontend UI stuff with Java, but I can display status bars, etc, but when should I use it? What can I do with it that I can't do with LotusScript or that would be easier than LotusScript?

I guess I'll figure this out with time after I've been using it for awhile. But for now that seems to be the most difficult part for me.

ID: 3
Date: 09/03/2007 12:18:59 PM
Name: simon boulton
Website: http://

Hi - I'm having the same problem quote from yr post: "I really like this setup but when you start having to use Java Libraries it doesn't bring that import over into Domino. It includes an import statement in the code, but that doesn't work, you've got to click the "Edit Project" button in Domino Designer and point it to the Java Library. That's really no biggie but for someone just starting that's kind-of confusing. but don't quite" . . .

I don't quite get your solution. Would you mind a bit more detail?

ID: 4
Date: 09/03/2007 12:49:48 PM
Name: Keith Strickland
Website: http://www.keithstric.com

@Simon

If you create a Java Agent in domino designer, at the bottom of the screen is a button called "Edit Project" here you can define additional JAR files, graphics files, etc. or pick a Java Library that resides within the database (same place as a LotusScript Library).

HTH
Keith

ID: 5
Date: 09/04/2007 08:37:10 AM
Name: simon boulton
Website: http://

@Keith, thanks for that. To quote Homer, "D'Oh!". That does leave me with a problem; the import statements from the original eclipse source not only don't work, they won't allow me to compile & save the code. How did you get around this - do I have to export the script library as a .class file?

ID: 6
Date: 09/04/2007 08:56:29 AM
Name: simon boulton
Website: http://

Idiot that I am! There's a full video of how to do this at

{ Link }

ID: 7
Date: 09/04/2007 09:04:03 AM
Name: Keith Strickland
Website: http://www.keithstric.com

To me this seems to be kind-of tempermental. It'll work one minute and the next it won't. Since I do so little REAL Java development at this point in time I just Copy/Paste from Eclipse into Domino Designer, use the "Edit Project" button to point to any Java Libraries I may be using and also to define any additional JAR files and then remove the import statements. This seems to work and it really isn't that much more time consuming, the time saved with having type ahead and javadoc functionality while I'm coding more than makes up for the extra time copying/pasting takes.

From what I can figure out, the reason why it won't compile sometimes is because if you look at the very top of the agent while it's open in designer (before you import from Eclipse) there is a little gray bar that has the name of the class (I think, not sure) but at this point it's named "- JavaAgent.java". Once the import from Eclipse happens it's named "- agent/AgentName/JavaAgent.Java". This is the only thing I can gather as to why it won't compile. Also, if there are any import statements for Java Libraries, you need to remove those and instead use the "Edit Project" button to include those Java Libraries.

Oh yeah, one more thing, you also need to define any special JAR/Image/Sound/etc. files here also that you may have defined in Eclipse and was included in an import statement or some other way.

Sorry I can't be of more help as I've been developing in Java now off and on for about a month, so I'm by no means the source on this stuff. Also, try looking at the domiclipse forums { Link } you can post questions there and Keith Smillie seems to check the questions pretty regularly and provide answers if he can.

Keith

Post A Comment

:-D:-o:-p:-(:-):-\:-|:angry::cool::cry::dontknow::emb::hairout::laugh::rolleyes::whew:;-)

Subscribe to keithstric.com

OpenNTF

Disclaimer

The opinions and ideas posted on keithstric.com are not necessarily the opinions and ideas of my employer. The solutions, techniques and code provided here are not guaranteed or warranted in any way and are free for you to use at your own risk.