久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

ColdFusion:關(guān)于使用定制的“自己寫的";Java 類

ColdFusion: about using custom quot;own writtenquot; Java classes(ColdFusion:關(guān)于使用定制的“自己寫的;Java 類)
本文介紹了ColdFusion:關(guān)于使用定制的“自己寫的";Java 類的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我需要在 cfml 頁面中使用我自己的 java 類.

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

文檔中的這個條目聽起來不錯,但是沒有解釋我必須創(chuàng)建哪些文件.

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

我試圖在我的網(wǎng)站根目錄下創(chuàng)建一個 test.cfm 頁面.然后將 TestClass.java + TestClass.class 放在同一路徑下.但這會導(dǎo)致錯誤找不到類"!.??

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"!.

你能幫幫我嗎?

推薦答案

TestClass.java + TestClass.class 在同一路徑中.

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

您不能只將 .class 文件放在任何地方.當(dāng) CF 服務(wù)器啟動時,它檢查類/jar 的特定位置.這些位置稱為CF 類路徑".你編譯的.class文件必須放在CF類路徑中,否則檢測不到.

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.

使用自定義 java 類:

To use a custom java class:

  1. 創(chuàng)建一個源文件即YourTestClass.java
  2. 將源代碼編譯成類文件即YourTestClass.class
  3. 將編譯好的.class文件放在CF類路徑的某處,如:

  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-INFclasses - 用于單個 .class 文件
  • WEB-INFlib - 用于 .jar 文件(多個類)

  • WEB-INFclasses - for individual .class files
  • WEB-INFlib - for .jar files (multiple classes)

注意:您還可以通過 ColdFusion 管理員.但是,將類放在默認(rèn)目錄之一更簡單.

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.

重啟 ColdFusion 服務(wù)器以檢測新類

Restart the ColdFusion server so it detects the new classes

注意:雖然您可以使用單獨的 .class 文件,但更常見的是將它們打包成 .jar 文件.

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

這篇關(guān)于ColdFusion:關(guān)于使用定制的“自己寫的";Java 類的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環(huán)繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數(shù)據(jù)庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 国产精品一区二区三区在线 | 九九热免费看 | 成人精品鲁一区一区二区 | 一区二区视屏 | 精品欧美一区二区三区免费观看 | av免费观看在线 | 久久一区二区视频 | 成人国产精品久久 | 视频1区| 91在线看| 羞羞涩涩在线观看 | 成人午夜精品 | 成人福利网| 国产精品毛片 | 国产日韩欧美一区 | 91av在线免费 | 午夜欧美日韩 | 99久久电影 | 亚洲成人精品一区 | 日韩欧美综合 | 一区二区视频在线 | 久久99精品久久久久久 | 四虎最新地址 | 亚洲首页 | 999久久久免费精品国产 | 成人夜晚看av | 一级片片| 国产精品一区在线 | 天天天天操 | 成人夜晚看av | 91欧美| 日日日日日日bbbbb视频 | 一本一道久久a久久精品综合蜜臀 | 午夜在线 | 亚洲小视频在线观看 | 特级做a爱片免费69 精品国产鲁一鲁一区二区张丽 | 成人欧美一区二区三区在线播放 | 日韩中文一区二区三区 | 日韩欧美三区 | 国产美女在线播放 | 久久久天天 |