Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8491787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:32:02+00:00 2026-06-10T22:32:02+00:00

I need to use my own java class in a cfml page. This entry

  • 0

I need to use my own java class in a cfml page.

This entry in the documentation sounds great but does not explain which files I have to create.

I tried to create a test.cfm page under my website root. Then placed TestClass.java + TestClass.class in the same path. But that results in an error “class not found”!.

Can you please help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:32:04+00:00Added an answer on June 10, 2026 at 10:32 pm

    a TestClass.java + TestClass.class in the same path.

    You cannot just place .class files anywhere. When the CF server starts, it only checks specific locations for classes/jars. Those locations are referred to as the “CF class path”. Your compiled .class file must be placed within the CF class path, or it will not be detected.

    To use a custom java class:

    1. Create a source file ie YourTestClass.java
    2. Compile the source code into a class file ie YourTestClass.class
    3. Place the compiled .class file somewhere within the CF classpath, such as:

      • WEB-INF\classes – for individual .class files
      • WEB-INF\lib – for .jar files (multiple classes)

      Note: You could also add the item to the CF class path via the ColdFusion Administrator. However, placing the class in one of the default directories is simpler.

    4. Restart the ColdFusion server so it detects the new classes

    Note: Though you can use individual .class files, it is more common to package them into .jar files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need use this code: <%= button_tag :class => btn btn-primary do %> <%=
Need to use own imaged markers instead built-in pins. I have several questions. 1.
I need to create a gem, for my own use, that substitutes the current
I need use this method with three distinct classes: Orders, Customers, Suppliers public void
So, I need use this event so I can navigate trought blog posts. I
How do I use a ConcurrentLinkedQueue in Java? Using this LinkedQueue , do I
I'm not experienced with java applications but I found out that finding static pointers
For an assignment I need to create a class within class Point from java.awt.Point.
I have defined a Pipe class in Java, making use of PipedReader and PipedWriter
I am not a java expert, and my question is somewhat abstract, i need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.