Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way or tool to transform IntelliJ IDEA project to Makefile project?

I have classic IntelliJ IDEA project (no maven or gradle). I want to transform this project to Makefile project.

For example, I have console application without some frameworks. This application consists of Main.java, Class1.java and Class2.java. The source files are in src/com/site/ folder.

I want to write make in terminal and get Main.jar. Of course, I don't want to create Makefile manually.

like image 626
Max Avatar asked Dec 09 '25 21:12

Max


1 Answers

I did not find any solution. Therefore, I use this snippet:

someproject -p out
javac src/com/example/*.java -d out/
cd out/ && jar cfe someproject.jar com.example.Main  com/example/*.class && mv someproject.jar ../ && cd .. 
echo "#!/bin/bash" > someproject
echo 'java -jar $${BASH_SOURCE[0]}.jar' >> someproject
chmod a+x someproject
like image 170
Max Avatar answered Dec 11 '25 10:12

Max



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!