Joel wrote:

Okay, here's what I get trying to compile example1 with Java 1.4 and
TC4:



D:\Program_Files\apache\xindice-1.1b4\java\examples>ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\j2re1.4.2_05\lib\tools.jar



Why it is looking on the C: drive, I couldn't even begin to guess.



It is looking for tools.jar in %JAVA_HOME%\lib. JAVA_HOME should point to j2se SDK installation. In your case, this is j2se RE - which does not have tools.jar.



(Stupid MSWindows.)



Buildfile: build.xml

init:

addressbook-init:
   [mkdir] Created dir: 
D:\Program_Files\apache\xindice-1.1b4\build\addressbook-classes

addressbook-build:
   [javac] Compiling 10 source files to 
D:\Program_Files\apache\xindice-1.1b4\build\addressbook-classes

BUILD FAILED
D:\Program_Files\apache\xindice-1.1b4\java\examples\build.xml:97: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.



I suppose I should try setting a class path, even though I am under the
impression that it will be overridden anyway, and I'm not really sure
what to salt it with.



See above: you need SDK, and JAVA_HOME pointing to SDK, not JRE.


Okay,



D:\Program_Files\apache\xindice-1.1b4\java\examples>set CLASSPATH="D:\Program_Files\Java\j2sdk1.4.2_05\lib\tools.jar"



and




D:\Program_Files\apache\xindice-1.1b4\java\examples>ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\j2re1.4.2_05\lib\tools.jar
Buildfile: build.xml



(Stupic MSWindows.)


But,



init:

addressbook-init:

addressbook-build:
   [javac] Compiling 10 source files to 
D:\Program_Files\apache\xindice-1.1b4\build\addressbook-classes

addressbook-release:
     [war] Building war: 
D:\Program_Files\apache\xindice-1.1b4\dist\addressbook.war

guide-init:
   [mkdir] Created dir: 
D:\Program_Files\apache\xindice-1.1b4\build\guide-classes

guide-build:
   [javac] Compiling 8 source files to 
D:\Program_Files\apache\xindice-1.1b4\build\guide-classes

guide-release:
     [jar] Building jar: 
D:\Program_Files\apache\xindice-1.1b4\dist\xindice-guide.jar

release:

BUILD SUCCESSFUL
Total time: 6 seconds



Hmm. Okay, so the examples that don't run when I do this:



D:\Program_Files\apache\xindice-1.1b4\java\examples>cd guide

D:\Program_Files\apache\xindice-1.1b4\java\examples\guide>.\run org.apache.xindice.examples.Example1
D:\Program_Files\apache\xindice-1.1b4
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xindice/examples/Example1



are all under the build subdirectory, under the addressbook-classes and guide-classes directories.


run.bat is probably outdated. Check email archives, I've sent updated run.bat to the list.



Well, you know what I'm going to do, I'm going to drop that
addressbook.war into TC. My, that was fast. And I try to look at the
list of contacts on http://localhost and xindice wants to read from port
8888. And I've left xindice on port 8080 because I'm lazy. Arrgghhh.


You can set environment variable to let Xindice know which port to use. See wiki.


Vadim



Reply via email to