My first compiler .

K

Ken Kafieh

I am not new to programming. But I am new to Java. I am not anticipating a
lot of trouble learning it.

I want to start off by using a good compiler that is in fairly common use.
I dont want to end up having learned a finge, experimental, rarely used, or
beta compiler!
It would be nice if I could just find something that could be considered a
good reliable, "industry standard" compiler.
It doesn't need to be state of the art, but I dont exactly want to be
working with stone knives and tools either.

A few of the programs I will be writing are going to be very CPU intensive,
so I prefer a native compiler (for windows) rather than a byte code
compiler. I figure that a native EXE would run faster than a byte code
running on a VM. But I am willing to settle for a byte code compiler if
there is no consensus on a native compiler.

A free compiler is obviously my first choice. But if I absolutely must
purchase the compiler then I would definately want to get one with a Free 30
day trial first, before I purchase it. And naturally, if there are
compilers that anyone would recommend that have no free trial, but for which
there is a crack, or serial number, then that's just as good as a free trial
in my view.

Thanks a lot for your help in advance!

-Ken
 
M

Matt Parker

Ken said:
I am not new to programming. But I am new to Java. I am not anticipating
a lot of trouble learning it.

I want to start off by using a good compiler that is in fairly common use.
I dont want to end up having learned a finge, experimental, rarely used,
or beta compiler!
It would be nice if I could just find something that could be considered a
good reliable, "industry standard" compiler.
It doesn't need to be state of the art, but I dont exactly want to be
working with stone knives and tools either.

A few of the programs I will be writing are going to be very CPU
intensive, so I prefer a native compiler (for windows) rather than a byte
code
compiler. I figure that a native EXE would run faster than a byte code
running on a VM. But I am willing to settle for a byte code compiler if
there is no consensus on a native compiler.

This is not true. With the latest JIT optimisation techniques, Java is as
fast as native C in benchmarks, provided you discount the start-up time.
All the native compilers can also be classed as "experimental" and "fringe"
so you may as well go with the latest Sun or IBM compiler (personally I
prefer the Sun one).

Matt
 
M

Murray

Ken Kafieh said:
I am not new to programming. But I am new to Java. I am not anticipating a
lot of trouble learning it.

I want to start off by using a good compiler that is in fairly common use.
I dont want to end up having learned a finge, experimental, rarely used, or
beta compiler!
It would be nice if I could just find something that could be considered a
good reliable, "industry standard" compiler.
It doesn't need to be state of the art, but I dont exactly want to be
working with stone knives and tools either.

A few of the programs I will be writing are going to be very CPU intensive,
so I prefer a native compiler (for windows) rather than a byte code
compiler. I figure that a native EXE would run faster than a byte code
running on a VM. But I am willing to settle for a byte code compiler if
there is no consensus on a native compiler.

A free compiler is obviously my first choice. But if I absolutely must
purchase the compiler then I would definately want to get one with a Free 30
day trial first, before I purchase it. And naturally, if there are
compilers that anyone would recommend that have no free trial, but for which
there is a crack, or serial number, then that's just as good as a free trial
in my view.

Thanks a lot for your help in advance!

-Ken

Have you installed the Java SDK?
http://java.sun.com/j2se/1.4.2/download.html

/bin/javac is the standard bytecode compiler. You may also want to try Jikes
http://www-124.ibm.com/developerworks/oss/jikes/

As for native compilers, this concept tends to go against the grain of what
Java is all about, i.e. platform independence. But if you really want to go
that way, there are native compilers available but some are costly and
others don't support the full API. While it is true that these can provide
faster-running code, this is not always the case, and improvements are often
minimal (depending on the code obviously). JIT compilers can make
CPU-specific optimisations at run-time which could theoretically allow
faster execution than natively compiled code. Unless you REALLY need a
supercharged high performance program, you'd be better off staying away from
native compilers, especially when you're learning. Actually you'd probably
be better off sticking with C :)

http://gcc.gnu.org/java
http://www.kaffe.org/
http://www.geocities.com/marcoschmidt.geo/java-native-compilers.html
 
R

Roedy Green

It would be nice if I could just find something that could be considered a
good reliable, "industry standard" compiler.
It doesn't need to be state of the art, but I dont exactly want to be
working with stone knives and tools either.

There are two main choices IBM Jikes and Sun Javac.

See http://mindprod.com/jgloss/jikes.html
http://mindprod.com/jgloss/javac.html

for others see http://mindprod.com/jgloss/compiler.html


Jikes is a bit out of date, but it is faster and gives better error
messages for newbies.

You might want an IDE -- a editor-debugger-call the compiler do
everything but eat. I don't use one. See
http://mindprod.com/jgloss/ide.html

For speed you can natively compile apps. Jet is free for personal use.

See http://mindprod.com/jgloss/jet.html
for other possibilities see
http://mindprod.com/jgloss/nativecompiler.html
 
R

Roedy Green

A few of the programs I will be writing are going to be very CPU intensive,
so I prefer a native compiler (for windows) rather than a byte code
compiler. I figure that a native EXE would run faster than a byte code
running on a VM. But I am willing to settle for a byte code compiler if
there is no consensus on a native compiler.

hotspot dynamically compiles to native code, and optimises on the fly
depending on what it notices you are doing. This gives it some
advantages over static compilation. Try that first.

For debugging, it is much faster than native compilation. And native
compilers use Javac class file output as their input.
 
?

=?ISO-8859-1?Q?Daniel_Sj=F6blom?=

Roedy said:
There are two main choices IBM Jikes and Sun Javac.

See http://mindprod.com/jgloss/jikes.html
http://mindprod.com/jgloss/javac.html

for others see http://mindprod.com/jgloss/compiler.html


Jikes is a bit out of date, but it is faster and gives better error
messages for newbies.

I'd also like to add the Eclipse compiler to that list. I don't think
you can get it separately from the IDE, but it is one of the nicest java
bytecode compilers, with a host of lint like features.
 
S

Steve Burrus

Daniel said:
I'd also like to add the Eclipse compiler to that list. I don't think
you can get it separately from the IDE, but it is one of the nicest java
bytecode compilers, with a host of lint like features.

Roedy, you mentioned the "Jikes" compiler from IBM. Can you please tell
me how to properly configure it so I can then get it going with some
compilation of some source code??
 
R

Roedy Green

Roedy, you mentioned the "Jikes" compiler from IBM. Can you please tell
me how to properly configure it so I can then get it going with some
compilation of some source code??

Nothing to it. Just put it on the path somewhere and set up a
JIKESPATH like classpath but that includes rt.jar from the JDK you
want to use.

for details see http://mindprod.com/jgloss/jikes.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top