Not sure how there can be a better solution (you're welcome, by the way) -- in NetBeans you are not running JAR files, you are running compiled source code; on the command line, you are running JAR files.
Thanks, Gj On Wed, Sep 19, 2018 at 8:57 AM, A Z <powerus...@live.com.au> wrote: > > 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", "-cp", > "MemoryLauncher.jar", "Project.Main"); > > The the Windows console will detect both Main methods, but the Netbeans > console won't. > > Is there one command or one approach so that both console will detect the > second invocation for Project.Main? > > --- > > 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 > > -- > > -Is there anyone else on the Netbeans users email list who can offer me a > better solution to my issue? > Or should I just forget about this linking to both consoles, use Netbeans > to test and finish my programs, > and update my code at the end for the OS console alone? >