Home » Language IDEs » Java Development Tools (JDT) » How do I change compilers so I can use javac?
How do I change compilers so I can use javac? [message #242541] |
Fri, 06 April 2007 15:59  |
Eclipse User |
|
|
|
Originally posted by: kwarner.uneedspeed.net
I want to try compiling my applet with javac instead of the JDT compiler.
I have run into a problem with MemoryImageSouce -- it flickers when
setting newPixels() -- and it shouldn't.
It's probably something I've done wrong but I can't think of anything
else to try right now and I want to see if compiling with javac
will have any effect on the problem.
So where is the place I switch to javac????
|
|
| | | | |
Re: How do I change compilers so I can use javac? [message #242565 is a reply to message #242560] |
Sun, 08 April 2007 01:57   |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"DemonDuck" <kwarner@uneedspeed.net> wrote in message
news:ev9ou8$447$1@build.eclipse.org...
> Darin,
>
> Thanks. I wrote a .bat script by hand. Found out that there is
> no difference in behavior as you suggested. Will look and learn ANT
> so next time.....
>
> Will try compiling against the 1.4 classes. It must be something
> I'm doing wrong although I've done this a hundred times with success.
>
> Such is programming....
>
> BTW: Will Eclipse 3.2.1 support Java 1.6????
Eclipse 3.2.2 is the latest released version; Eclipse 3.3 is in development.
Eclipse 3.2.2 runs on a Java 1.6 VM just fine, and the java compiler in
Eclipse 3.2.2 supports most of Java 6's language features, with a few
exceptions that you most likely don't care about. Eclipse 3.3 will fully
support all of Java 6's features. But since Java 6 contains only slight
changes from Java 5, I strongly suspect these distinctions are not relevant
to anything you're doing.
You can generate an Ant script (which will be a .xml, not a .bat) in Eclipse
with File -> Export -> General -> Ant Buildfiles. Inspecting the resulting
file will give you a bit of an introduction to Ant; to get more, you could
take a look at the online documentation for Ant, or you could purchase the
O'Reilly book. Ant resembles other make systems in that an Ant script
describes a set of dependencies and actions: "file B depends on file A, and
if it is out of date, perform action X."
Eclipse does not use Ant internally, but essentially everything that Eclipse
does during a build can be represented in terms of actions driven by Ant
dependencies. In particular, java compilation within Eclipse does not use
the javac compiler, but the Eclipse java compiler does an exceptionally good
job of behaving very very much like the javac compiler does (and when it
doesn't, we try hard to fix whichever one is wrong). As Darin says,
regardless of compiler, the same libraries are used; for most UI code,
therefore, the compiler makes no difference whatsoever, in the same sense
that a Porsche in a traffic jam goes no faster than a Geo Metro.
|
|
|
Re: How do I change compilers so I can use javac? [message #242570 is a reply to message #242565] |
Sun, 08 April 2007 02:29   |
Eclipse User |
|
|
|
Originally posted by: kwarner.uneedspeed.net
Very helpful information. I've written a lot of
Makefiles in the old UNIX days. ANT probably won't
be all that hard to figure out. A dependency by
any other name (or syntax) etc....
I'm totally boggled by what I'm seeing with
MemoryImageSource. I find no reported bugs in
SUN's bugbase that is similar. I know it will be a
forehead slapper when I find it.
Thanks for the help.
Walter Harley wrote:
> "DemonDuck" <kwarner@uneedspeed.net> wrote in message
> news:ev9ou8$447$1@build.eclipse.org...
>
>>Darin,
>>
>>Thanks. I wrote a .bat script by hand. Found out that there is
>>no difference in behavior as you suggested. Will look and learn ANT
>>so next time.....
>>
>>Will try compiling against the 1.4 classes. It must be something
>>I'm doing wrong although I've done this a hundred times with success.
>>
>>Such is programming....
>>
>>BTW: Will Eclipse 3.2.1 support Java 1.6????
>
>
>
> Eclipse 3.2.2 is the latest released version; Eclipse 3.3 is in development.
> Eclipse 3.2.2 runs on a Java 1.6 VM just fine, and the java compiler in
> Eclipse 3.2.2 supports most of Java 6's language features, with a few
> exceptions that you most likely don't care about. Eclipse 3.3 will fully
> support all of Java 6's features. But since Java 6 contains only slight
> changes from Java 5, I strongly suspect these distinctions are not relevant
> to anything you're doing.
>
> You can generate an Ant script (which will be a .xml, not a .bat) in Eclipse
> with File -> Export -> General -> Ant Buildfiles. Inspecting the resulting
> file will give you a bit of an introduction to Ant; to get more, you could
> take a look at the online documentation for Ant, or you could purchase the
> O'Reilly book. Ant resembles other make systems in that an Ant script
> describes a set of dependencies and actions: "file B depends on file A, and
> if it is out of date, perform action X."
>
> Eclipse does not use Ant internally, but essentially everything that Eclipse
> does during a build can be represented in terms of actions driven by Ant
> dependencies. In particular, java compilation within Eclipse does not use
> the javac compiler, but the Eclipse java compiler does an exceptionally good
> job of behaving very very much like the javac compiler does (and when it
> doesn't, we try hard to fix whichever one is wrong). As Darin says,
> regardless of compiler, the same libraries are used; for most UI code,
> therefore, the compiler makes no difference whatsoever, in the same sense
> that a Porsche in a traffic jam goes no faster than a Geo Metro.
>
>
|
|
|
Re: How do I change compilers so I can use javac? -- it is a forehead slapper... [message #242575 is a reply to message #242570] |
Sun, 08 April 2007 03:08  |
Eclipse User |
|
|
|
Originally posted by: kwarner.uneedspeed.net
Found my problem.
Either I forgot that update(Graphics g) clears the Canvas first
or I never knew it or I have been using Swing too much.
From Canvas:
public void update(Graphics g) {
g.clearRect(0, 0, width, height);
paint(g);
}
So I forgot to override it in my applet. ARRGGHHH...
In my applet:
public void update(Graphics g) {
paint(g);
}
DemonDuck wrote:
> Very helpful information. I've written a lot of
> Makefiles in the old UNIX days. ANT probably won't
> be all that hard to figure out. A dependency by any other name (or
> syntax) etc....
>
> I'm totally boggled by what I'm seeing with
> MemoryImageSource. I find no reported bugs in
> SUN's bugbase that is similar. I know it will be a
> forehead slapper when I find it.
>
> Thanks for the help.
>
> Walter Harley wrote:
>
>> "DemonDuck" <kwarner@uneedspeed.net> wrote in message
>> news:ev9ou8$447$1@build.eclipse.org...
>>
>>> Darin,
>>>
>>> Thanks. I wrote a .bat script by hand. Found out that there is
>>> no difference in behavior as you suggested. Will look and learn ANT
>>> so next time.....
>>>
>>> Will try compiling against the 1.4 classes. It must be something
>>> I'm doing wrong although I've done this a hundred times with success.
>>>
>>> Such is programming....
>>>
>>> BTW: Will Eclipse 3.2.1 support Java 1.6????
>>
>>
>>
>>
>> Eclipse 3.2.2 is the latest released version; Eclipse 3.3 is in
>> development. Eclipse 3.2.2 runs on a Java 1.6 VM just fine, and the
>> java compiler in Eclipse 3.2.2 supports most of Java 6's language
>> features, with a few exceptions that you most likely don't care
>> about. Eclipse 3.3 will fully support all of Java 6's features. But
>> since Java 6 contains only slight changes from Java 5, I strongly
>> suspect these distinctions are not relevant to anything you're doing.
>>
>> You can generate an Ant script (which will be a .xml, not a .bat) in
>> Eclipse with File -> Export -> General -> Ant Buildfiles. Inspecting
>> the resulting file will give you a bit of an introduction to Ant; to
>> get more, you could take a look at the online documentation for Ant,
>> or you could purchase the O'Reilly book. Ant resembles other make
>> systems in that an Ant script describes a set of dependencies and
>> actions: "file B depends on file A, and if it is out of date, perform
>> action X."
>>
>> Eclipse does not use Ant internally, but essentially everything that
>> Eclipse does during a build can be represented in terms of actions
>> driven by Ant dependencies. In particular, java compilation within
>> Eclipse does not use the javac compiler, but the Eclipse java compiler
>> does an exceptionally good job of behaving very very much like the
>> javac compiler does (and when it doesn't, we try hard to fix whichever
>> one is wrong). As Darin says, regardless of compiler, the same
>> libraries are used; for most UI code, therefore, the compiler makes no
>> difference whatsoever, in the same sense that a Porsche in a traffic
>> jam goes no faster than a Geo Metro.
>>
|
|
|
Goto Forum:
Current Time: Sun Jul 13 15:00:19 EDT 2025
Powered by FUDForum. Page generated in 0.05790 seconds
|