VIJava Browser – A Great Tool To Recommend!

While browsing the project home of VI Java API, I found a link to a great tool contributed by pitchcat. It is a standalone Java application that shows managed objects and data objects in a tree hierarchy, and all the methods attached to a managed object.

I highly recommend it to all the VI Java API developers. Why? Although you can get similar information from MOB, vijava browser gives you an overview of all the managed objects and clear paths to any managed objects or data objects. 

Lost VMs or Containers? Too Many Consoles? Too Slow GUI? Time to learn how to "Google" and manage your VMware and clouds in a fast and secure HTML5 App.

Here are two screen shots: 


Fig 1 Login Dialog

 Fig 2 Main windows of the VIJava Browser 

To download it, click here. VI Java API binary package is needed to run this application. If don’t have it yet, download it here.

This entry was posted in vSphere API and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.


  1. Vishal
    Posted August 6, 2010 at 11:40 am | Permalink

    Fails to browse the HostProfiles, from HostProfileManager.
    Got the following exception.
    Caused by: java.lang.ClassCastException: [Lcom.vmware.vim25.ManagedObjectReference; cannot be cast to [;

    Wrote a small code to test Profile[] getProfile call in HostProfilesManager. I get the same exception. is viJava broken for HostProfiles?


    private void testHostProfiles() {
    HostProfileManager hpm = si.getHostProfileManager();
    Profile[] profiles = hpm.getProfile(); // this call throws the exception.
    for (Profile p : profiles) {
    System.out.println(“Profile “+ p);
    * Method from
    public Profile[] getProfile()
    return (Profile[]) getCurrentProperty(“profile”); // this is the call in ProfileManager causing the exception.

  2. Posted August 6, 2010 at 1:29 pm | Permalink

    Hi Vishal,

    This is a bug in vijava api. Could you please file a bug:



  3. Posted August 6, 2010 at 6:03 pm | Permalink

    Thanks Vishal for filing the bug: It’s fixed. Check the bug record for more info.


  4. yan
    Posted August 16, 2010 at 3:32 am | Permalink

    Hi Setve,

    when I run this tools,it throw following error:
    Exception occurred during event dispatching:
    java.lang.InstantiationError: com.vmware.vim25.VimPortType
    at vijavaBrowser.LoginDialog.onOk(

    I used this version vi java api:

    And I also have the same error when writing my own class when only invoke this constructor method:

    public class newtest {

    public static void main(String[] args) throws RemoteException, MalformedURLException {
    ServiceInstance si = new ServiceInstance(new URL(“”), “root”, “password”, true);


    It is the same code as in the tool source code, I can not figure out why,can you help me? Cause if I can not have this “ServiceInstance” I can do nothing

  5. Posted August 16, 2010 at 10:01 am | Permalink

    Hi Yan,

    It’s most likely a classpath issue with AXIS generated stub included in your classpath. Remove it and try again.


  6. Vishal
    Posted August 16, 2010 at 6:04 pm | Permalink

    Thanks Steve, for a quick fix, I am assuming i can pick it up in a patch release of 4.1.

    One more question.

    I see that when viClient reports events there is a type field {error|info|warning}, how do i get this info along with the event object, seems like event object doesnt have a severity or type field.


  7. Posted August 17, 2010 at 12:23 am | Permalink

    Hi Vishal,
    I am going to GA the 2.1 very soon. You can either pick the source code from SVN right now or wait a little bit. I prefer the former because you can double check if the problem is solved. Please update the bug tracker upon validation.
    As you said, the event object itself does not have field for the type, but the concrete event (subtypes of Event) does indicate something. For example, HostEnableAdminFailedEvent tells the nature of the event by its type name. Hope it helps.

  8. Vishal
    Posted August 17, 2010 at 12:47 pm | Permalink


    Any reason why the severity is skipped from the Event object? in our NMS tool we need to set the severity for each event, and i was planning to have it same as your Enum – EventEventSeverity. we are currently processing 87 Events, it would be tough to parse the event name to get the severity.

    is it possible to add severity to the event object?


  9. Posted August 19, 2010 at 12:23 am | Permalink

    Hi Vishal,

    Just wrote a comprehensive blog: Hope you find it helpful.


  10. yan
    Posted August 19, 2010 at 4:27 am | Permalink

    Hi Steve,
    You are right,my lib is messed up with a vim25 jar file from AXIS stub.

  11. semmy
    Posted June 2, 2011 at 3:07 am | Permalink

    hi all,
    who can tell me how to run this VIJava Browser? i run it that reported error of “java.lang.NullPointerException”.


  12. semmy
    Posted June 2, 2011 at 3:31 am | Permalink

    hi all,
    The VIJava Browser connect to vCenter or ESX ?

  13. Posted June 2, 2011 at 9:47 am | Permalink

    Both. Better yet, ESXi too.


  14. Posted June 2, 2011 at 9:48 am | Permalink

    Want to share the stack trace?


  15. semmy
    Posted June 2, 2011 at 9:57 pm | Permalink

    thanks Steve,

    F:\application>java -cp . -jar vijavaBrowser.jar
    Exception in thread “main” java.lang.NullPointerException
    at vijavaBrowser.Application.main(

    the dom4j-1.6.1.jar and vijava2120100824.jar in current directory.

    thanks again
    @Steve Jin

  16. Posted June 3, 2011 at 12:19 am | Permalink

    After checking the src, I can guess why – it must be javac is null.
    419 JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
    420 JavaFileManager jfm = javac.getStandardFileManager(

    As stated in the page in, “This sample required JDK(not JRE) 6 and VMware VI (vSphere) Java API.”

    Most likely you were using JRE, or JDK for running this.


  17. semmy
    Posted June 3, 2011 at 3:58 am | Permalink

    hi Steve,
    i solved it.i used the JRE to run it so appeared error.Thanks!

    and I used VI Java API to develop application,but i don’t know how to traverse all vSwitch under the datacenter,not DistributedVirtualSwitch. and why have not the Managed Object of VirtualSwitch.

    thanks again!


  18. Posted March 17, 2015 at 11:27 am | Permalink

    I took this code and put it up on Github. I made is so it compiles with Maven. I also added a distinct icon to the searchable items so it was more obvious where you could search from.

  19. Posted March 17, 2015 at 11:28 am | Permalink

One Trackback

  • […] For the best user experience, vSphere Client hides some of the elements in the real path. For example, you don’t see an element called “vm” in a VI Client inventory tree. To find out exact inventory path, use MOB or the VIJava Browser. […]

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


    My company has created products like vSearch ("Super vCenter"), vijavaNG APIs, EAM APIs, ICE tool. We also help clients with virtualization and cloud computing on customized development, training. Should you, or someone you know, need these products and services, please feel free to contact me: steve __AT__

    Me: Steve Jin, VMware vExpert who authored the VMware VI and vSphere SDK by Prentice Hall, and created the de factor open source vSphere Java API while working at VMware engineering. Companies like Cisco, EMC, NetApp, HP, Dell, VMware, are among the users of the API and other tools I developed for their products, internal IT orchestration, and test automation.