2

I need to turn in the .class file of a class from Eclipse. I managed to turn in the .java version of the file by clicking and dragging it into my browser, but I'm not sure where to find a .class file. I've read that I can find it in the "bin" but I have no idea where this is.

Thanks for all the help!

River
  • 8,585
  • 14
  • 54
  • 67
  • 2
    try this http://stackoverflow.com/questions/6780182/eclipse-show-generated-class-files – Piyush Gupta Feb 08 '16 at 04:03
  • Use File Search feature to get quick response. See my Answer. – mmuzahid Feb 08 '16 at 04:43
  • 3
    Greetings Avocado, welcome to the stack. Don't forget to mark with the green check mark your accepted answer as seen here in [the tour](http://stackoverflow.com/tour). It reinforces the answerers, alerts people, you gain rep, and other useful things. Thanks! – Drew Feb 08 '16 at 04:59

2 Answers2

3

Generally, Eclipse projects have the following file system:

Proj/
   .classpath
   .project
   src/
      Foo.java
   bin/
      Foo.class

So, navigate to the Project folder, go to bin, and your classes should be right there.

If you are on a mac:

If you are in your project in the command line (you have done cd project) You can do

cd bin
open .

And your class files should show up in a place that you can drag them into a browser. I don't understand why you need to submit .class files, as they are generated when the code is compiled.

intboolstring
  • 6,891
  • 5
  • 30
  • 44
0

Ctrl + Shift + T

will list down all the files including .class files in all of your projects in the workspace.

Jude Niroshan
  • 4,280
  • 8
  • 40
  • 62