• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

JNI - FindClass

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am invoking java methods from 'C' using JNI. For me the FindClass method returns '0' (zero) even though the classpath is set properly. I have set the classpath using vmargs.options, in that option string I am passing the classpath as "-Djava.class.path=<myclasspath>". The above error is not consistent, many of the times it is passing. Can you help me please to identify the root cause of this error?

Thanks,
Muruges
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that we can offer much help without more information. Could you please post the code that you are using?

Also, what happens if you put the class in the system's classpath? Is it a problem where the switch that you are specifying is incorrect?
 
muthu muruges
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the update.

Here is the code


Some times I am getting my error message "Can't find class StorageContainerController".
I don't believe it occurs because of the incorrect classpath. If classpath is the root cause then I would have hit this issue in all of my tries.

The classpath key is correct.
[ February 16, 2005: Message edited by: muthu muruges ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic