jzy3d Setup in Eclipse Tips

827 views
Skip to first unread message

David Streid

unread,
Oct 2, 2014, 10:53:09 AM10/2/14
to jz...@googlegroups.com
I inherited a project in eclipse that generates nodes and edges that it is my job to visualize using the jzy3d library. The previous owner had implemented all visualization using the GEF framework in eclipse, but this is limited to 2d representations.

I downloaded the jzy3d.jar file from the jzy3d website downloads page and added the .jar file to my project as an external .jar file (Right click project > properties > Java Build Path > Libraries > add External .jar). I couldn't figure out how to add it as "add JARS", so I just took it from my downloads folder. There are no errors so it looks like it's importing correctly. 

The problem is that even when I take code from online tutorials that should work, I am rewarded with a blank graphing screen instead of the cool jzy3d visuals. I am currently learning from a jzy3d-quickstart tutorial I found online. 

Has anyone worked with jzy3d in eclipse? Are there any set up steps that I'm missing or any troubleshooting advice that you have? My most immediate issue is getting some of these tutorials I'm learning from to work in eclipse. Even if you have other guides about this or any other useful subjects that you could refer me to, I would greatly appreciate it. Thanks guys!

Martin Pernollet

unread,
Oct 2, 2014, 11:01:37 AM10/2/14
to Jzy3d
2014-10-02 16:53 GMT+02:00 David Streid <david.st...@gmail.com>:
I inherited a project in eclipse that generates nodes and edges that it is my job to visualize using the jzy3d library. The previous owner had implemented all visualization using the GEF framework in eclipse, but this is limited to 2d representations.

There is a 3d graph prototype but I did not really maintained it. I guess the source code might help you. But you should first try to have a basic example working (e.g. surface)


 
I downloaded the jzy3d.jar file from the jzy3d website downloads page and added the .jar file to my project as an external .jar file (Right click project > properties > Java Build Path > Libraries > add External .jar). I couldn't figure out how to add it as "add JARS", so I just took it from my downloads folder. There are no errors so it looks like it's importing correctly. 

I suggest you try building the tutorial and retrieving dependencies using maven. Maven is sometime a pain to learn, but once working it's nice :)

 
The problem is that even when I take code from online tutorials that should work, I am rewarded with a blank graphing screen instead of the cool jzy3d visuals. I am currently learning from a jzy3d-quickstart tutorial I found online. 


It might help starting with maven. 
Do you have any error message in console?
 
Has anyone worked with jzy3d in eclipse? Are there any set up steps that I'm missing or any troubleshooting advice that you have? My most immediate issue is getting some of these tutorials I'm learning from to work in eclipse. Even if you have other guides about this or any other useful subjects that you could refer me to, I would greatly appreciate it. Thanks guys!

I've always been using Eclipse, so it should work :)

If you are running eclipse on mac, there is an issue described here (http://www.jzy3d.org/troubleshooting.php). Not exactly yours, but similar. The classpath content issue is a good reason for using maven for handling dependencies!

 

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Jzy3d".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Message has been deleted

David Streid

unread,
Oct 4, 2014, 1:45:01 PM10/4/14
to jz...@googlegroups.com
Martin, you're the absolute best! :D 

Thank you so much. I got set up with maven using a few helpful links
Right now I have all the files for the project and jzy3d in eclipse and I told eclipse the path to my local maven repository. 

Is the relationship between eclipse & maven that I am coding in Eclipse and then running the code with Maven? Am I conceptualizing the two parts of this correctly?

More specifically, if I have a file that should display jzy3d visuals - ScatterDemo, and it's contained within the "jzy3d-api" directory, how should I run the individual file through maven and so that I can see what it produces as well? 

I tried to run the entire project - org.jzy3d.jzy3d-master. I right-clicked > Run as... > Maven build, but I received the output below. As of now, I am looking into what goals I should specify in the run as. Are there any other libraries I need to import? From what I've found, I've taken a guess that I need to utilize jogl & gluegen. Would anyone recommend this? And if so what for?

[INFO] Scanning for projects...

[WARNING] 

[WARNING] Some problems were encountered while building the effective model for org.jzy3d:jzy3d-api:jar:0.9.2-SNAPSHOT

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 86, column 12

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 96, column 12

[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 56, column 12

[WARNING] 

[WARNING] Some problems were encountered while building the effective model for org.jzy3d:jzy3d-swt:jar:0.9.2-SNAPSHOT

[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:jar -> duplicate declaration of version 4.2.1 @ line 42, column 21

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 86, column 21

[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 60, column 21

[WARNING] 

[WARNING] Some problems were encountered while building the effective model for org.jzy3d:jzy3d-tutorials:jar:0.9.2-SNAPSHOT

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 69, column 21

[WARNING] 

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING] 

[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

[WARNING] 

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Build Order:

[INFO] 

[INFO] Jzy3d Master Project

[INFO] JDT core (fork of https://github.com/yonatang/JDT)

[INFO] Jzy3d API

[INFO] Jzy3d SWT Tools

[INFO] Jzy3d Tutorials

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary:

[INFO] 

[INFO] Jzy3d Master Project .............................. SKIPPED

[INFO] JDT core (fork of https://github.com/yonatang/JDT)  SKIPPED

[INFO] Jzy3d API ......................................... SKIPPED

[INFO] Jzy3d SWT Tools ................................... SKIPPED

[INFO] Jzy3d Tutorials ................................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 0.250 s

[INFO] Finished at: 2014-10-04T13:27:44-05:00

[INFO] Final Memory: 5M/162M

[INFO] ------------------------------------------------------------------------

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

I'm not quite sure what to do next. I'm currently 

Martin Pernollet

unread,
Oct 5, 2014, 3:20:04 PM10/5/14
to Jzy3d
All project should appear as maven java project, not as "raw" folders.
If you can't import successfully via eclipse, you can still generate eclipse project files with maven : 

cd jzy3d-main
mvn eclipse:eclipse -Declipse.workspace="Users/martin/Dev/workspace-main"

where jzy3d-main is : https://github.com/jzy3d/jzy3d-api
replace eclipse.workspace value with the path to your eclipse workspace (probably in user home by default).

then import from eclipse as standard java projects


--

David Streid

unread,
Oct 7, 2014, 3:13:58 PM10/7/14
to jz...@googlegroups.com
Now I have this, but do I need to use GEPHI to visualize these tutorials? I'm at a point where I believe that I can run the scatterdemo.java b/c it has a main method, but (if this makes sense) can't do it because I can't specify that I want to run that .java demo specifically.

Would it be possible to get more explanation as to how to do this?

As always, thanks so much Martin.
Reply all
Reply to author
Forward
0 new messages