[gephi-dev] Headless Toolkit Example

22 views
Skip to first unread message

Elijah Meeks

unread,
Oct 4, 2015, 11:15:51 AM10/4/15
to gephi-dev
Hey Guys,

I was playing around with the Toolkit today and most of the examples are working great, but when I drop the code into Eclipse, I get errors on the following two lines:

File file = new File(getClass().getResource("/org/gephi/toolkit/demos/resources/polblogs.gml").toURI());

"Cannot make a reference to the non-static method getClass from the type Object"


DegreeRangeFilter degreeFilter = new DegreeRangeFilter();

"DegreeRangeFilter cannot be resolved to a type" (it suggests DegreeRangeBuilder)

Any suggestions?

-Elijah


************
Elijah Meeks
http://dhs.stanford.edu
Digital Humanities Specialist
Academic Computing Services
Stanford University
eme...@stanford.edu
(650)387-6170


Eduardo Ramos Ibáñez

unread,
Oct 4, 2015, 11:15:51 AM10/4/15
to Elijah Meeks, gephi-dev
Hi Elijah,

Are you using the demos original source included in the toolkit or copying code from the wiki?
It is the same code but:


File file = new File(getClass().getResource("/org/gephi/toolkit/demos/resources/polblogs.gml").toURI());
If you have this in a static method like main, you need to replace getClass with YourClass.class

About the second error, it should not happen. It works for me using the toolkit with eclipse.

Eduardo

2011/8/10 Elijah Meeks <eme...@stanford.edu>
_______________________________________________
gephi-dev mailing list
geph...@lists.gephi.org
http://gephi.org/mailman/listinfo/gephi-dev

Elijah Richard Meeks

unread,
Oct 4, 2015, 11:15:52 AM10/4/15
to Eduardo Ramos Ibáñez, gephi-dev
Thanks, Eduardo, that worked.  I was using the code from the wiki--no idea why the DegreeFilter issue only happens with that.

Elijah

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages