ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Casey Daniell <CDani...@realm.com>
Subject RE: RMIC classpath???
Date Tue, 04 Mar 2003 17:11:54 GMT
I am using ANT 1.5.2, although I get the same problem when using ANT 1.5.1.
and JDK 1.3.1_07 on a Windows XP box.

The C:\jdk1.3.1_07\lib\tools.jar file is accessible, and is included in the
CLASSPATH as seen below. The C:\jdk1.3.1_07\lib\tools.jar file, when opened,
contains the sun.rmi.rmic.Main class that is executed in the
org.apache.tools.ant.taskdefs.rmic.SunRmic.class file. However, the error
that I get when running is the ClassNotFoundExecption from ant's SunRmic
class. But the CLASSPATH contains the correct info. What am I overlooking?
(Task info and verbose output follow)

Do I need any files for rmic compilation besides the jars found in
C:\jdk1.3.1_07\lib\ and the jars indcluded for my normal javac
compilation???

Ok, when running in verbose mode I get the following (trimmed for brevity):


    [javac]     C:\realmutils\src\org\apache\tomcat\util\ThreadPool.java
    [javac]
C:\realmutils\src\org\apache\tomcat\util\ThreadPoolRunnable.java

    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
     [echo] java.home is C:/jdk1.3.1_07
     [rmic] com\realm\utils\cache\composite\CompositeCacheManager.class
added as
 com/realm/utils/cache/composite/CompositeCacheManager_Stub.class doesn't
exist.

     [rmic] RMI Compiling 1 class to C:\realmutils\build\classes
     [rmic] Using SUN rmic compiler
     [rmic] Compilation arguments:
     [rmic] '-d'
     [rmic] 'C:\realmutils\build\classes'
     [rmic] '-classpath'
     [rmic]
'C:\realmutils\build\classes;C:\jdk1.3.1_07\lib\tools.jar;C:\realmut
ils\lib\acme_blowfish.jar;C:\realmutils\lib\acme_gifencoder.jar;C:\realmutil
s\li
b\build\realmutils.jar;C:\realmutils\lib\com.mortbay.jetty.jar;C:\realmutils
\lib
\hub-util-1.0.jar;C:\realmutils\lib\isomorph.jar;C:\realmutils\lib\j2ee.jar;
C:\r
ealmutils\lib\jcert.jar;C:\realmutils\lib\jgl3.1.0.jar;C:\realmutils\lib\jim
i_ti
ffdecoder1_0.jar;C:\realmutils\lib\jmxri.jar;C:\realmutils\lib\jmxtools.jar;
C:\r
ealmutils\lib\jnet.jar;C:\realmutils\lib\jsse.jar;C:\realmutils\lib\realmboo
t.ja
r;C:\realmutils\lib\rita.jar;C:\realmutils\lib\velocity-1.0.1.jar;C:\tools\l
ib\o
ptional.jar;C:\realmutils;C:\tools\lib\isomorph.jar'
     [rmic]
     [rmic] The ' characters around the executable and arguments are
     [rmic] not part of the command.
     [rmic] File to be compiled:
com.realm.utils.cache.composite.CompositeCac
heManager

BUILD FAILED
file:C:/realmutils/build.xml:138: Cannot use SUN rmic, as it is not
available.
A common solution is to set the environment variable JAVA_HOME or CLASSPATH.
        at
org.apache.tools.ant.taskdefs.rmic.SunRmic.execute(SunRmic.java:97)
        at org.apache.tools.ant.taskdefs.Rmic.execute(Rmic.java:520)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
        at MyAnt.main(MyAnt.java:30)

Total time: 15 seconds

------------------------------------------------------
Task info:

	<path id="java.compile.path">
		<fileset dir="${java.home}/lib/" includes="tools.jar"/>
		<fileset dir="${basedir}/lib/" 	includes="**/*.jar"/>
		<fileset dir="${basedir}/../tools/lib"
includes="optional.jar"/>
	</path>
	<target name="compile" depends="prepare">
		<javac srcdir="${java.compile.srcdir}" 
				 includes="com/**,org/**"
				 destdir="${build.classes}"  
				 debug="on" 
				 optimize="on" 
				 deprecation="off"
				 fork="yes">
			<classpath refid="java.compile.path"/>
		</javac>
		<echo message="java.home is ${java.home}"/>
		<rmic base="${build.classes}" 
	
classname="com.realm.utils.cache.composite.CompositeCacheManager"
				includeantruntime="true">
				<classpath refid="java.compile.path"/>
		</rmic>
	</target>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message