[SOLVED] Fastest algorithm for beginners

Algorithms and parameters to put data in space
yannis
Posts:11
Joined:24 Dec 2011 14:24
Location:Brest, France
Contact:
Re: Fastest algorithm for beginners

Post by yannis » 30 Dec 2011 07:14

Still doesn't work:

Code: Select all

/usr/local/java/bin/java -cp "lib/gephi-toolkit.jar;." -Xms128m -Xmx260000m graphlayout.Main
Exception in thread "main" java.lang.NoClassDefFoundError: graphlayout/Main
Caused by: java.lang.ClassNotFoundException: graphlayout.Main
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: graphlayout.Main.  Program will exit.
The graphlayout/Main.class file is there indeed:

Code: Select all

ls -l graphlayout/
total 8
-rw-r--r-- 1 yannis users 3657 Dec 30 00:04 Main.class
-rw-r--r-- 1 yannis users 3216 Dec 29 23:37 Main.java

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Fastest algorithm for beginners

Post by eduramiba » 30 Dec 2011 14:31

Did you make sure to change directory to graphlayout and execute the script from there with just ./run.sh?
I tried it in windows with cygwin.

Eduardo

yannis
Posts:11
Joined:24 Dec 2011 14:24
Location:Brest, France
Contact:

Re: Fastest algorithm for beginners

Post by yannis » 30 Dec 2011 15:40

It works now! The error was that in Linux environment variables, directories are separated by colons and not by semicolons. Thank you very much again and happy news year's eve!

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Fastest algorithm for beginners

Post by eduramiba » 30 Dec 2011 15:47

Cool :)
You are welcome, happy new year to you too.

Eduardo

yannis
Posts:11
Joined:24 Dec 2011 14:24
Location:Brest, France
Contact:

How do I embed a font in the PDF file produced by gephi?

Post by yannis » 31 Dec 2011 20:35

It worked fine!

Now I have another problem, I don't know if I should continue this discussion or start a new one.

I use Chinese characters in the label of my graph, using font SimSun. They display fine in gephi's interface but the font is not exported in the PDF file (so that my graph in the PDF file is completely empty of labels). The only font included in the PDF file is Helvetica.

How can I embed fonts in the PDF files produced by gephi?

Thanks in advance

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Fastest algorithm for beginners

Post by admin » 31 Dec 2011 20:50

Hi,

Please create a bug report on GitHub ;)

asarraf21
Posts:1
Joined:12 Mar 2012 22:48
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: [SOLVED] Fastest algorithm for beginners

Post by asarraf21 » 12 Mar 2012 22:50

I can compile your example code (graphlayout.zip) but when I execute ./run.sh I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: graphlayout/Main
Caused by: java.lang.ClassNotFoundException: graphlayout.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)


Any hint?

Thisislike
Posts:8
Joined:20 May 2010 19:34
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: [SOLVED] Fastest algorithm for beginners

Post by Thisislike » 06 Jun 2012 18:03

Hey assaraf,

The answer is above: if you're running the script on Linux (or Terminal in Mac OS X) you need to replace the semicolon with a colon. So you should run:

Code: Select all

java -cp "lib/gephi-toolkit.jar:." graphlayout.Main
Worked for me even though I had the same error as you...

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable