Ron McLeod

Saloon Keeper
+ Follow
since Feb 12, 2013
Ron likes ...
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
Richmond, BC, Canada
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ron McLeod

The message accompanying the exception is: stream has already been operated upon or closed

Streams can only be operated on once - you are trying to use it twice.  If you want to continue by operating on the stream returned by the filter, you could either include forEach in your pipeline:

or create a new stream object from the output of the filter:
Try without including the .class suffix:
    javap -v CountryLookupServiceImpl

javap expects classnames, not filenames (although the version of javap that I used was forgiving and didn't complain) - my fault for incorrectly putting a filename in the example.
2 days ago
What is that line for?  The client socket is returned by listener.accept()

Also, remoteHost is never initialized, so it will have a value of null, which is understood to mean the IP address of the loopback interface:;
4 days ago
Is your environment IPv4, IPv6, or dual-stack?

Can you show the code on the server side (or maybe something simpler which exhibits the same problem)?

Can you also post the stack trace for the exception?
4 days ago

Liutauras Vilda wrote:

Jan de Boer wrote:I would have a problem with halal meat being served as the only meat available. If that would happen, I would look for another job. I am not going to adapt my diet to some elses religion.

How do you physically distinct whether meat is halal or not?

.. or kosher, or maybe had been blessed by prayer
4 days ago

abed asghari wrote:

What is fill_of_database?

Joao Valencio Silva wrote:Do you have any sugestions of what should be written at line 53 in order to make the code run correctly?

Well, you can make your program run by commenting-out line 53, but that it probably not what you want.

What exactly are you trying to print to the file?  Is it the information being printed here:

tangara goh wrote:Hope someone can let me know how cos when I close the clsss with }  it still appear this message.

What is the message, and where does it appear from?
6 days ago

tangara goh wrote:I have this method in my Subject class which make use of a Enum class and I am not sure where to put the ;

Maybe I'm missing something?  Which method are you referring to, and where is the Enum?
6 days ago

murali jackson wrote:Can you please tell me how i can view the contents of a class file.

The easiest way might be to use javap  - it will show major and minor version numbers.
1 week ago

Henry Wong wrote:If you want it guaranteed, you can only do it by payload.

Could the the JMSCorrelationID header be used for this if it wasn't already being used for other purposes?
1 week ago
When you TellTheDetails, work hard on providing only those details that are relevant to the problem.

This is especially important with code. When you have a 100 line program that doesn't work as expected, very few people are going to read through all those lines to help you find the problem.

Try to find the minimal number of lines that still show your problem. If you can reduce the code you need to show to 10 lines, many more people will be willing to take a look at it. Doing so demonstrates that you were willing to ShowSomeEffort when presenting your problem.  People are more likely to help someone who cares enough not to waste their time with a lazily posted question.

This strategy will also help you to understand your problem better. It is also good practice when submitting a bug report for code that you use, so investing time into learning this practice well pays back manyfold.

Take a look at our other tips on HowToAskQuestionsOnJavaRanch.

See Also:

  • for much more detailed instructions on posting code examples.

  • 1 week ago