Well, do you have a class named Project.Main?

Gj

On Wed, Sep 19, 2018 at 4:22 AM, A Z <powerus...@live.com.au> 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:
>
> ------------------------------------------------------------
> ------------------------
> 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();
> pb.start();
> ------------------------------------------------------------
> ------------------------
> I have done:
>
> ProcessBuilder builder = new ProcessBuilder("java", "-Xmx8192m", "-cp",
> "MemoryLauncher.jar", "Project.Main");
>
> builder.inheritIO();
>
> Process process = builder.start();
>
> While both outputs will go to the command prompt if I run this program
> outside of netbeans,
> if I try to run my program inside of netbeans, the only thing that it
> tells me is:
>
> Error: Could not find or load main class Project.Main
>
> How on earth is this?  How can I adjust matters to work both ways?
>
>

Reply via email to