Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8913479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:28:30+00:00 2026-06-15T04:28:30+00:00

I’m currently trying to load and use the Gephi Toolkit from within a .Net

  • 0

I’m currently trying to load and use the Gephi Toolkit from within a .Net 4 C# website.

I have a version of the toolkit jar file compiled against the IKVM virtual machine, which works as expected from a command line application using the following code:

var controller = (ProjectController)Lookup.getDefault().lookup(typeof(ProjectController));
controller.closeCurrentProject();
controller.newProject();
var project = controller.getCurrentProject();
var workspace = controller.getCurrentWorkspace();

The three instances are correctly instantiated in a form similar to org.gephi.project.impl.ProjectControllerImpl@8ddb93.

If however I run the exact same code, with the exact same using statements & references, the very first line loading the ProjectController instance returns null.

I have tried a couple of solutions

Firstly, I have tried ignoring the Lookup.getDefault().lookup(type) call, instead trying to create my own instances:

var controller = new ProjectControllerImpl();
controller.closeCurrentProject();
controller.newProject();
var project = controller.getCurrentProject();
var workspace = controller.getCurrentWorkspace();

This fails at the line controller.newProject();, I think because internally (using reflector) the same Lookup.getDefault().lookup(type) is used in a constructor, returns null and then throws an exception.

Secondly, from here: Lookup in Jython (and Gephi) I have tried to set the %CLASSPATH% to the location of both the toolkit JAR and DLL files.

Is there a reason why the Lookup.getDefault().lookup(type) would not work in a web environment? I’m not a Java developer, so I am a bit out of my depth with the Java side of this.

I would have thought it possible to create all of the instances myself, but haven’t been able to find a way to do so.

I also cannot find a way of seeing why the ProjectController load returned null. No exception is thrown, and unless I’m being very dumb, there doesn’t appear to be a method to see the result of the attempted load.

Update – Answer

Based on the answer from Jeroen Frijters, I resolved the issue like this:

public class Global : System.Web.HttpApplication
{
    public Global()
    {
        var assembly = Assembly.LoadFrom(Path.Combine(root, "gephi-toolkit.dll"));
        var acl = new AssemblyClassLoader(assembly);
        java.lang.Thread.currentThread().setContextClassLoader(new MySystemClassLoader(acl));
    }
}

internal class MySystemClassLoader : ClassLoader
{
    public MySystemClassLoader(ClassLoader parent)
        : base(new AppDomainAssemblyClassLoader(typeof(MySystemClassLoader).Assembly))
    { }
}

The code ikvm.runtime.Startup.addBootClassPathAssemby() didn’t seem to work for me, but from the provided link, I was able to find a solution that seems to work in all instances.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T04:28:32+00:00Added an answer on June 15, 2026 at 4:28 am

    This is a Java class loader issue. In a command line app your main executable functions as the system class loader and knows how to load assembly dependencies, but in a web process there is no main executable so that system class loader doesn’t know how to load anything useful.

    One of the solutions is to call ikvm.runtime.Startup.addBootClassPathAssemby() to add the relevant assemblies to the boot class loader.

    For more on IKVM class loading issues see http://sourceforge.net/apps/mediawiki/ikvm/index.php?title=ClassLoader

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I am currently running into a problem where an element is coming back from
I am trying to render a haml file in a javascript response like so:
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.