Is there a way to force System.out.println to run when called

I working on my first threaded program and having a hard time debugging. I've used System.out.println to let me know what's going on but due (I assume) to the nature of threads the output is not sequential. Is there a way to force println to execute immediatly so that they show up in the order they were called?
Thanks --- Mike

mjs1138 wrote:
endasil, Thanks for the reply. I'm currenlty running the program from within the NetBeans IDE. It is the output displayed by in NetBeans "output" that I'm looking at.
--- MikeI don't use Netbeans, but I would guess that it too pipes Standard Out and Standard Error to the same console. You didn't address my comment. Are you printing to System.err as well? This happens implicitly if you use Exception.printStackTrace(), for example.

Similar Messages

  • Is there a way to make system.out.println() scroll down as it goes?

    I am writing a program where I want to be able to read what's printed out in the console of my IDE through System.out.println() as the program runs/after the program runs. However, right now I run the program, the message prints out, and then when I go to read it the scroll bar is all the way up so I can see only the top of the print-out (the first thing printed out). Is there any way I can get the console to scroll along with the text, kind of like floating boxes you see on various websites for various reasons? In other words, can I get it so that when I look in the console at any given moment of the program running, I am looking at the newest text printed out (the text at the bottom of the "page")? Thank you!

    That would be an IDE problem and not a Java one. You could redirect output into a text file so you can read at your leisure and scroll up and down as much as you like.

  • Is there a way to force audio out through the Thunderbolt port?

    I am trying to connect a 15" MacBook Pro to an InFocus 3916 using a Mini DisplayPort to HDMI adapter.
    I know that the computer, adapters, and cables I am using support audio over HDMI.
         I have tested 4 separate adapters, 2 cables, and 2 computers, all of them work when hooked up to a Samsung HD TV.
    I know the Projector supports audio over HDMI, because I plugged a Apple TV into the projector using the same cable, and it worked fine.
    When I am using the Samsung HD TV: System Preferences->Sound->Output shows "Samsung" in the choices of outputs.
    When I try using any of the three Infocus Projectors, it only shows the internal audio.
    I have tried resetting the PRAM, and SMC. I have tried plugging in an audio cable to my computer to force a refresh of the Sound Preference Pane... I have tried turning on and off the projector.
    At this point I am trying to find a way to force Mac OS X to recognize the Projector as an audio output... Or at least to force the computer to think there is something there, so that it will push sound out the thunderbolt port.
    MBP Hardware Configuration:
    15" MacBook Pro, Late 2011
    2.2 GHz Intel Core i7
    AMD Radeon HD 6750M 512 MB
    OS X Lion 10.7.2
    Latest updates except Apple Remote Desktop 3.5.1

    mjs1138 wrote:
    endasil, Thanks for the reply. I'm currenlty running the program from within the NetBeans IDE. It is the output displayed by in NetBeans "output" that I'm looking at.
    --- MikeI don't use Netbeans, but I would guess that it too pipes Standard Out and Standard Error to the same console. You didn't address my comment. Are you printing to System.err as well? This happens implicitly if you use Exception.printStackTrace(), for example.

  • Where will the System.out.println write to when using OC4J -9iAS 9.0.3?

    Hi:
    We are using OC4J 9.0.3 that is bundled into 9iAS 9.0.3 on Windows 2000. We are starting/stopping OC4J using Enterprise Manager Web Site. Is there a way to display java logs (System.out's in the code) somewhere when we access a web application that is deployed on OC4J?
    If not, can we start/stop oc4j using console in 9iAS?
    When I start it like
    C:\9iASHOME\j2ee\home>start java -jar oc4j.jar
    even though it looks like Oc4j is started, I get an Internal Server error when I display a page. I can display the same page whenever I start oc4j from Enterprise Web Site.
    Thanks!!

    <ORACLE_HOME>\opmn\logs\<OC4J_NAME>.defualt_island.1

  • Is there a way to force "tv out" on iPad

    Sometimes when the HDMI out is connected to a tv, it shows tv out, and the output to tv is full screen. Other times, it just shows the iPad screen on the tv, which is in a window. When the HDMI is connected after the movie, it almost always is wrong, but lately is not full screen anyway.

    I suppose I could "zoom," but then the resolution wouldn't be correct. Again, when the iPad screen shows "connected to TV," the tv reads the input as it should. This is a problem with the iPad not recognizing it is connected via the HDMI.

  • Is there a way to auto sign out from itunes store when itunes is closed?

    We have multiple libraries on one PC (Win7). Each user has their own Itunes account and their own Itunes library. When Itunes is closed and then reopened into a different library, the Itunes Store remaines signed in to the last user who signed in. I would like to automatically sign out of the Itunes store when Itunes is closed. Anybody have a suggestion?

    Hi,
    iChat and Messages 7 (Mountain Lion) had a pane in the App Menu > Preferences  called Alerts.
    This could see the Sounds in iChat (or Messages), the System Sounds defaults and anything you had stored in ~/Library/Messages and you could set any of these Sounds to any of the 17 actions as a global choice
    As in Maverick if you highlight a Buddy in a Buddy List and then use CMD + i (Get Info) you could similarly set sound to individual Buddies.
    You cannot do this in Mavericks/Messages 8 as the Alerts Pane have disappeared.
    You cannot turn Off the sounds the app makes for the various different actions such as Video Invite or File Transfers.
    You can no longer set individual Buddy sounds either.
    There has not been a way to do this for iMessage Contacts.
    9:28 pm      Sunday; December 8, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Is there a way to force SpeedGrade to update its display when it fails to?

    I'm on a Retina MacBook Pro, and I've turned of GPU acceleration for SpeedGrade per Adobe's instructions, so it won't crash immediately every time I try to open any sequence.
    But I still have a problem: when I draw a mask on the Primary layer, and click the "Apply grading layer to the inside of the mask" button, most of the sliders I use don't have any effect at all. Until, eventually, the screen updates to show what I've done. But sometimes it just never does.
    And I'm definitely using SpeedGrade correctly; it's just that the display only sometimes updates. I mean, I can drag Input Saturation ALL the way to the right, then toggle the Primary layer on and off a few times...and then suddenly the person's face turns orange. But only after I click around for a while and wait.
    What's wrong? Will these problems go away once GPU acceleration is fixed for Intel Iris graphics on the Retina MacBook Pro? Or...?
    I have to say, frankly, that while I love the idea of SpeedGrade, between (months ago) very, very long waits (literally ten minutes) to open a project via Dynamic Link, to the frequent crashes, to this problem now, that I've never been able to simply use SpeedGrade as intended. Every single time I've opened it in the last year, I've had a string of problems. Meanwhile, while I've had some issues with Premiere, it's generally been reliable and a pleasure to use, just like Media Encoder and many other parts of the suite. So when is SpeedGrade going to get the same bugfixing love the other apps get?
    And in the meantime, what can I do to get SpeedGrade working??

    Speedgrade uses some of similar back-coding to PrPro, but much of it is quite different. So the melding of the two within a Direct - to - Sg link workflow (as it seems you are using) is a bit ... complicated. And clearly still uses more and in some cases specific resources than would be used in either program run alone. That said, there's a couple things that might help you.
    First ... after the "handoff", when you are looking at a Speedgrade UI with your project loaded, close down ALL other apps open, including but ESPECIALLY PrPro. Sg will start up PrPro for you when you click on the icon to save & return to PrPro. This helps a lot of the time.
    Second ... realize that masking within a DL session is ... difficult ... for the program to handle and may overtax your laptop's capabilities. They've improved the abilities of masks to function in DL operation, but it's still not nearly the same as say Sg can do if in a "native" mode ... working your footage within say an EDL style session, where Sg is working on it's own project file, an " ircp-dot" file. A bit more complicate & time consuming to prep for, but might actually work while doing your grading.
    Neil

  • Is there a way to force firefox to send ajax-request when user clicks on a link and redirect occurs?

    I'm trying to send ajax-request with web-analytics data when user clicks on a link. But Firefox cancels the request and moves to the link location. Sync requests or waiting for response is not an option because performance is critical.

    Correct me if I'm wrong here:
    <code>jQuery.data()</code> saves the <code>{"foo": "bar"}</code> JSON object to variable <code>data</code>, and then the <code>s.tl()</code> call sends <code>data</code> to the server, right?
    You could use jQuery's [http://api.jquery.com/event.preventDefault/ <code>event.preventDefault()</code>] method to stop the browser from automatically following the link on click. You could wait until the Ajax request was finished before following the link.
    <hr>
    I hope that solved your problem!
    <i>If it did, would you please choose this answer as your solution? It would help other Firefox users to find help on the forums faster and more efficiently. Thanks!</i>
    And of course, feel free to post back if you need more help!
    Happy browsing!

  • I have 54cents in my account and I want to spend it. Is there any way to get it out of my account!

    I have 54cents in my account and I want to spend it. Is there any way to get it out of my account?

    Call Apple and ask them to zero it out for you.

  • Is there a way to force a file sharing user to log out?

    I have a problem: I've got a few more Macs in my office that need to connect to my computer from time to time via file sharing than OS X Snow Leopard wants to allow. I know Apple wants me to use OS X Server but I don't want to lose the simplicity of my normal workflow. Part of the problem is that users are not logged out unless they manually close the file share, which means that, say, a laptop that's asleep will still be taking up one "file sharing user slow" even though it's not needed. I can see who is logged in via the command
    set theUsers to do shell script "netstat -na | awk '/.548/ {print $5}'"
    but want I need to know is, is there any way to force, say, user 192.168.1.8.50244 off of my file share without stopping and restarting file sharing, which logs everyone out (and breaks some of my scripts on other computers.
    Any help would be appreciated.

    You could start with this hint and go from there...
    [Command Line Kung Fu #63|http://blog.commandlinekungfu.com/2009/10/episode-63-death-to-users.html]

  • Is there a way to force the Tag Engine to dump its input buffer to the database?

    I have an application where I start a process and log the data, and then call a subVI that uses the Read Historical Trend VIs to get all of the data from when the process started until now. The problem is that the Historical Trend VIs only read from the database on disk, and the Tag Engine's buffer doesn't write to disk until it's full (or possibly times out; I'm not sure about that, though). Is there a way to force the Tag Engine to write to disk, so that the Historical Trend VIs will return the most recent data?
    Shrinking the buffer will help a little, but that will only result in missing less of the most recent data. One possible hack is to have a dummy tag that I simply write enou
    gh data to that will cause the buffer to be written to the database. I was hoping for something more elegant, though.

    That's a good question.
    The control about the datalogging and the DSC Engine is all done (more or less) automatically - you feel the NI ease-of-use idea
    That means the Citadel service (one of the NI Services installed by LabVIEW DSC) is responsible of taking care about the datahandling (writing to and reading from the database files including caching some data e.g. index files, frequently used data...).
    The DSC Engine makes a request to the Citadel service that this data has to be logged. Everything else is handled by the Citadel service. Internally, there are two kinds of logging periods handled through the Citadel service. One for traces being viewed (a small period: 200ms) and one for traces not being viewed (slow (big) log period: 20000ms). That
    means, if Citadel gets a request to store a value it will buffer it and store it as soon as possible depending on other circumstances. One depends on the fact if this trace data is being viewed (e.g. with Read Histroical Trend.vi) If you request/read to view a trace you should pretty much see the current values because citadel should use the fast log period.
    The Citadel service takes care as well about setting priorities e.g. the writes before the reads (We don't want to loose data - right?). That means if you really stuff the system by writing a lot of data the CPU might get overloaded and the reads will happen less often.
    If you really want to see "real-time" data I would recommend to use the "Trend Tags.vi". With this approach you avoid the chain DSCEngine-Output Buffer-CitadelService-InputBuffer-File-HD... and back.
    I hope this info helps.
    Roland
    PS: I've attached a simple VI that has a tip (workaround) in it which might do what you are looking for... However, Nationa
    l Instruments cannot support this offically because the VI being used are internally DSC VIs that certainly change in the next version of LV DSC... and therefore you would need to "re-factor" your application.
    Attachments:
    BenchReadHistTrend.llb ‏104 KB

  • Is there a way to "force-mount" an external drive that doesn't show up on it's own when plugged in with firewire?

    Hi, is there a way to "force-mount" an external drive that doesn't show up on the desktop? I have a new Hitachi SATA III 2 TB Ultrastar that won't show up like all the other drives when plugged in. So I can't partition, repair, format etc with Disk Utility, Disk Drill, Tech Tools etc. How do I make it visible?
    I use the FW 400 to 800 adapter and a FW hub.
    Thanks,
    W.

    ok, I did find the log in Diskutil of what happened, I just can't figure out why it happened and how to start over:
    2014-04-20 13:42:08 -0400: Disk Utility started.
    2014-04-20 13:44:30 -0400: Preparing to erase : “Terra 8”
    2014-04-20 13:44:30 -0400:           Partition Scheme: GUID Partition Table
    2014-04-20 13:44:30 -0400:           1 volume will be created
    2014-04-20 13:44:30 -0400:                     Name                    : “Terra 8”
    2014-04-20 13:44:30 -0400:                     Size                    : 2 TB
    2014-04-20 13:44:30 -0400:                     File system          : Mac OS Extended (Journaled)
    2014-04-20 13:44:30 -0400: Unmounting disk
    2014-04-20 13:45:00 -0400: Creating the partition map
    2014-04-20 13:45:01 -0400: Waiting for the disks to reappear
    2014-04-20 13:45:01 -0400: Formatting disk2s2 as Mac OS Extended (Journaled) with name Terra 8
    2014-04-20 13:45:26 -0400: Initialized /dev/rdisk2s2 as a 2 TB case-insensitive HFS Plus volume with a 155648k journal
    2014-04-20 13:45:26 -0400: Mounting disk
    2014-04-20 13:45:29 -0400: Erase complete.
    2014-04-20 13:45:29 -0400:
    - That was it, gone.....

  • Is there a way to force a new session so my "on new session" code will run?

    I'm using apex.oracle.com and I find values of application (global) and page items persisting across logins.
    I didn't expect that? I thought they would go away when I logged out of APEX. But I can change the values, logout, and log back in to the same values. And when I login and start an application, it's not running my "shared components > application processes" initialization code which is set "on new session".
    I thought each login would be a distinct new session with it's distinct set of items. (see definition below)
    So when I run an application, is there a way to force a new session so my "on new session" code will run?
    >
    What Is a Session?
    A session is a logical construct that establishes persistence (or stateful behavior) across page views. Each session is assigned a unique identifier. The Application Express engine uses this identifier (or session ID) to store and retrieve an application's working set of data (or session state) before and after each page view.
    Because sessions are entirely independent of one another, any number of sessions can exist in the database at the same time. Also, because sessions persist in the database until purged by an administrator, a user can return to an old session and continue running an application long after first launching it. A user can also run multiple instances of an application simultaneously in different browser sessions.
    Sessions are logically and physically distinct from Oracle database sessions used to service page requests. A user runs an application in a single Oracle Application Express session from log in to log out with a typical duration measured in minutes or hours. Each page requested during that session results in the Application Express engine creating or reusing an Oracle database session to access database resources. Often these database sessions last just a fraction of a second.
    >
    Thanks -- Howard

    I cleaned up the copy of the Select List code in APEX 4.1.xxx which was not operating correctly before. Now it matches what I have in APEX 4.2.yyyy. And, drum roll please, the select list seemingly works fine there (4.1) as well. But now, the initialization code--which was working fine(!)--FAILS in 4.1!
    <font size="3"><font color="red">•<font face="courier new">
    Okay. Maybe this will help. 1) I logged in. Ran the login page but did not login. Opened the "session" window and wrote down the session ID. Logged out and back in. 2) Ran the login page but did not login. Opened the "session" window and .... it has the same session ID? 3) <b>So the session is persisting across logins!! How is that possible?</b>
    (More) When I log into 3 different applications, I get a different session ID for each but repeated logins always give the same session ID for any given session. </font>

  • Is there a way to force the revalidation of last visited page on start of Firefox whithout no-store directive?

    When I set Firefox to start from last visited page and this page contains response headers Cache-Control:mast-revalidate and Expires:0 (not in meta tag) the page doesn't revalidated on the start of Firefox.
    Is there a way to force the revalidation in such situation but using the cache as usual. I mean - I can't use no-store directive in Firefox (can in Opera and Chrome) since it prevents usage of cache at all (and Last Modified mechanism in particular) ?

    Thanks try67, but it isn't a required field.  As I mentioned, only about 20% of submissions will require filling it in. 
    There isn't a submit button.  Not even sure what I would do with/or how I would implement a submit button.  After processing the form, the filled out form is 'Saved As' to keep the original forms integrity intact.  The 'Saved As' file  is renamed appropriately, and then it is printed to a PDF file and attached to the appropriate customer file.

  • Is there a way to force tablet mode?

    Firefox defaults to the interface instead the tablet interface on my 9" tablet. (Not to be confused with the desktop vs. phone agent for web pages.). Is there a way to force the tablet interface without messing with custom display resolutions?

    hi raincity:
    There is no way to force the tablet user experience. Firefox for Android should detect that you are on a 7" or bigger tablet and automatically give you the tablet experience.
    Which tablet do you have (manufacturer and model number please) and what android operating system are you using (Kitkat 4.4, Android 4.3 Jelly bean, 4.2 jelly bean, 4.1 jellybean, Ice Cream Sandwich 4.0, etc).
    It might be a Firefox issue ; it could be that Firefox for some reason thinks your device is a phone rather than a tablet.
    Cheers!
    ...Roland

Maybe you are looking for