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

  • SEARCH
  • Home
  • 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 7830137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:05:25+00:00 2026-06-02T11:05:25+00:00

I am trying to call the sccmap command from GraphViz using Java. String command

  • 0

I am trying to call the sccmap command from GraphViz using Java.

        String command = "/usr/bin/sccmap -S /home/paperclip/Desktop/graph.dot > /home/paperclip/Desktop/scc.dot";
        try {
            Runtime rt = Runtime.getRuntime();
            Process p = rt.exec(command);
            System.out.println("Process exited with code = " + p.waitFor());
            java.io.InputStream is = p.getInputStream();
            java.io.BufferedReader reader = new java.io.BufferedReader(new InputStreamReader(is));
            String s = null;
            while ((s = reader.readLine()) != null) {
                System.out.println(s);
            }
            is.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

The output for this snippet of code is:

Process exited with code = 0

The sccmap function is supposed to output a dot file in the location that I have specified. However, it doesn’t work like I expected. Even though the exitValue was given as 0, the dot file was not created.

I tried using the command manually in Terminal and it works perfectly. I also tried using other commands such as “ls” and it works too. Why does this code not work for “sccmap”?

I also searched for some Java APIs for GraphViz such as the jGraphViz (http://jgraphviz.sourceforge.net/) and graphviz-java-api at (http://www.loria.fr/~szathmar/off/projects/java/GraphVizAPI/index.php), but they don’t seem to work for me.

FYI I am on Ubuntu 11.10 and GraphViz is already installed.

Thanks!

  • 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-02T11:05:29+00:00Added an answer on June 2, 2026 at 11:05 am

    > is interpreted by the shell (it’s a stream redirect), it’s not an argument to the application. There is no shell in this situation.

    Try /usr/bin/sccmap -S -o /home/paperclip/Desktop/scc.dot /home/paperclip/Desktop/graph.dot instead.

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

Sidebar

Related Questions

I am trying to call cleartool from an java application, but cleartool hangs even
While trying to call an EJB made using NETbeans (using jdk1.7) from a client
Trying to call from an android client, using the signpost oauth libs. I generated
I'm trying to call a C# method from JavaScript by using ActiveXObject : var
i am trying to call an parameterized constructor from an expression instead of using
I'm trying to call a simple stateless session bean from a Java SE (Simple
Been trying to call Preferences.java class using: Intent settingsActivity = new Intent(getBaseContext(), Preferences.class); startActivity(settingsActivity);
I am trying to call an ASMX from jQuery using JSON and get a
im trying to call a bean from a javascript, using a h:commandLink. i have
I am trying to call a Restful WS from GWT using JSOPRequestBuilder. I have

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.