2011-10-06 76 views
0

如何在JRuby 1.6.4中設置類路徑?在Jruby 1.6.4中設置CLASSPATH

設置我的類路徑

set CLASSPATH= 
%<project_name>%\lib\java\ant-1.6.5.jar; 
%<project_name>%\lib\java\ant-antlr-1.6.5.jar; 
%<project_name>%\lib\java\ant-junit-1.6.5.jar; 
%<project_name>%\lib\java\ant-launcher-1.6.5.jar; 
%<project_name>%\lib\java\ant-swing-1.6.5.jar; 
%<project_name>%\lib\java\antlr-2.7.6.jar; 
%<project_name>%\lib\java\asm-attrs.jar; 
%<project_name>%\lib\java\asm.jar; 
%<project_name>%\lib\java\auriga-cryptolib.jar; 
%<project_name>%\lib\java\bcprov-jdk12-137.jar; 
%<project_name>%\lib\java\c3p0-0.9.1.jar; 
%<project_name>%\lib\java\cglib-nodep-2.1_3.jar; 
%<project_name>%\lib\java\checkstyle-all.jar; 
%<project_name>%\lib\java\cleanimports.jar; 
%<project_name>%\lib\java\commons-collections-2.1.1.jar; 
%<project_name>%\lib\java\commons-logging-1.0.4.jar; 
%<project_name>%\lib\java\concurrent-1.3.2.jar; 
%<project_name>%\lib\java\dom4j-1.6.1.jar; 
%<project_name>%\lib\java\ehcache-1.2.3.jar; 
%<project_name>%\lib\java\hibernate-tools.jar; 
%<project_name>%\lib\java\hibernate3.jar; 
%<project_name>%\lib\java\jaas.jar; 
%<project_name>%\lib\java\jacc-1_0-fr.jar; 
%<project_name>%\lib\java\javassist.jar; 
%<project_name>%\lib\java\jaxen-1.1-beta-7.jar; 
%<project_name>%\lib\java\jboss-cache.jar; 
%<project_name>%\lib\java\jboss-common.jar; 
%<project_name>%\lib\java\jboss-jmx.jar; 
%<project_name>%\lib\java\jboss-system.jar; 
%<project_name>%\lib\java\trg-dao-hibernate-0.5.0.jar; 
%<project_name>%\lib\java\trg-search-0.5.0.jar; 
%<project_name>%\lib\java\trg-search-hibernate-0.5.0.jar; 
%<project_name>%\lib\java\trilead-ssh2-build213.jar; 
%<project_name>%\lib\java\versioncheck.jar; 
%<project_name>%\lib\java\xerces-2.6.2.jar; 
%<project_name>%\lib\java\xml-apis.jar; 
%<project_name>%\lib\java\jasperreports-3.7.6.jar; 
%<project_name>%\lib\java\commons-digester-1.7.jar; 
%<project_name>%\lib\java\iText-2.1.7.jar; 
%<project_name>%\lib\java\jfreechart-1.0.12.jar; 
%<project_name>%\lib\java\jcommon-1.0.15.jar; 
%<project_name>%\classes\; 

但是Windows無法加載這些類。我甚至試圖在當時的Windows環境變量中設置它的作品。但是我不能把這些很多的課程放在那裏,因爲它的不好的做法。 其實我正在從1.4 Jruby遷移一個應用程序。在1.4中,CLASSPATH完美工作。

任何幫助將不勝感激?

回答

0

最後我找到了你需要加載項目中所有本地類的答案,然後加載其他類。

在我來說,我加載這個類第一

%PROJECT_NAME%\類\;