User forums > Help
Winxp/GCC: Include directories question
laserbeak43:
this is probably a stupid question, but can you compile java with codeblocks? :D
raph:
--- Quote from: laserbeak43 on August 05, 2007, 04:15:19 am ---this is probably a stupid question, but can you compile java with codeblocks? :D
--- End quote ---
Yes, that is a stupid question, since c::b is not a compiler :wink:
You could use custom makefiles to invoke the java compiler. But why not use eclipse? It's perfect for java.
thomas:
It's not a stupid question, actually. Although Code::Blocks is not explicitely made for Java, you can certainly use it for that purpose. Of course, a specialised tool like Eclipse will offer much better functionality (for example code completion for the standard library classes, etc).
If you use gcj (or what is the gcc java compiler called?), then you shouldn't need to do anything at all. All gcc backends (C, C++, Ada, Fortran, Java, ...) work the same, controlled by the same frontend. This is one thing why gcc is so darn cool.
If you want to use Sun's toolchain, you'll have to write a compiler plugin specialised for that purpose. I don't think we have anything suitable at the present time. It shouldn't take but a dozen lines of code modifications in an existing compiler plugin, though.
laserbeak43:
cool, would be nice to get that working, but i'm not really sure that i could be the one to make that mod.
svaens:
Hi,
Yeah. I would also like to be able to consider code::blocks as my IDE for java also.
I had a quick try at setting it up, but code::blocks seems firmly set to c/c++.....
I think perhaps if i would give my .java files a .cpp extension, i could trick it in to compiling the thing (with the gcj compiler, which I have set up as the selected compiler via the 'Global Compiler Settings ->Toolchain executables')
However, i don't want to have to 'trick' my IDE. I just want to use it. It would be nice.
Some have said 'why not just use eclipse' if you want an IDE for java.
Well, the reason I did not want to use eclipse for Java compilation is because Java is too slow. Why else do I want to be native compiling with GCJ, if not because I did not want the penalties of going through the JRE. Eclipse uses too many resources, and I never wanted to have to use it. I did not want to compile Java into anything but 'Native' (but i am interested in using the Java language). Hence my interest in using code::blocks, as a potential non-specific code compiler. It would be nice.
Do I have to trick code::blocks to compile my o/s native java app?
If yes, well, then I think i'll go somewhere else then.
If yes BUT, in the future code::blocks will be more flexible in this, then, i'll stick around.
If 'No' (I am currently doing something wrong in the setup). Then even better. Please help me out!
Kind regards,
svaens
Navigation
[0] Message Index
[*] Previous page
Go to full version