Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP!

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43699
interpreted = N
texte = Ahhh, thanks! The docs said the method received a String, not a String Array (also the docs didn't mention the int type parameter in the signature.. That makes MUCH more sense. Man, there's no way someone could get that working just by reading the documentation. Thanks for the help guys. On Friday, September 20, 2002, at 06:45 PM, Scott Anderson wrote:> Okay, now that the engine is loading the java VM libs, there are a > couple > other issues to consider. First, your JavaClassPath pref should > contain all > the paths needed for your java class/jar files. In your case, it > seems that > the path is setup correctly. Second, the [Object] context can only > call > Java methods that fit this particular 'signature' (prototype): > > public static String MyJavaFunction(String[] args, int []type) > > So this should work... > public class WebDNAJava{ > public static String TestMethod(String []args, int []type) > { > return Hello from java!!!!!!!!; > } > } > > And in your tpl file.... > [object objname=WebDNAJava&call=TestMethod&type=1&classpath=][/object] > > > Also, the method you are trying to call can not be the 'main' method. > > In some cases the method you wish to invoke may not 'fit' that > prototype. > In that case, you can create a new java method that acts as a 'middle > man'. > So the [object] context would call your 'middle man' method, and you > 'middle > man' method would then call the desired method. > > > >> -----Original Message----- >> From: WebCatalog Talk >> [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf >> Of Sage Hobbs >> Sent: Friday, September 20, 2002 1:32 PM >> To: WebCatalog Talk >> Subject: Re: Has ANYONE gotten the [object] context to work with Java >> (OSX) ??? HELP! >> >> >> Thanks, Le that's definitely the right Java path, but >> now I'm getting >> the error: >> >> Error:Could not locate the java method (readFromURL) with the >> signature >> '([Ljava/lang/String;[I)Ljava/lang/String' in the java class >> (URLGetter). >> >> I stripped down my class to just the single method, to >> test basic >> functionality. The method returns and accepts a java.lang.String, so >> what's the error about? >> >> ========================================== >> public class URLGetter >> { >> public String readFromURL(String params) { >> return new String(Hurray, it worked.); >> } >> } >> >> ----------------------- >> Sage Hobbs >> shobbs@nwaonline.net >> Internet Administrator, The Morning News >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://search.smithmicro.com/ > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/ > > >----------------------- Sage Hobbs shobbs@nwaonline.net Internet Administrator, The Morning News ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Sage Hobbs 2002)
  2. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Scott Anderson 2002)
  3. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Sage Hobbs 2002)
  4. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Le Pham 2002)
  5. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Scott Anderson 2002)
  6. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Sage Hobbs 2002)
  7. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Sage Hobbs 2002)
  8. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Scott Anderson 2002)
  9. Re: Has ANYONE gotten the [object] context to work with Java(OSX) ??? HELP! (Dan Strong 2002)
Ahhh, thanks! The docs said the method received a String, not a String Array (also the docs didn't mention the int type parameter in the signature.. That makes MUCH more sense. Man, there's no way someone could get that working just by reading the documentation. Thanks for the help guys. On Friday, September 20, 2002, at 06:45 PM, Scott Anderson wrote:> Okay, now that the engine is loading the java VM libs, there are a > couple > other issues to consider. First, your JavaClassPath pref should > contain all > the paths needed for your java class/jar files. In your case, it > seems that > the path is setup correctly. Second, the [object] context can only > call > Java methods that fit this particular 'signature' (prototype): > > public static String MyJavaFunction(String[] args, int []type) > > So this should work... > public class WebDNAJava{ > public static String TestMethod(String []args, int []type) > { > return Hello from java!!!!!!!!; > } > } > > And in your tpl file.... > [object objname=WebDNAJava&call=TestMethod&type=1&classpath=][/object] > > > Also, the method you are trying to call can not be the 'main' method. > > In some cases the method you wish to invoke may not 'fit' that > prototype. > In that case, you can create a new java method that acts as a 'middle > man'. > So the [object] context would call your 'middle man' method, and you > 'middle > man' method would then call the desired method. > > > >> -----Original Message----- >> From: WebCatalog Talk >> [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf >> Of Sage Hobbs >> Sent: Friday, September 20, 2002 1:32 PM >> To: WebCatalog Talk >> Subject: Re: Has ANYONE gotten the [object] context to work with Java >> (OSX) ??? HELP! >> >> >> Thanks, Le that's definitely the right Java path, but >> now I'm getting >> the error: >> >> Error:Could not locate the java method (readFromURL) with the >> signature >> '([Ljava/lang/String;[I)Ljava/lang/String' in the java class >> (URLGetter). >> >> I stripped down my class to just the single method, to >> test basic >> functionality. The method returns and accepts a java.lang.String, so >> what's the error about? >> >> ========================================== >> public class URLGetter >> { >> public String readFromURL(String params) { >> return new String(Hurray, it worked.); >> } >> } >> >> ----------------------- >> Sage Hobbs >> shobbs@nwaonline.net >> Internet Administrator, The Morning News >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://search.smithmicro.com/ > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/ > > >----------------------- Sage Hobbs shobbs@nwaonline.net Internet Administrator, The Morning News ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Sage Hobbs

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

rename a file (1997) Shopping Cart - prices? (1997) Credit Card Number Stripping Digit (1997) Normalizing Dates and Phone numbers (2000) [cart] clarification... (1997) required fields (1999) search form problem.. (1997) Summary search -- speed (1997) WebCatalog Hosting (1996) Passing WebCat data to SSL server (1997) [WebDNA] General email error -1 (WebDNA 7) (2012) Re:listfiles-looking for slick solution (1997) WebCat2 beta 11 - new prefs ... (1997) RE: LookUp Tag (1997) Snake Bites (1997) Emailer Set Up (1997) in conversions.db crashes unix webcat (1999) Sendmail truncation in Eudora Clients (1998) if then else. BUG? (2003) [OT] (waaaay OT) (2004)