0

I`m trying to compile this project enter image description here

It`s not an easy question, I tried to follow a lot of tutorials but no success.

  • HI Andreas, I already tried. I need to know how to compile this without maven, etc. Theres no reason to use a dependency manager. Please, take a look on the lib folder, I use vs code, I know what Im doing, It`s still not easy to me and probably people always use a pk manager or eclipse. – Alekssandro Assis Barbosa Dec 05 '18 at 03:09
  • The Project has a Makefile and a build.sh – eckes Dec 05 '18 at 14:08

1 Answers1

0

It sounds like you need to compile your project the good old fashion way, through the command line. For that, you will need to run javac program. Looking at your folder structure and concluding the JDK folder is setup in the system path, the command line running from your project folder may look like this:

javac -cp ./lib -d ./bin -sourcepath ./src

I say "may" because I added the ./bin folder to your file structure since you need a place to put the generated class files. Keep in mind I specified your directories in a Linux file format - the forward slash. You can run javac -help for further instructions on how to compile a class/project.

Jose Henriquez
  • 356
  • 2
  • 7
  • Thank you Jose, this is the original repo https://github.com/aabarbosa/compiler, but I`m still in doubt, since this is a duplicated question, I don`t know what it is missing. – Alekssandro Assis Barbosa Dec 05 '18 at 03:48
  • It looks like the Makefile in the project is not completely correct, I would ask the author to fix it and/or document the building process. – eckes Dec 05 '18 at 14:32
  • Following on @eckes comment, take a look at your Makefile's `CUPJAR` variable - the specified `jar` file path is different from your posting file structure. – Jose Henriquez Dec 05 '18 at 19:11
  • I got to reuse code from a similar project and I'm here to solve and improve the Makefile or prererably replace with a bash script. I think I will forget the Java technology for personal projects by now. I'm not happy with the java community and it seems that they always tell you to use Eclipse. Since I didn't find good material, easy and straightforward of how to define packages to compile easily. I still think it's not a duplicated question, but you may guess it. Another point is that the build.sh is a temporary file I programmed to generate the necessary files for the compiling step. – Alekssandro Assis Barbosa Dec 06 '18 at 21:01