Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I have a project that contains 3 .java files and 1 text file. In order to ask my question I have to post all parts of the project. How do I do that?

share|improve this question

migrated from Jun 9 '11 at 19:47

This question came from our site for professional and enthusiast programmers.

copy/paste the code and any exceptions into your question. Highlight each and use the {} icon to format it all pretty. – hvgotcodes Jun 9 '11 at 19:46
You should really post only the relevant parts of the files. If you need to post the whole thing, you're asking the wrong question or on the wrong web site. – Gabe Jun 9 '11 at 19:47
keep in mind that you should use a minimal example that displays the issue you're having, not dump a huge amount of code into your question and ask something like "why doesn't this work"? – Wooble Jun 9 '11 at 19:48
GO to edit > Post each file code and then leave the rest of job of formatting to us :) – sgokhales Jun 9 '11 at 19:49
Did you make an attempt to ask, or are you just assuming there will be a problem? What exact error did you get? Was it "Oops! Your answer couldn't be submitted because: body is limited to 30000 characters; you entered 32768"? – Pops Jun 9 '11 at 19:50
You don't do that. – Won't Jun 9 '11 at 20:13

Try to reduce the code to the minimum that repeats the problem. You never know you might actually find the bug while doing this.

When you post the code make sure that it's well formatted - use the {} icon or Ctrl+K and that you are clear as to what the problem is. Explain what you've tried, what you want to happen and what's actually happening. Without this information even the smallest code sample is a bad question. With this information even large volumes of code are bearable.

However, if you've still got a lot of code you could upload it another snippet hosting site and then link to it. This does have its drawbacks though - people are less likely to click the link to see the code.

share|improve this answer
This should go verbatim to the SO FAQ as part of the "How do I ask questions here?" section. – Aleadam Jun 10 '11 at 3:47

There's a a few good steps to take. Here's what I do in this order:

  1. Most importantly, tell us what the problem is in as simple of terms as possible, as well as what you have tried to do to fix it and what effects that has had.
  2. Try to isolate the problem into as small of an example that still illustrates the problem. It would be best if it compiled so we can just drop it on our machine, compile it, and find the error. Often times, you'll find the answer while doing this anyway!
  3. Use a pastebin for particularly large files, highlighting in your post what you think might be the problem areas.

I would estimate that over half of my questions I ask on SO are solved by step 2, and I don't even need to post the question!

share|improve this answer

I would post the most important parts of the code; if reading the full content of the files help, then you can post the content of those files in a site like Pastie.

share|improve this answer

You must log in to answer this question.