Make sure you restart CF server after adding class paths and I would assume adding classes to existing paths...
Eric -----Original Message----- From: loathe [mailto:[EMAIL PROTECTED] Sent: Monday, 11 September 2006 16:50 To: CF-Talk Subject: RE: Java/CF Question Helps a bunch thanks. Now I have: 17:50:59.059 - java.lang.Error Exception - in C:\Inetpub\wwwroot\javaTest.cfm : line 3 Unresolved compilation problems: Unhandled exception type ClassNotFoundException Unhandled exception type SQLException What do I do with those? > -----Original Message----- > From: Rob Wilkerson [mailto:[EMAIL PROTECTED] > Sent: Monday, September 11, 2006 5:40 PM > To: CF-Talk > Subject: Re: Java/CF Question > > You can put the class file anywhere in your classpath. Your classpath > is defined in your jvm.config file in the java.classpath setting. > > Within a createObject() call, you'd reference the path to the class > file from your base path. For example, your classpath points to : > e:\path\to\my\classes, but your file is located in > e:\path\to\my\classes\com\db\MyClass.class. Your createObject() call > would look like this: createObject ( 'java', 'com.db.MyClass' ) > > Hope this helps. > > On 9/11/06, loathe <[EMAIL PROTECTED]> wrote: > > Well, I have been able to avoid this demon till today. So I guess I > > am pretty lucky :) > > > > I have a pretty simple Java class to change a users password in DB2 > > on a mainframe. Looks like this: > > > > import java.sql.*; > > import java.util.Properties; > > > > public class UpdatePassword { > > > > > > /** > > * @param args > > */ > > Properties props =new Properties(); > > public static void main(String[] args) > > { > > > > } > > > > public int changePassword(String userName, String > > oldPassword, String newPassword ) > > { > > Class.forName("com.ibm.db2.jcc.DB2Driver"); > > props.setProperty("connectionAttribute","UID=" + > userName + > > ";PWD=" + oldPassword + ";NEWPWD=" + newPassword + ";"); > > Connection con = > > > DriverManager.getConnection("jdbc:db2:jdbc:db2://XXXXXXXXXXXXX/DB2S",p > rops > ); > > > > return 1; > > } > > } > > > > Now I have a class file compiled from that. > > > > Where do I need to put the class file in order to have CF pick it up > once I > > recycle the services? > > > > What is the path to the class inside of a createObject call? > > > > TIA. > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253089 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

