RE: [Java-gnome-developer] Obsolete Hello World example
Brought to you by:
afcowie
From: Jeffrey M. <Jef...@Br...> - 2003-11-18 11:43:22
|
The second one the you are including is from a very old version of java-gnome. The first one you list is current. There was an API change from 0.7.1 to 0.8 and you must be running version 0.7.1 or earlier. As you will see from the tutorial online it clearly states it is for version 0.8. I suggest you upgrade to the latest version of java-gnome. -Jeff > This is on the metioned URL: > > // First we import the libraries used by this example > import org.gnu.gnome.App; > import org.gnu.gnome.Program; > import org.gnu.gtk.Gtk; > > public class First { > > public static void main(String[] args) { > // Initialization > Program.initGnomeUI("First", "0.1", args); > > App app = new App("First", "First App"); > app.show(); > > Gtk.main(); > } > } > > This is /usr/share/java-gtk/examples/tutorial/First.java > > import gnu.gtk.*; > import gnu.gnome.*; > > public class First { > public static void main(String[] args) { > // Initialization > Gnome.init("First", "0.1", args.length, args); > > GnomeApp app = new GnomeApp("First", "First App"); > app.setPolicy(false, true, false); > app.setWmclass("First", "FirstApp"); > app.show(); > > Gtk.main(); > } > } > > The first one does not work, the second one does. I think the > second one > should replace the first one on the website. See App vs. > GnomeApp and so > on... > > Nepto > > On Fri, 14 Nov 2003, Jeffrey Morgan wrote: > > > I am not completely sure I understand what you are > > saying. The example compiles and runs fine. You > > can give it a try. It is located in src/examples/tutorial. > > > > -Jeff > > > > > http://java-gnome.sourceforge.net/docs/GNOME-tutorial/c28.html > > > > > > Written Hello World example is obsolete. It is not a bad idea > > > from time > > > to time update the documentation. It is really a shame. > > > > > > -- > > > _/| Ondrej Jombik - ne...@ph... - http://nepto.sk - ICQ > > > #122428216 > > > <_ \ Platon SDG - open source software development - > > http://platon.sk > > `\| UNIX is user friendly. It's selective about who its > friends are! > > '` > > > > > > ------------------------------------------------------- > > This SF. Net email is sponsored by: GoToMyPC > > GoToMyPC is the fast, easy and secure way to access your > computer from > > any Web browser or wireless device. Click here to Try it Free! > > > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/ g22lp.tmpl > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer > > -- Maxim, 11:08:31 18. november 2003 (utorok) -- _/| Ondrej Jombik - ne...@ph... - http://nepto.sk - ICQ #122428216 <_ \ Platon SDG - open source software development - http://platon.sk `\| Nech operacia X na mnozine G tvori grupu, potom plati... rundu! '` |