comp.lang.ada
 help / color / mirror / Atom feed
From: Steffen Huber <spam@huber-net.de>
Subject: Re: jgnat -
Date: Wed, 17 Mar 2010 00:01:42 +0100
Date: 2010-03-17T00:01:42+01:00	[thread overview]
Message-ID: <80agumFaotU1@mid.individual.net> (raw)
In-Reply-To: <cc0f1075-665d-4519-bd65-e4038dec802c@q23g2000yqd.googlegroups.com>

RasikaSrinivasan@gmail.com write:
> All
> 
> Looking for ideas. I am experimenting with Jgnat - ada targeting the
> jre. The goal is to experiment with GUI using Java Swing/Awt from Ada.
> Also will be trying to access some libraries developed in java.

I downloaded GNAT GPL 2009 a few days ago and started to experiment
a bit. Basically, it is (nearly) a nightmare. Don't try to use GPS
for anything. It is (IMHO) an unstable pile of crap with a horrible
UI. Don't try to make Eclipse work with GNATbench and jvm-gnat and
expect easy integration into other Eclipse Java stuff.

I think it is a real shame that no completely integrated package
is available for this certainly interesting technology. It is no
wonder that most people just use another language.

> Looking for some ideas on how to organize such a project:
> 
> - First for the entire JRE - I am not sure if I will need bindings to
> the entire library - probably only the high level interfaces. Should I
> plan on generating bindings for all of JRE and genering an ali for
> them?

Just follow the docs. Create the ads files for the whole Java runtime.
When you compile your first Ada program using Swing, it is likely that
you encounter a compile error somehwere in java.net.xxx because of a
duplicate symbol (at least when you use the Java 1.6.0_1x runtime),
but this is easily fixed.

Here is a complete example which just opens a Swing JFrame from
Ada:

with java; use java;
with javax.swing; use javax.swing;
with javax.swing.JFrame; use javax.swing.JFrame;
with java.lang; use java.lang;
with java.lang.String; use java.lang.String;

procedure SimpleFrame is
   frame : JFrame.Ref := null;
begin
   frame := JFrame.New_JFrame;
   frame.setTitle(+"Hello World - a Swing Frame from Ada!");
   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   frame.pack;
   frame.setSize(320,200);
   frame.setVisible(true);
end SimpleFrame;


Steffen

-- 
Steffen Huber
hubersn Software - http://www.hubersn-software.com/



  reply	other threads:[~2010-03-16 23:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 18:55 jgnat - RasikaSrinivasan@gmail.com
2010-03-16 23:01 ` Steffen Huber [this message]
2010-03-17  7:17   ` Albrecht Käfer
2010-03-17 18:52     ` Rob Veenker
2010-03-18  8:58       ` Albrecht Käfer
2010-03-17 15:13   ` Gautier write-only
2010-03-17 16:45     ` Steffen Huber
2010-03-17 15:24 ` Gautier write-only
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox