+ 1

How can I get CodeBlocks to compile Java?

I used Eclipse far, but I don't like it. I thought I could develop Java programs using CodeBlocks. But now I have problem with compiling Java programs on CodeBlocks. (Compiling C and C++ programs worked fine.) How can I use CodeBlocks to compile Java? Do I need to install something? (I already have Java installed.) I can run Java programs on Eclipse with no problems.

1st Oct 2019, 2:59 PM
Seb TheS
Seb TheS - avatar
10 Answers
1st Oct 2019, 6:03 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 3
Net beans is the best ide for java
2nd Oct 2019, 9:18 PM
ELI TSATSU
ELI TSATSU - avatar
0
i found interesting thread here https://stackoverflow.com/questions/22059855/configure-launch-command-in-codeblocks so you actually able to launch a bat file using codeblock. so maybe you can create a batch file to compile your java file, then call them from codeblock
1st Oct 2019, 3:37 PM
Taste
Taste - avatar
0
yeah, because its not mainly design for another language. but if i compare codeblock with java IDE (i never use blueJ) codeblock is much more lighter. but i personally stick with more general yet extensible text editor than using IDE though
1st Oct 2019, 3:53 PM
Taste
Taste - avatar
0
Are you sure that CodeBlocks wouldn't compile Java normally?
1st Oct 2019, 6:04 PM
Seb TheS
Seb TheS - avatar
0
Netbeans is even worse, Netbeans and Eclipse both always prepare me 1000 debugging tools that I never use, during the launch. I'd only want an IDE that can compile or run my codes, without those 1000 unused debugging tools. 🤷‍♂️
1st Oct 2019, 6:14 PM
Seb TheS
Seb TheS - avatar
0
since what codeblock do in my previous answer is executing a batch script, i dont think it'll mess up anything. please note i never tested it. btw why not just stay with text editor ? i mean even notepad++ are able compile and run with a shortcut.
1st Oct 2019, 6:15 PM
Taste
Taste - avatar
0
you cannot compile a Java program in Code Blocks however syntax highlighting might still work during editing
2nd Oct 2019, 1:28 PM
Aditya
Aditya - avatar