Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 11047610

@User 11047610
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • error: could not find or load main class
    U User 11047610

    import org.graphstream.graph.*;
    import org.graphstream.graph.implementations.*;
    import java.util.Iterator;

    public class GraphExplore {
    public static void main(String args[]) {
    new GraphExplore();
    }

    public GraphExplore() {
        Graph graph = new SingleGraph("tutorial 1");
    
        graph.addAttribute("ui.stylesheet", styleSheet);
        graph.setAutoCreate(true);
        graph.setStrict(false);
        graph.display();
    
        graph.addEdge("AB", "A", "B");
        graph.addEdge("BC", "B", "C");
        graph.addEdge("CA", "C", "A");
        graph.addEdge("AD", "A", "D");
        graph.addEdge("DE", "D", "E");
        graph.addEdge("DF", "D", "F");
        graph.addEdge("EF", "E", "F");
    
        for (Node node : graph) {
            node.addAttribute("ui.label", node.getId());
        }
    
        explore(graph.getNode("A"));
    }
    
    public void explore(Node source) {
        Iterator k = source.getBreadthFirstIterator();
    
        while (k.hasNext()) {
            Node next = k.next();
            next.setAttribute("ui.class", "marked");
            sleep();
        }
    }
    
    protected void sleep() {
        try { Thread.sleep(1000); } catch (Exception e) {}
    }
    
    protected String styleSheet =
        "node {" +
        "   fill-color: black;" +
        "}" +
        "node.marked {" +
        "   fill-color: red;" +
        "}";
    

    }

    Java help java asp-net linux

  • error: could not find or load main class
    U User 11047610

    0 down vote favorite on my ubuntu terminal i was trying to compile and run the program like this javac -cp "/usr/lib/jvm/jdk1.8.0_20/lib/gs-core-1.2.jar" GraphExplore.java successfully compiled.now to run java -cp "/usr/lib/jvm/jdk1.8.0_20/lib/gs-core-1.2.jar" GraphExplore I got error saying Error: Could not find or load main class GraphExplore I am newbee in java.please someone help me to resovle this issue.thanks in advance.what i tried to resolve this error.i kept .class file in one folder and run i mean i kept in one path and tried to execute in that path only but it didnt work.please help me

    Java help java asp-net linux

  • need help for creation of graph in main memory and traversing the graph in java
    U User 11047610

    1)need to read the data from an input file where input file contains parameters like no:of nodes,no:of subgraphs,random number etc.(idea how to specify all these in input file) 2)create a data structure tree or array to store above 3)create graph in main memory and traverse this graph a node at a time and outputs the data into output files 4)output file must contain node id and ids to which it is connected to please help.i am starter in coding.please do help and guide me.thanks in advance. my mail pavani.asb@gmail.com

    Java data-structures tutorial java com performance
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups