If I use:
ProcessBuilder builder = new ProcessBuilder("java", "-Xmx8192m", "-cp",
"dist/MemoryLauncher.jar", "Project.Main");
the Netbeans console will detect both Main methods, but the default Windows
console won't. If I use:
ProcessBuilder builder = new ProcessBuilder("java", "-Xmx8192m",
I don't know, but the reason why is clear -- on the command line, you're
running your Launcher from a JAR file, while in NetBeans what you're
running is the compiled Launcher.class in the 'build' folder.
Gj
On Wed, Sep 19, 2018 at 8:47 AM, A Z wrote:
> If I use:
>
> *ProcessBuilder builder = ne
If I use:
ProcessBuilder builder = new ProcessBuilder("java", "-Xmx8192m", "-cp",
"dist/MemoryLauncher.jar", "Project.Main");
the Netbeans console will detect both Main methods, but the default Windows
console won't. If I use:
ProcessBuilder builder = new ProcessBuilder("java", "-Xmx8192m", "
Please don't send code around that is "designed to intentionally fill up
memory".
To respond to your problem, a first question to ask is whether
"MemoryLauncher.jar" exists anywhere? I doubt it.
You'll need to build the project (right-click the project and choose
Build), which means that that JAR
//I am encountering my Netbeans 9 console capture problem via the following:
package Project;
import java.util.LinkedList;
import static java.lang.System.out;
public class Main
{
public static void main(String ... args)
{
out.println();
out.println("Primary Main program has begun.");
o
Well, do you have a class named Project.Main?
Gj
On Wed, Sep 19, 2018 at 4:22 AM, A Z wrote:
> I am running Windows 10 64 bit and 64 bit Netbeans 9.
>
> I order to have the Netbeans console listen to both processes,
> I was suggested from this emailing list:
>
>
I am running Windows 10 64 bit and 64 bit Netbeans 9.
I order to have the Netbeans console listen to both processes,
I was suggested from this emailing list:
What you need to do is have the output of the spawned
What you need to do is have the output of the spawned process redirected to the
STDOUT and STDERR of the current process. The following should work:
ProcessBuilder pb = ProcessBuilder.command (“java”, “-Xmx8192m”, “-cp”,
“MemoryLauncher.jar”, "Project.Main”);
pb.inheritIO();