I'm quite green to java (I program in C/C++) and I still haven't figured out how this all works together.
I'm not trying to ask for anyone to do my homework, I'm just confused about some basic java stuff. I have an assignment which wants me to create a maze. The assignment comes with some files which have been pre-implemented and theoretically works. The folder gives me some .java files and some .class files. I opened the .java files and most of them are interfaces with no real code, so I'm assuming the meat of it are in these .class files. My question is, how do I interface with these .class files? do I need to do something like import myClass; if I have a file called myClass.class?
I've tried importing the file directory which these files are contained in (through Eclipse), but it seems the .class files don't show up. I'm guessing it's being processed in the background?
Here's a link to the assignment http://www.ics.uci.edu/~goodrich/teach/ics23/LabManual/Dark/
Here's the zip file with all the .java and .class files http://www.ics.uci.edu/~goodrich/teach/ics23/LabManual/Dark/Dark.zip
Thanks in advance!
You can use a decompiler to do so. One of the most major ones is JD-GUI. JD-Core is a library that reconstructs Java source code from one or more “. class” files.
Java File class represents the files and directory pathnames in an abstract manner. This class is used for creation of files and directories, file searching, file deletion, etc. The File object represents the actual file/directory on the disk. Following is the list of constructors to create a File object. Sr.No.
A . java file contains your Java source code while a . class file contains the Java bytecode produced by the Java compiler.
The Java Runtime Environment (JRE) can execute CLASS files, but it cannot compile them since it does not include the javac binary.
To add .class files to your project in Eclipse: right-click your project, select properties --> Java Build Path --> Libraries and click on Add Class Folder button. Select the folder with the classes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With