Hi guys
I try to run this shell in java but it never works.

    Process p = Runtime.getRuntime().exec(" cat *.java|sed '/import/d'|sed'/package/d'>>b.java ");

when I change the cmd to something like "ls" or "open foo.java" the code will works.

Any idea why?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.