This discussion is archived
3 Replies Latest reply: Dec 1, 2012 10:54 AM by jschellSomeoneStoleMyAlias RSS

32-bit JDK 7 System.out.println not working in IDE

bobz Newbie
Currently Being Moderated
Hi folks,

I have a 64-bit Windows 7 OS.

Due to 3rd party library/jar dependencies, i had to install the 32-bit Java JDK 1.7 and Eclipse IDE.
I also installed NetBeans.

So i have a 64-bit OS and am running 32-bit Java JDK/JRE & IDEs.

The problem I am having is that my program's System.out.println("...") statements are not outputting strings to either IDE debug console.

Executing the compiled program from a command line/prompt produces the expected string output.

The basic "Hello, World" program is enough to cause this behaviour to start occurring.

I have not manually / intentionally changed any IDE-specific Debug Console or Windows environment settings.

One caveat: This same environment has worked successfully in the past ?! Yes, this is one of those "..it worked last week & yesterday and today it isn't and i swear i didn't do anything..." issue.


Thoughts ?
  • 1. Re: 32-bit JDK 7 System.out.println not working in IDE
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    Did you install 64 bit first then 32 bit later. At least one time that was problematic.

    You could redirect System.out to a file and that might indicate whether the IDE or VM was having the problem.
  • 2. Re: 32-bit JDK 7 System.out.println not working in IDE
    bobz Newbie
    Currently Being Moderated
    Thanks for the reply.

    The 64-bit versions of Java & Eclipse were installed first.
    When i discovered I had to use the 32-bit versions, i un-installed the 64-bit ones & installed the 32-bits.
    Even after that initial un-install 64-bit/install 32-bit process, it was working.

    I have also been installing the Windows 7 64-bit OS updates when i am informed of them.
    I'm not sure if any of these would affect how the Eclipse / NetBeans IDEs behave.

    Behaviour has been inconsistent.
    Initially it was always working.
    But over the past several days, it has been working less and less.
    I don't have any large data structures.
    This isn't a large complicated program, couple hundred lines, so i highly doubt that i'm doing anything to the resources, but something has changed.

    The main project I am working on takes command line parameters, does some initial processing, produces output using System.out.printlns [SOP] then depending on the parameters, branches into 2 different processing paths, let's call them A & B. Each of these processing paths also use SOPs. When i run the program in the IDE going thru path A, sometimes the initial SOP statements will work and the SOP statements specific to path A will also work. If i immediately change the parameters to go thru path B & re-run it, not even the initial SOP statements before the branching decision work.

    I've tried doing System.flush()s too - no affect.
    I haven't tried the re-direction option to a file option you mentioned yet.

    It always works from a command prompt - that is telling me that the Java SOPs are working properly, correct ?

    Inside an Eclipse or NetBeans IDE, SOP output to the debug console is inconsistent.
    Running from a command prompt, the SOPs always work.

    It'd help to know if this an IDE issue, a Java issue, a Windows 7 issue so i can narrow down where to try and correct the situation.

    I have a Windows XP VM set up, i'll try running the program there and see if there's a difference.

    Thanks for your reply.
  • 3. Re: 32-bit JDK 7 System.out.println not working in IDE
    jschellSomeoneStoleMyAlias Expert
    Currently Being Moderated
    BZ Annapolis wrote:
    It always works from a command prompt - that is telling me that the Java SOPs are working properly, correct ?
    Eclipse could be using a different VM.

    >
    Inside an Eclipse or NetBeans IDE, SOP output to the debug console is inconsistent.
    Running from a command prompt, the SOPs always work.

    It'd help to know if this an IDE issue, a Java issue, a Windows 7 issue so i can narrow down where to try and correct the situation.
    Since it always works from the command line it would seem to be a IDE issue. Other than that it might be some esoteric Win7 API issue.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points