• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

accessing a new java object

Guest
Apr 10, 2007 Apr 10, 2007

Copy link to clipboard

Copied

i have a .jar file given by a third party. i never worked with java objects before. any way now i did copy it to right location i think. that is web_root/WEB-INF/lib now i am trying to access i have some problems. i do know the class name but it is not working. now is there a way i can find what classes in it. or can some one give me a working example how to use a java object in CF. thanks.
TOPICS
Advanced techniques

Views

233

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 10, 2007 Apr 10, 2007

Copy link to clipboard

Copied

LATEST
You can use winrar to look inside a jar file

Here is some code i use to access a lucene repository:

<cfset variables.analyzer = createObject("java", "org.apache.lucene.analysis.PerFieldAnalyzerWrapper").init(createObject("java", "org.apache.lucene.analysis.standard.StandardAnalyzer").init()) />
<cfset variables.analyzer.addAnalyzer("example1", createObject("java", "org.apache.lucene.analysis.KeywordAnalyzer").init()) />
<cfset variables.analyzer.addAnalyzer("example2", createObject("java", "org.apache.lucene.analysis.KeywordAnalyzer").init()) />
<cfset variables.analyzer.addAnalyzer("example3", createObject("java", "org.apache.lucene.analysis.WhitespaceAnalyzer").init()) />

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation