This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: now i'm a little confused
- To: "knoxos (axel)" <reportbug at gmx dot net>
- Subject: Re: now i'm a little confused
- From: Jeff Sturm <jsturm at detroit dot appnet dot com>
- Date: Sat, 19 Aug 2000 13:54:04 -0400
- CC: java-discuss at sources dot redhat dot com
- Organization: AppNet Inc.
- References: <8878.966668801@www1.gmx.net>
- Reply-To: jeff dot sturm at appnet dot com
"knoxos (axel)" wrote:
> Mingw... umm, what's that? never heared of....
<uri:http://www.mingw.org/> is a minimal toolchain for building win32
applications. It includes gcc & make, binutils, gdb, and a set of import libs
and headers for win32.
Cygwin is actually based on an outdated Mingw, and you can build win32 apps from
Cygwin by compiling with the -mno-cygwin flag.
> I didn't really see anything about that on the libgcj for wincyg:
On his site, Jon recommends Cygwin for building gcj apps. That may be good
advice if you need the shell for your builds (e.g. for autoconf support).
Otherwise, use Mingw, it has more complete win32 support, and (most important)
thread-safe exception handling (i.e. --with-threads=win32).
The compilers bundled with Cygwin don't have thread support (last I checked, at
least). You don't want those for gcj work. Since Mingw may not include a gcj
compiler, you will probably want to build your own. However Mingw cannot host a
compiler build, since it is not a posix environment. You can cross compile from
Cygwin or any posix-like OS, such as Linux. I personally find the latter
easier.
> Cross compiling? Well I have a dual boot (suse linux) ....
> I can use the normal libgcj in linux to create windows executables?
No, but you can use the win32 libgcj with a Linux-hosted cross compiler. There
are instructions and scripts available to help you build a win32 toolchain on
Linux. This will be easier if you have two machines available, so you don't
have to reboot to test your executables. Otherwise, Cygwin might be better for
you.
> To the speed stuff, I just want to reach hotspot performance itself,
> shooting over it would be nice of course but not necassary....
> (One thing is that some people want to port everything of the project to
> c++, however i don't like this thought. I want to push more to use maybe some
> native routines in speed critical stuff, and use a native compiler for the
> rest...)
Hotspot represents years of effort at improving Java performance. It is much
more than a JIT, it has generational garbage collection and fast
synchronization, among other things. Don't count on a native compiler to give
you the same level of performance. In particular gcj/libgcj is not yet as
mature as Hotspot.
Writing parts of your app in C++ just might give you the best results. You
won't know until you have some profiling data. Keep in mind the 80/20 rule.
Rewriting that other 80% or so of your code in most cases isn't going to gain
you much.
If you do choose a Java/C++ hybrid you might find gcj very useful... CNI is
simpler, easier and faster than JNI.
--
Jeff Sturm
jeff.sturm@appnet.com