VMware {code} Community
tgiglia
Contributor
Contributor

Java SDK samples will not build

Can anybody help?

I have set AXISHOME=c:\axis\axis-1_4, JAVAHOME=c:\Sun\SDK\jdk\bin, and WBEMHOME=c:\vsphere\SDK\samples\Axis\java as per readme_java.html. Then I try to build the samples using "build" (I have also tried "build -w"). This just generates hundreds of "cannot find symbol" errors for example:

C:\vsphere\SDK\samples\Axis\java\com\vmware\apputils\vim\ServiceUtil.java:308: c

annot find symbol

symbol : class ObjectContent

location: class com.vmware.apputils.vim.ServiceUtil

ObjectContent[] ocary =

^

C:\vsphere\SDK\samples\Axis\java\com\vmware\apputils\vim\ServiceUtil.java:331: c

annot find symbol

symbol : class ManagedObjectReference

location: class com.vmware.apputils.vim.ServiceUtil

ManagedObjectReference usecoll = collector;

^

C:\vsphere\SDK\samples\Axis\java\com\vmware\apputils\vim\ServiceUtil.java:335: c

annot find symbol

symbol : class ManagedObjectReference

location: class com.vmware.apputils.vim.ServiceUtil

ManagedObjectReference useroot = root;

^

C:\vsphere\SDK\samples\Axis\java\com\vmware\apputils\vim\ServiceUtil.java:339: c

annot find symbol

symbol : class SelectionSpec

location: class com.vmware.apputils.vim.ServiceUtil

SelectionSpec[] selectionSpecs = null;

^

C:\vsphere\SDK\samples\Axis\java\com\vmware\apputils\vim\ServiceUtil.java:343: c

annot find symbol

symbol : class PropertySpec

location: class com.vmware.apputils.vim.ServiceUtil

PropertySpec[] propspecary = buildPropertySpecArray(typeinfo);

^

C:\vsphere\SDK\samples\Axis\java\com\vmware\apputils\vim\ServiceUtil.java:344: c

annot find symbol

symbol : class PropertyFilterSpec

location: class com.vmware.apputils.vim.ServiceUtil

PropertyFilterSpec spec =

^

C:\vsphere\SDK\samples\Axis\java\com\vmware\apputils\vim\ServiceUtil.java:345: c

annot find symbol

Tags (3)
0 Kudos
3 Replies
admin
Immortal
Immortal

Hi,

It seems that your Classpath environment variable is not properly set. Please refer to the section " Setting up for Java Development" on page 11 in vSphere Developer's Setup Guide for information on setting up the environment for vSphere SDK Java Development.

0 Kudos
tgiglia
Contributor
Contributor

Okay, I got the CLASSPATH set, now when I run "build -w" I get the following:

C:\vsphere\SDK\samples\Axis\java>build -w

Compiling apputil

javac: no source files

0 Kudos
admin
Immortal
Immortal

You may want to cross check on whether the environment variables are pointing to the right location and correct filenames, especially the classpath.

CLASSPATH

Complete paths to specific JAR files and other libraries required by Java

and Axis tools. Add these specific JAR files to the classpath (assumes

you have setup AXISHOME, JAVAHOME, and SDKHOME):

%AXISHOME%\lib\axis.jar

%AXISHOME%\lib\axis-ant.jar

%AXISHOME%\lib\commons-discovery-0.2.jar

%AXISHOME%\lib\commons-logging-1.0.4.jar

%AXISHOME%\lib\jaxrpc.jar

%AXISHOME%\lib\log4j-1.2.8.jar

%AXISHOME%\lib\saaj.jar

%AXISHOME%\lib\wsdl4j-1.5.1.jar

%JAVAHOME%\lib\tools.jar

%SDKHOME%\samples_2_0\Axis\java\vim.jar

%SDKHOME%\samples_2_0\Axis\java\lib\activation.jar

%SDKHOME%\samples_2_0\Axis\java\lib\mailapi.jar

AXISHOME :

Complete path to the Apache Axis installation top‐level directory. For

example:

C:\apache\axis1.4

SDKHOME

Path the top‐level directory of the unpacked SDK download. For

example:

C:\devprojects\visdk201\SDK

JAVAHOME

Paths to the binary root directories for both the Java JDK and the Java

runtime (JRE). For example:

C:\jdk1.5_0_08\bin

C\jre1.5_0_08\bin

PATH

Add the path to the Java and the Axis binary client tools to the system

path. Assuming you setup the AXISHOME and JAVAHOME variables,

you should add:

%AXISHOME%\bin

%JAVAHOME%\bin

0 Kudos