Thread: [Java-gnome-developer] naming and distribution issues
Brought to you by:
afcowie
From: R. A. R. D. <riv...@ya...> - 2003-11-15 10:24:30
|
Hello. I'm very new to the project. In fact I'm still in the middle of the tutorial. I'm also a recent convert from Windows. I have used Linux from time to time but now I want to get more involved with it. I have experience developping applications in Java using Swing as the UI, but I think GNOME integration is the best option if I want to develop applications in Java that can be accepted by the Linux community, so that's the main reason why I'm joining this project. I'll say here what I have installed, maybe this helps to explain the rest of this mail. Arch: Athlon OS: RedHat Fedora Core 1 Java: Sun J2SDK 1.4.2_02 I want to comment with the rest of the people things that maybe you see as less important, but I think can help to start: 1. path of the files installed. Currently the libs are generated in /usr/local/lib. Why it's not installed in /usr/lib? I know I can change it with an argument to configure, but isn't /usr/lib more standard? At least I don't have to export LD_LIBRARY_PATH. Also the jars are installed in /usr/local/share/java-gnome. I don't know any standard folder for jars, but gcj installs it's jar in /usr/share/java. Maybe it's a more logical path. 2. names of libraries Current lib names are libGNOMEJava, libGTKJava and libGladeJava. Looking at system libraries naming conventions, specially: libgnome, libgnome-desktop, libgtk or libglade-gnome I think should be better to name them libgnome-java, libgtk-java, libglade-java and can continue with libgnomeprint-java, libgtkhtml-java and hopefully much much more libs :-). Currently names don't look like the mayority of the installed libs. 3. distribution format I think having rpms and other distribution formats, basically for binary distribution, can help finding testers. For example, when I see an RPM my first felling is: if anything goes wrong, at least I know an easy way to uninstall all this. I know that an install method is included in the current distribution format, but think in new people who want to find the easy way to begin using the libs. Also I prefer to download one RPM for binaries and one for sources and documentation. to have things more organized. In fact if someone gives me the specs files I can try to build the rpms for new versions, I don't know jet how to create rpms. It's in my list, but not near top. Also I have found some things in the tutorial that I want to comment, but I think it's better to talk about the tutorial in other mail, when I finnish reading it. Hope this helps to make this lib a little little better. regards, Rivas. __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |
From: Mark H. <mh...@ca...> - 2003-11-15 11:01:10
|
Hello, Thanks for trying java-gnome. Hoe you like it. On Sat, Nov 15, 2003 at 02:24:30AM -0800, R. A. Rivas Diaz wrote: > 1. path of the files installed. > Currently the libs are generated in /usr/local/lib. Why it's not > installed in /usr/lib? /usr/lib is for files installed by the distribution you are using. /usr/local is for things you installed separately. It is part of the FHS, I think. In Debian java policy, java-gnome libs are placed in /usr/lib/jni/ > Also the jars are installed in /usr/local/share/java-gnome. I don't > know any standard folder for jars, but gcj installs it's jar in > /usr/share/java. Maybe it's a more logical path. Again, I think the chosen directory is the best. > 3. distribution format > I think having rpms and other distribution formats, basically for > binary distribution, can help finding testers. For example, when I see Java-gnome is available in the main Debian distribution. rpms are available and will be on the main java-gnome website (or at least linked from there) very soon. > Also I have found some things in the tutorial that I want to comment, > but I think it's better to talk about the tutorial in other mail, when > I finnish reading it. Looking forward to hearing your comments. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Elias M. <el...@al...> - 2003-11-15 13:50:45
|
l=C3=B6r 2003-11-15 klockan 11.57 skrev Mark Howard: > > Also the jars are installed in /usr/local/share/java-gnome. I don't > > know any standard folder for jars, but gcj installs it's jar in > > /usr/share/java. Maybe it's a more logical path. > Again, I think the chosen directory is the best.=20 If the Java packages were standardised in any way, the logical place to put them would be $JAVA_HOME/jre/lib/ext I'm hoping that these things will be standardised some time in the future. Elias |
From: R. A. R. D. <riv...@ya...> - 2003-11-15 20:40:17
|
--- Mark Howard <mh...@ca...> wrote: > Hello, > Thanks for trying java-gnome. Hoe you like it. > > On Sat, Nov 15, 2003 at 02:24:30AM -0800, R. A. Rivas Diaz wrote: > > 1. path of the files installed. > > Currently the libs are generated in /usr/local/lib. Why it's not > > installed in /usr/lib? > /usr/lib is for files installed by the distribution you are using. > /usr/local is for things you installed separately. It is part of the > FHS, I think. > In Debian java policy, java-gnome libs are placed in /usr/lib/jni/ > I don't like this libraries be treated as "diferent" things. I really prefer them to be on the same folder as the others, but obviously thats only my preference. I can live with that if this folder is searched by default. > > Also the jars are installed in /usr/local/share/java-gnome. I don't > > know any standard folder for jars, but gcj installs it's jar in > > /usr/share/java. Maybe it's a more logical path. > Again, I think the chosen directory is the best. > My point for proposing a centralized folder, is that this jars are like system libraries, not jars usable for only one application. If they where only used for a "java-gnome" application, for me is logical that place. Maybe is OK to put them on a specific place while there is no standard, but I think that "system" jars should be on a unique folder, like libs are on a unique folder. Maybe I should propose /usr/jar or /usr/local/jar instead of /usr/lib/java. > > > 3. distribution format > > I think having rpms and other distribution formats, basically for > > binary distribution, can help finding testers. For example, when I > see > Java-gnome is available in the main Debian distribution. rpms are > available and will be on the main java-gnome website (or at least > linked > from there) very soon. > OK And what about the names for the libraries? rivas __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |
From: Luca De R. <pie...@li...> - 2003-11-15 21:39:32
|
Il sab, 2003-11-15 alle 21:40, R. A. Rivas Diaz ha scritto: > --- Mark Howard <mh...@ca...> wrote: > > Hello, > > Thanks for trying java-gnome. Hoe you like it. > > > > On Sat, Nov 15, 2003 at 02:24:30AM -0800, R. A. Rivas Diaz wrote: > > > 1. path of the files installed. > > > Currently the libs are generated in /usr/local/lib. Why it's not > > > installed in /usr/lib? > > /usr/lib is for files installed by the distribution you are using. > > /usr/local is for things you installed separately. It is part of the > > FHS, I think. > > In Debian java policy, java-gnome libs are placed in /usr/lib/jni/ > > > I don't like this libraries be treated as "diferent" things. I really > prefer them to be on the same folder as the others, but obviously thats > only my preference. I can live with that if this folder is searched by > default. > > > > Also the jars are installed in /usr/local/share/java-gnome. I don't > > > know any standard folder for jars, but gcj installs it's jar in > > > /usr/share/java. Maybe it's a more logical path. > > Again, I think the chosen directory is the best. > > > My point for proposing a centralized folder, is that this jars are like > system libraries, not jars usable for only one application. If they > where only used for a "java-gnome" application, for me is logical that > place. > Maybe is OK to put them on a specific place while there is no standard, > but I think that "system" jars should be on a unique folder, like libs > are on a unique folder. > Maybe I should propose /usr/jar or /usr/local/jar instead of > /usr/lib/java. Again, why should jars be treated like something special? I think $DATADIR/java-gnome it' the right place. The only one that worths consideration is $DATADIR/java as other libraries, e.g. ant, install jars there. > > > > > > 3. distribution format > > > I think having rpms and other distribution formats, basically for > > > binary distribution, can help finding testers. For example, when I > > see > > Java-gnome is available in the main Debian distribution. rpms are > > available and will be on the main java-gnome website (or at least > > linked > > from there) very soon. > > > OK > And what about the names for the libraries? Now we have: /usr/lib/libGNOMEJAR.so /usr/lib/libGNOMEJar.so.0.8.1 /usr/lib/libGNOMEJava.so /usr/lib/libGNOMEJava.so.0.8.1 /usr/lib/libGTKJAR.so /usr/lib/libGTKJar.so.0.8.1 /usr/lib/libGTKJava.so /usr/lib/libGTKJava.so.0.8.1 /usr/lib/libGladeJAR.so /usr/lib/libGladeJar.so.0.8.1 /usr/lib/libGladeJava.so /usr/lib/libGladeJava.so.0.8.1 Why do we have JAR in capitals? I vote to put all the names like: libGnomeJava, libGnomeJar, libGtkJava, libGtkJar, libGladeJava, libGladeJar so we'll avoid all this caps confusion. Also it doesn't seem correct to me to have libGNOMEJava while on the other hand libGladeJava. Don't you see this as a discrepancy? Ciao, Luca. -- Luca De Rugeriis <pie...@li...> |
From: Luca De R. <pie...@li...> - 2003-11-15 21:21:14
|
Il sab, 2003-11-15 alle 11:57, Mark Howard ha scritto: > /usr/lib is for files installed by the distribution you are using. > /usr/local is for things you installed separately. It is part of the > FHS, I think. > In Debian java policy, java-gnome libs are placed in /usr/lib/jni/ Right, for FHS prefix is /usr/local, however Redhat based distributions use /usr. (others use something else...) On Redhat I like to package everything and put in /usr, I don't like have a separated /usr/local tree. However is very legitimate to default to /usr/local for java-gnome installation as many other source packages do. If you want to change prefix it's as simple as passing --prefix=<your prefix here> to ./configure. > > Also the jars are installed in /usr/local/share/java-gnome. I don't > > know any standard folder for jars, but gcj installs it's jar in > > /usr/share/java. Maybe it's a more logical path. > Again, I think the chosen directory is the best. Me too, but /usr/share/java maybe considered as the default directory for jars to conform e.g. ant installation. However I don't understand why jars needs a separated directory. > > 3. distribution format > > I think having rpms and other distribution formats, basically for > > binary distribution, can help finding testers. For example, when I see > Java-gnome is available in the main Debian distribution. rpms are > available and will be on the main java-gnome website (or at least linked > from there) very soon. Jeffrey, are you awaiting the rpms from me ? As I said in the previous "rpms" thread I would like to know some particulars. I'll repeat it here: Let me know if you want them recompiled for a given arch and which package you want (and if it's better I'll send them privately). They are: java-gnome-debuginfo-0.8.1-8.i686.rpm java-gnome-javadoc-0.8.1-8.i686.rpm java-gnome-0.8.1-8.i686.rpm java-gnome-devel-0.8.1-8.i686.rpm java-gnome-0.8.1-8.src.rpm -- Luca De Rugeriis <pie...@li...> |
From: Elias M. <el...@al...> - 2003-11-15 23:59:51
|
l=C3=B6r 2003-11-15 klockan 22.19 skrev Luca De Rugeriis: > Il sab, 2003-11-15 alle 11:57, Mark Howard ha scritto: > > /usr/lib is for files installed by the distribution you are using. > > /usr/local is for things you installed separately. It is part of the > > FHS, I think. > > > In Debian java policy, java-gnome libs are placed in /usr/lib/jni/ > Right, for FHS prefix is /usr/local, however Redhat based distributions > use /usr. (others use something else...) > On Redhat I like to package everything and put in /usr, I don't like > have a separated /usr/local tree. However is very legitimate to default > to /usr/local for java-gnome installation as many other source packages > do. If you want to change prefix it's as simple as passing > --prefix=3D<your prefix here> to ./configure. Sorry if I'm thick, but as is stands the startups script needs to point to where the libs reside? If different distributions put them in differnt places we hav a problem. The solution could be somehting like "java-gnome-conf" so that the startup script starts the app using some call similar to: java -Djava.jni.path=3D`java-gnome-conf --jnipath` -classpath `java-gnome-conf --classpath` -jar theapp.jar Would this work? Elias |
From: Mark H. <mh...@ca...> - 2003-11-16 11:48:37
|
[following on from thread re placement of jni libs and jar files. Original thread: ] In answer to the suggestion of having a java-gnome-conf script generated at install time so that users of the library can determine where jni files and jar files are located on the current distribution: I think this is a bad idea - it adds unnecessary complexity. For example, all native applications (non-java) choose to place all libraries in /usr/lib -- they must have had similar discussions about this a long time ago. Why should java be different? I propose that jni libs should go in /usr/lib/jni (as is standard for Debian) and JVMs should be modified to look in /usr/lib/jni and /usr/local/lib/jni for jni libs. Debian-java have had similar discussions in the past (which I failed to follow since I had too much real work on), so I'm CC'ing there in the hope of advice. One question I do have with my proposal though is what happens if /usr/lib/jni has both libgnome-java0.8 and libgnome-java0.9 - How does the jvm currently choose? -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Tiago C. <cog...@li...> - 2003-11-16 13:19:24
|
On Dom, 2003-11-16 at 10:47, Mark Howard wrote: > [following on from thread re placement of jni libs and jar files. > Original thread: > ] > > In answer to the suggestion of having a java-gnome-conf script generated > at install time so that users of the library can determine where jni > files and jar files are located on the current distribution: > > I think this is a bad idea - it adds unnecessary complexity. For > example, all native applications (non-java) choose to place all > libraries in /usr/lib -- they must have had similar discussions about > this a long time ago. Why should java be different? > I propose that jni libs should go in /usr/lib/jni (as is standard for > Debian) and JVMs should be modified to look in /usr/lib/jni and > /usr/local/lib/jni for jni libs. > IMO since we are using /usr/lib/jni for the java-to-native libs we should use /usr/lib/java for the jars, come to think of it python .py, .pyc and .pyo files go to /usr/lib/pythonX.X (at least in debian) so i think that java could use the same approach, yet thinking in that are already used we could also stick to /usr/share/java > Debian-java have had similar discussions in the past (which I failed to > follow since I had too much real work on), so I'm CC'ing there in the > hope of advice. > > One question I do have with my proposal though is what happens if > /usr/lib/jni has both libgnome-java0.8 and libgnome-java0.9 - How does > the jvm currently choose? Why not: ln -s libgnome-java0.8.so libgnome-java.so Tiago |
From: Mark H. <mh...@ca...> - 2003-11-16 13:44:35
|
On Sun, Nov 16, 2003 at 12:18:38PM -0100, Tiago Cogumbreiro wrote: > > One question I do have with my proposal though is what happens if > > /usr/lib/jni has both libgnome-java0.8 and libgnome-java0.9 - How does > > the jvm currently choose? > Why not: > ln -s libgnome-java0.8.so libgnome-java.so The reason I asked this was because sometimes you may want two versions of java-gnome installed, in a similar way to how you may want gtk1.2 and gtk2.2 installed. Some applications will want the 1.2 lib, others the 2.2 lib. Is there any way that the java application itself can specify which one to use? Would it be sufficient to just have the correct jar in the classpath? -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: R. A. R. D. <riv...@ya...> - 2003-11-16 18:38:52
|
--- Mark Howard <mh...@ca...> wrote: > On Sun, Nov 16, 2003 at 12:18:38PM -0100, Tiago Cogumbreiro wrote: > > > One question I do have with my proposal though is what happens if > > > /usr/lib/jni has both libgnome-java0.8 and libgnome-java0.9 - How > does > > > the jvm currently choose? > > Why not: > > ln -s libgnome-java0.8.so libgnome-java.so > > The reason I asked this was because sometimes you may want two > versions > of java-gnome installed, in a similar way to how you may want gtk1.2 > and > gtk2.2 installed. Some applications will want the 1.2 lib, others the > 2.2 lib. Is there any way that the java application itself can > specify > which one to use? Would it be sufficient to just have the correct jar > in > the classpath? Eclipse SWT allows coexistence of more than one version in the same system, and the way they handle it is including the version number in the name of the library. For example, for the version 2.1.1 of eclipse they used the build number 2135, and the native libraries are: for linux/x86 they have: libswt-gtk-2135.so libswt-pi-gtk-2135.so libswt-gnome-gtk-2135.so for win32/x86 they have: swt-win32-2135.dll They have diferent implementations of swt for diferent platforms, that's why they have also diferent names for native libraries, but using this approach, the v0.8.1 of gnome-java could load libgnome-java-0.8.1.so instead of libgnome-java.so. If a user updates gnome-java, the jar and the native libs both are updated, then the new jar v1.0 could load the new installed libgnome-java-1.0.so and the user can have both versions of gnome-java. The version used will depend on what jar the user references. If the app references gnome-0.8.1.jar, it whill use v0.8.1, if the application references gnome-1.0.jar, it will use v1.0, and if the application references gnome.jar, the version depends on the soft link. rivas. __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |
From: Andrew - D. <aj...@on...> - 2003-11-16 23:16:20
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Just wondering if there is a list of mappings from gtk widgets to what we would use in java code, for example a gtkText to an Entry field? Thanks -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQE/uAUEyheqWpsy0vsRAmp0AJ40gLwyAh9C2GLX0O5ytiQ1cgOIIQCfe/kc k7fWeydZVu/x2S437fZbxkI= =SRHb -----END PGP SIGNATURE----- |
From: Mark H. <mh...@ca...> - 2003-11-16 11:50:58
|
sorry, forgot to add the link Original thread: http://sourceforge.net/mailarchive/forum.php?thread_id=3466926&forum_id=5689 -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Mark H. <mh...@ca...> - 2003-11-15 14:13:19
|
On Sat, Nov 15, 2003 at 02:53:24PM +0100, Elias Martenson wrote: > If the Java packages were standardised in any way, the logical place to > put them would be $JAVA_HOME/jre/lib/ext Sorry, I disagree completely. Why should Java be treated differently to the rest of the Unix system? What is $JAVA_HOME ? $SUN_JAVA_HOME? That's just ridiculous limiting a system to one JVM. -- .''`. Mark Howard : :' : `. `' http://www.tildemh.com `- mh...@de... | mh...@ti... | mh...@ca... |
From: Elias M. <el...@al...> - 2003-11-15 14:24:39
|
l=C3=B6r 2003-11-15 klockan 15.12 skrev Mark Howard: > On Sat, Nov 15, 2003 at 02:53:24PM +0100, Elias Martenson wrote: > > If the Java packages were standardised in any way, the logical place = to > > put them would be $JAVA_HOME/jre/lib/ext >=20 > Sorry, I disagree completely. > Why should Java be treated differently to the rest of the Unix system? > What is $JAVA_HOME ? $SUN_JAVA_HOME? That's just ridiculous limiting a > system to one JVM. Hmm... yeah maybe you're right. But how do you make sure that the VM always finds the GNOME libraries without having to add silly -D and LD_LIBRARY_PATH parameters? Elias |
From: R. A. R. D. <riv...@ya...> - 2003-11-15 20:22:42
|
--- Elias Martenson <el...@al...> wrote: > lör 2003-11-15 klockan 15.12 skrev Mark Howard: > > On Sat, Nov 15, 2003 at 02:53:24PM +0100, Elias Martenson wrote: > > > If the Java packages were standardised in any way, the logical > place to > > > put them would be $JAVA_HOME/jre/lib/ext > > > > Sorry, I disagree completely. > > Why should Java be treated differently to the rest of the Unix > system? > > What is $JAVA_HOME ? $SUN_JAVA_HOME? That's just ridiculous > limiting a > > system to one JVM. > > Hmm... yeah maybe you're right. But how do you make sure that the VM > always finds the GNOME libraries without having to add silly -D and > LD_LIBRARY_PATH parameters? > I don't think as a good idea to put all java packages in $JAVA_HOME/jre/lib/ext for some reasons: 1. Some times packages are incompatible between them, if I let the Java VM load all, applications can break. For me that's the strong reason for not to do that. I think libraries like jars should be into one folder like system and application libraries, but each application must select explicity which jars to use. That can ve achieved using Class-Path attribute on the manifest.mf. A well integrated JavaVM should look for packages relative to the application jar, then in "common" folder like /usr/lib/java or equivalent. Meanwhile "launch scripts" should add specific "system" jars to the classpath before launching the app, or in this particular case (cause gnome only run on unix/linux) directly putting the full path in Class-Path attribute. 2. I agree with the previous comment. Installation must not depend on the JavaVM installed. In fact that's the point with java! 3. If the user have a JRE and not a full sdk that won't work either. 4. What will happen the day that the Java VM is part of the OS itself and there is no $JAVA_HOME ? Java and OS integration is one thing I hope to see some day. rivas __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |