Archived

This topic is now archived and is closed to further replies.

kylevision

[java] Java compiler?

Recommended Posts

PaulCesar    524
go to sun.java.com, i dont think your looking for the compiler. I would also go to eclipse.org after you get the runtimes and get their nice ide.

if you are SERIOUSLY looking for a sun compiler (which i doubt, since it would be kind of silly) i know there is an extension to compiler to java to machine code extension to GCC (gnu.org)

Share this post


Link to post
Share on other sites
misterX    144

hi kylevision!

it's your first step into java, isn't it? then, welcome!

To start, you need 2 things:
1) Download the java SDK. It includes the java runtimes, the libraries, demos... And of course a standart compiler, which compiles java files in class files, so you don't need to search anyone.
2) A good IDE makes life easier, there are many many (free) IDEs available for java, just take the one you prefer. You can take a look at this thread to get an idea.
The main ones are:
NetBeans
JCreator (good to start ;-))
Eclipse
JEdit
And the list continues... :-P

In the case it's your first approach with java,


And what sort of tutorials are precisely you searching for?
If it's about java in general, just look at sun's tutorials, they are maybe a bit boring but they are good ones.

good luck!

[edited by - misterx on August 14, 2003 6:32:04 PM]

Share this post


Link to post
Share on other sites
kylevision    122
Thanks for the links , I am starting java because thats what I will be learning in programming class during the school year, so I want to get a good head start.

Share this post


Link to post
Share on other sites
Arild Fines    968
Eclipse uses it''s own compiler, and you do have to use it, AFAIK. In Eclipse, some of the compiler code is also used by the refactoring and code browser tools.



AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.

Share this post


Link to post
Share on other sites
Kentaro    122
I'm a beginner myself and I've decided to stay away from IDE's. I believe IDE's are much more useful when you've been programming in a language for a while and you need to automate some of the basics. For small programs and playing around, I like using a text editor with line numbering and syntax highlighting for Java (like Crimson Editor). I have to compile and run everything at the command line, but I feel like I'm learning more this way. I've never taken on a project so large that I've wished I had something like an IDE.

EDIT: IDE's do a great job of helping you to manage your project and its many associated files. I think this is one of the main benefits of using an IDE. This benefit becomes more pronounced when working with tens of thousands of lines of code across almost a hundred files (which seems to happen often enough in large Java projects).

Of course, some also believe IDE's are best for beginners. A friend of mine was taking intro to CS courses in university and they gave him an IDE that they'd reworked or created or something (Dr. Java or something like that) and used that as the programming environment. My school took my approach: use a good text editor and compile/run everything at the console.

Over the centuries, mankind has tried many ways of combating the forces of evil...prayer,
fasting, good works and so on. Up until Doom, no one seemed to have thought about the
double-barrel shotgun. Eat leaden death, demon...
-- Terry Pratchett

[edited by - Kentaro on August 18, 2003 12:53:52 AM]

Share this post


Link to post
Share on other sites
Strife    374
I agree with you, actually. IDEs are great once you already know a language, but sometimes just learning how to use the IDE (that is, using all of its features, and knowing them like second nature) can be just as difficult as learning the language. I think it''s best at first to focus on the actual programming, and compile on the command line. Especially considering that when you first learn to code, your projects are usually only one or two files long, and hardly ever will you need to pass a ton of options to the command line compiler. Only when you''ve mastered a language should you move up to an IDE, since by then you''ll understand what it''s doing.

That said, though, there are some IDEs that are extremely simple to use, such as JCreator. Something like that is perfectly fine for a beginner, but I still say doing it on the command line for a while is best.

The Artist Formerly Known as CmndrM

http://chaos.webhop.org

Share this post


Link to post
Share on other sites
tortoise    122
You can''t. Java is a "managed" language. It doesn''t compile to object code. You must have the JVM and supporting library of classes that go with it, or even a "hello world" program wouldn''t run. A java compiler by itself is useless.

Share this post


Link to post
Share on other sites
Null and Void    1088
quote:
Original post by tortoise
You can''t. Java is a "managed" language. It doesn''t compile to object code. You must have the JVM and supporting library of classes that go with it, or even a "hello world" program wouldn''t run. A java compiler by itself is useless.

There''s always GCJ (the GNU Compiler Collection''s Java front end). It supports most of Java (some widget set stuff might still be missing, but overall it''s pretty complete), and can output to either bytecode or native object code. It includes an interpreter (not in any way a JIT) so that the native object code can still use bytecode type stuff. It was easy enough to install in Debian, probably only a little harder in Cygwin, but I don''t know about setting it up with an IDE and such in Windows (if that''s what you want to do...).

Share this post


Link to post
Share on other sites
tortoise    122
Well yeah, there''s lots of neat things out there. But GCJ isn''t something I''d recommend to someone just starting out in Java. I wouldn''t even recommend something like Kaffe. I''d be willing to bet GCJ is a pretty hefty download too.

Sorry kylevision, just one of the downsides to Java. I really hate the fact that my user has to download a 15 meg JRE just to play my game.

Share this post


Link to post
Share on other sites
misterX    144
quote:
Original post by kylevision
The compiler alone was 29 M, where can I get just a command line type compiler?

Downloading java 2 sdk is all you need.

Look at sun's noob tutorials, they'll surely help you out.

PS: tortoise, is it really that much!?! (which extension is so big?)


[edited by - misterx on August 20, 2003 6:00:10 AM]

Share this post


Link to post
Share on other sites
tortoise    122
quote:
Original post by misterX
Downloading java 2 sdk is all you need.



Yeah, that''s what he is complaining about. The SDK is about 40 megs. I think kyle was looking at the version that includes NetBeans, that''s around 77 megs.

quote:

PS: tortoise, is it really that much!?! (which extension is so big?)



The JRE download is about 13 megs. Yeah, it''s huge nowadays. But think about it, what functionality doesn''t the JVM provide? rt.jar alone is just over 25 megs.

Share this post


Link to post
Share on other sites
Raghar    96
quote:
Original post by kylevision
The compiler alone was 29 M, where can I get just a command line type compiler?


Actually SDK it''s not just a compiler. It''s running enviroment too, bunch of demos, profiler, debuger... In comparison to BCC 5.5 it''s somewhat wonder.

SDK is 45 MB I know it becose I''m downloading SDK right now, by dial up and without download manager. Just few hours and I''ll get it here.


I

Share this post


Link to post
Share on other sites
Raghar    96
quote:
Original post by tortoise
Well yeah, there''s lots of neat things out there. But GCJ isn''t something I''d recommend to someone just starting out in Java. I wouldn''t even recommend something like Kaffe. I''d be willing to bet GCJ is a pretty hefty download too.

Sorry kylevision, just one of the downsides to Java. I really hate the fact that my user has to download a 15 meg JRE just to play my game.


DirectX 9 is 9 to 14 MB. Offline installer of DirectX 9 is 35 MB. Sucurity update of windoze is 11 MB. If someone would like to run program on new computers he should expect some kind of update.

Share this post


Link to post
Share on other sites