You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

People Code Classes

4 replies [Last post]
Guest's picture
Guest

Hello

I have some Custom Java Classes and Java Packages. I like to include or Import in to my PeopleCode Classes. How can I include in my People code Classes. One of my co-worker said, we need to put custom java classes in CLASS folder in PS_HOME directory so people code compiler will include custom classes in Peoplecode program?

I am using PT - 8.49, HRMS 9.0

CompShack's picture
User offline. Last seen 6 years 23 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Re: People Code Classes

Java classes needs to go to the following directory for Windows machines:
PS_HOME/appserv/classes
And in the following directory for Unix machines:
PS_HOME\classes

If you create your own Java classes that you want to access with PeopleCode, and you do not store them in the Java directory, you must create a PS_CLASSPATH environment variable that points to where your classes are stored.

I would recommend going through the Java Class chapter in PeopleCode API Reference PeopleBook. There are some pretty good examples on how to call Java from PeopleCode and so on.

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
Re: People Code Classes

Thanks Compshack!!

what is the difference between PS_CLASSPATH and Java Class Path (I did setup java classpth in my machine to run java programs)? Are you confirming that Java custom classes should store in PS_HOME\classes ( Unix)?

CompShack's picture
User offline. Last seen 6 years 23 weeks ago. Offline
Joined: 12/09/2007
Posts: 167
Re: People Code Classes

I'm not an expert on this subject, at least not just yet. I do know the following though. PS_CLASSPATH is a variable in your application server configuration file (psappsrv.cfg). Again, you don't have to worry about this if you place your custom classes in PS_HOME\classes (Unix).

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Guest's picture
Guest (not verified)
Re: People Code Classes

People Code Classes