Re: Is there a decent file explorer for Linux?
Chi-Ming Yang wrote: > Hi there, >Is there a decent file explorer (manager) for Linux? try this, it will make any sissie feel like a geek... > http://people.mainz.netsurf.de/~bolik/tkdesk/
JDK1.2 Port to Linux?
Blackdown: I have recently joined this mailing list as I'm now using your lovely JDK port. I had a quick peek in the archived mailing list though I could not find any info of plans on a JDK1.2 port... At the moment I cannot see any problem with me using your JDK1.1.6 port but was wondering, looking to the future...Is there a port planned? Dan.
JDK 1.2 Announcement at LWN
Hi, I just saw Steve Byrne's announcement at: http://www.lwn.net/daily/java.html This is good news indeed. Continuing thanks to the Java-Linux team for their efforts in this area. Is anyone able to comment as to whether this agreement will cover HotSpot when it arrives ? Rob Rob Nugent Development Manager UniKix Technologies Europe [EMAIL PROTECTED] Tel: +44 (0) 1489 585503 Fax: +44 (0) 1489 881363
Re: Is there a decent file explorer for Linux?
Chi-Ming Yang wrote: >I think it is not difficult to use swing to do one. Do you think it is worthy to >write one? Would anyone Linux user like it? I think the java-linux list is for technical issues about the port, but Chi-Ming Yang has raised a question which relates to philosophies of java and linux. Can there be a java window manager (Jwm) which will live on any platform and bypass the window managers? "Write once run anywhere" imples there will always be lots of something else to run in. Can someone advise a more appropriate place to read about this? I have looked at http://sunsite.unc.edu/javafaq/mailinglists.html jim watson
Re: Clipboard interaction between Swing/JDK and X11
Thanks for the info. At work `sparc-sun-solaris2.5.5' with CDE I can copy+paste from a dtterm in to a Swing JTextArea. I have not found a way to copy from GNU Emacs 20.2 into a JTextArea yet. However using xcutsel -sel CLIPBOARD and pressing the button [copy 0 to CLIPBOARD] to copy the selection from Emacs into the CLIPBOARD buffer and then using the Ctrl-V in my Swing app did the trick. So this will work in KDE at home I presume too. Yep there must be a better way. Send all messages to JavaSoft. Thanks again Jim __ Reply Separator _ Subject: Re: Clipboard interaction between Swing/JDK and X11 Author: jrwatson ([EMAIL PROTECTED]) at lon-mime Date:24/10/98 10:56 > [EMAIL PROTECTED] wrote: > > > Another another thing: Can anyone get a X11 selection, say from an XTerm or > > Emacs and paste it directly into a JTextArea or JTextField? I cannot do it. > > Is this Swing/JDK related or is it another XFree86 problem ? Yes, this can be done using a program called "xcutsel". You would start it like this: $ xcutsel -sel CLIPBOARD & When you select some text in xterm or copy in emacs, the text is stored in XA_CUT_BUFFER0 (see Xatom.h) xcutsel provides for transfers between the cut buffer and the CLIPBOARD The CLIPBOARD seems to be default for swing (i tested JTextArea) and is the one returned by AWT using Toolkit.getDefaultToolkit.getSystemClipboard. But AWT (I have only tested TextArea) seems to use the cutbuffer. You can watch things in the CLIPBOARD with xclipboard. Interestingly Netscape 4.06 supports both the cutbuffer and the CLIPBOARD. So there must be a better way... (i am using slackware 3.5) jim watson
Re: JDK1.2 Port to Linux?
Daniel Harris wrote: > any info of plans on a JDK1.2 port... last Saturday, Steve Byrne wrote: "...we haven't advertized the fact until now that Sun has licensed the JDK 1.2 pre-release sources to the porting team and that we are starting to work with the 1.2 port. Being a full licensee (just like IBM or that other large company) means that we have full access to the JDK sources, updated on a regular basis, as well as the Java Compatibility Kit, so that we can validate that the Linux port is 100% Java Compatible."
Re: Clipboard interaction between Swing/JDK and X11
CLIPBOARD is hard coded in lesstif(and motif?) XA_CUT_BUFFER0 is hard coded in xterm
JDK-Source URL
Could you add this to README.linux.src http://java.sun.com/products/jdk/1.1/source.html Regards, Stephan
Re: JDK1.2 Port to Linux?
Sun has just given a license to port JDK 1.2 to Linux. Point your fav browser at http://lwn.net/daily/java.html Pete PS: Any plans for distribution on CD ROM? __ Reply Separator _ Subject: JDK1.2 Port to Linux? Author: d.harris ([EMAIL PROTECTED]) at lon-mime Date:26/10/98 09:52 Blackdown: I have recently joined this mailing list as I'm now using your lovely JDK port. I had a quick peek in the archived mailing list though I could not find any info of plans on a JDK1.2 port... At the moment I cannot see any problem with me using your JDK1.1.6 port but was wondering, looking to the future...Is there a port planned? Dan.
Re: linux on windows
[THIS IS JAVA LINUX, MATE] But I can whole heartily recommend spending 55 GBP British Pounds on Partition Magic 3.0, because you can repartition your hdd without having reinstall W95/NT. It works much much better than FIPS and it works with the new VFAT oSR2 format. Pete __ Reply Separator _ Subject: linux on windows Author: gelu ([EMAIL PROTECTED]) at lon-mime Date:22/10/98 17:03 Hello world can anyone tell me if I can install linux (kinda minilinux get installed on dos) on a windows nt/95 without haveing to use fips or anything that direct hdd access can be trvcked somehow ? gg
Java Web Server1.1 on Linux
Hi, On the blackdown web page it is possible to load the javasoft's JavaWebServer1.1 in linux only if the diff file is added. Question (a bit short of knowledge on this thing). Is there an easy way to apply the diff's, or is it a manual opperation by editing this file then that file and changing it line by line in each file ? Then recompiling the server ? Are there any tips or hints out there for compiling and how to apply the diff's etc. Many thanks Matt
Re: Java Web Server1.1 on Linux
Matt Zagni wrote:Is there an easy way to apply the diff's, or is it a manual > operation by editing this file then that file and changing > it line by line in each file ? enter $ man patch $ man make > Are there any tips or hints out there for compiling and how > to apply the diff's etc. This is only my opinion, but there is no substitute but to read some books, i got SAMS "Slackware Linux Unleashed" and WROX "Beginning Linux Programming". The software is free but you need to spend some $$$ to find out how to use it... jim watson
Re: Java Web Server1.1 on Linux
Jim, So it is basicaly a look up in the man pages for patch, then run a make after the changes have been added manually line by line as the diff's have indicated ? I have the Slackware linux (big complete book) so it may have it in there too. diff -c > name.patch a command like.. patch -p0 or patch -cr Any ideas for someone who is totaly in the dark on diffs (who feels that he has a patch over each eye) ? Many thanks Matt > From [EMAIL PROTECTED] Mon Oct 26 14:24:32 1998 > > Matt Zagni wrote:Is there an easy way to apply the diff's, or is it a manual > > > operation by editing this file then that file and changing > > it line by line in each file ? > > enter > $ man patch > $ man make > > > Are there any tips or hints out there for compiling and how > > to apply the diff's etc. > > This is only my opinion, but there is no substitute but to read some > books, i got SAMS "Slackware Linux Unleashed" and WROX "Beginning > Linux Programming". > > The software is free but you need to spend some $$$ to find out how to > use it... > > jim watson > > > > > >
RE: Number Nine Revolution 3D w/T2R
The latest version of XFree 86 (version 3.3.2) has an X Server for the T2R chipset on the #9 Rev 3D. I've been using it since last March with no problems. Check out their web site at http://www.xfree86.org for more information. On a related note, I'm thinking of gettin the new Revolution 4 from #9 and was wondering if that uses the same T2R chipset as the Rev 3D. Anybody know about that. I checked out their web site, but couldn't find that level of detail. Thanks. -Andy -Original Message-From: Scott Campbell [mailto:[EMAIL PROTECTED]]Sent: Friday, October 23, 1998 10:28 PMTo: [EMAIL PROTECTED]Subject: Number Nine Revolution 3D w/T2RI found myself in the same boat. Did anyone have a solution? -Scott I recently purchased a #9 Rev 3D (AGP 8MB RAM) and was a little dissapointed to discover that there were no compatible X Servers for it other than monochrome and VGA16. I was wondering if there are plans to develop (under the auspices of XFree86) such a server in the near future. If so, how can I be a beta tester? (It's so hard being on the cutting edge ;->). Thanks in advance. -Andy
Re: Is there a decent file explorer for Linux?
jim watson wrote: > I think the java-linux list is for technical issues about the port, but Chi-Ming Yang has raised a question which relates to philosophies of java and linux. Can there be a java window manager (Jwm) which will live on any platform and bypass the window managers? > "Write once run anywhere" imples there will always be lots of something else to run >in. Can someone advise a more appropriate place to read about this? I have looked at There is the additional interest of things written in Java that aren't necessarily intended to run just anywhere. For example, since Gnome is corba-based, you could write Gnome apps in Java, or perhaps have a cross-platform app that's Gnome-enabled when running with Gnome. Eventually issues like these will outgrow the java-linux mailing list. -- Paul Reavis [EMAIL PROTECTED] Design Lead Partner Software, Inc.http://www.partnersoft.com
Re: Is there a decent file explorer for Linux?
> I think the java-linux list is for technical issues about the port, but Chi-Ming >Yang has raised a question which relates to philosophies of java and linux. Can >there be a java window manager (Jwm) which will live on any platform and bypass the >window managers? I thought this is java development for Linux. I will try other groups. I got few emails from geeks which did not show up here. They provided me many placese to find "decent" file explorers. I did find some of them I like. My ideal is to build better GUI for average person. For those who believe the advantage of Linux, but having difficulty to utilize Linux. >From those responses that I got, I found there were people trying to do this. One >example is at http://www.seul.org/. I will read more, and thanks for all responses. - See the original message at http://www.egroups.com/list/java-linux/?start=4375 -- Free e-mail group hosting at http://www.eGroups.com/
RE: JDK 1.2 Announcement at LWN
I'm pleased that this has happened. Good luck to the porting team. Please forgive me if this next question violates the "don't be a stick in the mud" and "don't look a gift horse in the mouth" axioms, but, are there any plans to port the Java 3D API to Linux? Thanks. -Andy > -Original Message- > From: Rob Nugent [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 26, 1998 5:17 AM > To: [EMAIL PROTECTED] > Subject: JDK 1.2 Announcement at LWN > > > Hi, > > I just saw Steve Byrne's announcement at: > > http://www.lwn.net/daily/java.html > > This is good news indeed. Continuing thanks to the Java-Linux team for > their efforts in this area. > > Is anyone able to comment as to whether this agreement will cover > HotSpot when it arrives ? > > Rob > > > Rob Nugent > Development Manager > UniKix Technologies Europe > [EMAIL PROTECTED] > Tel: +44 (0) 1489 585503 > Fax: +44 (0) 1489 881363 > > >
mklinux versions
Hi Steve, I see that you have a mklinux version for JDK-1.1.5. What are the differences with 1.1.6, and are you discontinuing mklinux support for the future? Kurt Rodarmer [EMAIL PROTECTED]
Re: Applets, AWT and Netscape (Code included)
Hi,
Here's the code:
import java.awt.Dialog;
import java.awt.Color;
import java.awt.Button;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Event;
import java.awt.Panel;
import java.awt.Graphics;
import java.awt.Frame;
import java.awt.Label;
import java.awt.Dimension;
import java.awt.event.ActionListener;
// Class AlertDialog begins
class AlertDialog extends Dialog implements ActionListener
{
Label texto;
Button okButton;
Button cancelButton;
static String indicador;
// AlertDialog's constructor, which contains a message and 2 buttons
public AlertDialog(Frame parent,String titulo,String texto)
{
super(parent,titulo,true); // AlertDialog calls Dialog.
setBackground(Color.white);
setResizable(false); // AlertDialog can't resize
GridBagLayout gridbag=new GridBagLayout();
GridBagConstraints constraints=new GridBagConstraints();
setLayout(gridbag);
setSize(new Dimension(350,190));
// Etiqueta con el mensaje
buildConstraints(constraints,0,0,2,2,100,60);
constraints.fill=GridBagConstraints.BOTH;
constraints.anchor=GridBagConstraints.CENTER;
this.texto=new Label();
this.texto.setText(texto);
this.texto.setAlignment(Label.CENTER);
gridbag.setConstraints(this.texto,constraints);
add(this.texto);
// Boton de Aceptar
buildConstraints(constraints,0,2,1,1,50,40);
constraints.fill=GridBagConstraints.NONE;
constraints.anchor=GridBagConstraints.EAST;
okButton = new Button("Aceptar");
gridbag.setConstraints(okButton,constraints);
okButton.addActionListener(this);
add(okButton);
// Boton de Cancelar
buildConstraints(constraints,1,2,1,1,50,0);
constraints.fill=GridBagConstraints.NONE;
constraints.anchor=GridBagConstraints.WEST;
cancelButton = new Button("Cancelar");
gridbag.setConstraints(cancelButton,constraints);
cancelButton.addActionListener(this);
add(cancelButton);
show();
}
public void buildConstraints(GridBagConstraints gbc,int gx,int gy,int gw,int gh,int
wx,int wy)
{
gbc.gridx=gx;
gbc.gridy=gy;
gbc.gridwidth=gw;
gbc.gridheight=gh;
gbc.weightx=wx;
gbc.weighty=wy;
}
public void actionPerformed(ActionEvent evento)
{
Button botonEvento=(Button)evento.getSource();
if(botonEvento.getLabel().equals("Aceptar"))
{
indicador="acepta";
setVisible(false);
}
else if(botonEvento.getLabel().equals("Cancelar"))
{
indicador="rechaza";
setVisible(false);
}
}
}
Carlos Alberto Roman Zamitiz
Departamento de Ingenieria en Computacion, Facultad de Ingenieria UNAM
[EMAIL PROTECTED]
On Sun, 25 Oct 1998, Dimitris Vyzovitis wrote:
> Could you elaborate a bit?
>
> Dimitris
>
> > I have other problem: I done an AlertDialog, a child of Dialog, which is a
> > modal Dialog. I'm using Netscape 4.07 and my Linux box has
> > "Linux_JDK_1.1.5_v7" but users can resize my AlertDialog.
> >
> > Any suggestions? Thanks!
>
Re: Applets, AWT and Netscape (Code included)
> Carlos Alberto Roman Zamitiz writes: Carlos> Hi, Carlos> Here's the code: [...] Nice code, but it doesn't compile and it has no main method ;-) Carlos> On Sun, 25 Oct 1998, Dimitris Vyzovitis wrote: >> Could you elaborate a bit? >> >> Dimitris >> >> > I have other problem: I done an AlertDialog, a child of Dialog, which is a >> > modal Dialog. I'm using Netscape 4.07 and my Linux box has >> > "Linux_JDK_1.1.5_v7" but users can resize my AlertDialog. >> > >> > Any suggestions? Thanks! >> This is a known bug in Sun's JDK 1.1.5/6. It's fixed in our forthcoming 1.1.7v1. (Of course this will not fix the bug for netscape). Juergen
Very strange behavior [was Re: Applets, AWT and Netscape (Code included)]
Hi,
after attempting this snippet of code provided by Carlos, it seems that java-linux
allows resizing
of this Dialog despite the setResizable( false ) call, while java in winNT doesn't do
so.
I tried it with jdk116v5 and netscape 4.5 on linux and netscape 4.5, MSIE4.01, sun
jdk1.1.6 and
microsoft sdk3.1 on Windoze
I thing that this looks like a bug.
I tried chainging the layout to grid layout and flow layout as well, but the virtual
machine seems
to refractory to manage ;-}.
Dimitris.
Carlos Alberto Roman Zamitiz wrote:
> Hi,
> Here's the code:
>
> import java.awt.Dialog;
> import java.awt.Color;
> import java.awt.Button;
> import java.awt.GridBagLayout;
> import java.awt.GridBagConstraints;
> import java.awt.Event;
> import java.awt.Panel;
> import java.awt.Graphics;
> import java.awt.Frame;
> import java.awt.Label;
> import java.awt.Dimension;
> import java.awt.event.ActionListener;
>
> // Class AlertDialog begins
> class AlertDialog extends Dialog implements ActionListener
> {
> Label texto;
> Button okButton;
> Button cancelButton;
> static String indicador;
>
> // AlertDialog's constructor, which contains a message and 2 buttons
> public AlertDialog(Frame parent,String titulo,String texto)
> {
> super(parent,titulo,true); // AlertDialog calls Dialog.
> setBackground(Color.white);
> setResizable(false); // AlertDialog can't resize
>
> GridBagLayout gridbag=new GridBagLayout();
> GridBagConstraints constraints=new GridBagConstraints();
> setLayout(gridbag);
>
> setSize(new Dimension(350,190));
>
> // Etiqueta con el mensaje
> buildConstraints(constraints,0,0,2,2,100,60);
> constraints.fill=GridBagConstraints.BOTH;
> constraints.anchor=GridBagConstraints.CENTER;
> this.texto=new Label();
> this.texto.setText(texto);
> this.texto.setAlignment(Label.CENTER);
> gridbag.setConstraints(this.texto,constraints);
> add(this.texto);
>
> // Boton de Aceptar
> buildConstraints(constraints,0,2,1,1,50,40);
> constraints.fill=GridBagConstraints.NONE;
> constraints.anchor=GridBagConstraints.EAST;
> okButton = new Button("Aceptar");
> gridbag.setConstraints(okButton,constraints);
> okButton.addActionListener(this);
> add(okButton);
>
> // Boton de Cancelar
> buildConstraints(constraints,1,2,1,1,50,0);
> constraints.fill=GridBagConstraints.NONE;
> constraints.anchor=GridBagConstraints.WEST;
> cancelButton = new Button("Cancelar");
> gridbag.setConstraints(cancelButton,constraints);
> cancelButton.addActionListener(this);
> add(cancelButton);
>
> show();
> }
>
> public void buildConstraints(GridBagConstraints gbc,int gx,int gy,int gw,int gh,int
>wx,int wy)
> {
> gbc.gridx=gx;
> gbc.gridy=gy;
> gbc.gridwidth=gw;
> gbc.gridheight=gh;
> gbc.weightx=wx;
> gbc.weighty=wy;
> }
>
> public void actionPerformed(ActionEvent evento)
> {
> Button botonEvento=(Button)evento.getSource();
> if(botonEvento.getLabel().equals("Aceptar"))
> {
>indicador="acepta";
>setVisible(false);
> }
> else if(botonEvento.getLabel().equals("Cancelar"))
> {
>indicador="rechaza";
>setVisible(false);
> }
> }
> }
>
> Carlos Alberto Roman Zamitiz
> Departamento de Ingenieria en Computacion, Facultad de Ingenieria UNAM
> [EMAIL PROTECTED]
>
> On Sun, 25 Oct 1998, Dimitris Vyzovitis wrote:
>
> > Could you elaborate a bit?
> >
> > Dimitris
> >
> > > I have other problem: I done an AlertDialog, a child of Dialog, which is a
> > > modal Dialog. I'm using Netscape 4.07 and my Linux box has
> > > "Linux_JDK_1.1.5_v7" but users can resize my AlertDialog.
> > >
> > > Any suggestions? Thanks!
> >
--
Dimitrios Vyzovitis -- Information Processing Laboratory
[EMAIL PROTECTED] -- Aristotle University of Thessaloniki
[EMAIL PROTECTED] -- Dept. of Electrical and Computer Engineering
http://egnatia.ee.auth.gr/~dviz
Re: Applets, AWT and Netscape (Code included)
Juergen Kreileder wrote: > > Carlos Alberto Roman Zamitiz writes: > > Carlos> Hi, > Carlos> Here's the code: > [...] > > Nice code, but it doesn't compile and it has no main method ;-) Well, it will compile if you change ActionEvent into java.awt.event,ActionEvent ;-} Why do you need a main method? You can use a simple stub html file and a wrapper applet class to test it in an applet (that's what I did). > This is a known bug in Sun's JDK 1.1.5/6. It's fixed in our forthcoming > 1.1.7v1. (Of course this will not fix the bug for netscape). At any rate, since this is a known bug, there is no need for further scrutiny (and I so gloriously deduced that this looks like a bug in the previous mail... I even renamed the thread to draw attention ;-} ) Dimitris.
Re: Applets, AWT and Netscape (Code included)
> Dimitris Vyzovitis writes: Dimitris> Juergen Kreileder wrote: >> > Carlos Alberto Roman Zamitiz writes: >> Carlos> Hi, Carlos> Here's the code: >> [...] >> >> Nice code, but it doesn't compile and it has no main method ;-) Dimitris> Well, it will compile if you change ActionEvent into Dimitris> java.awt.event,ActionEvent ;-} Yep, it was easy to fix. Dimitris> Why do you need a main method? You can use a simple stub Dimitris> html file and a wrapper applet class to test it in an Dimitris> applet (that's what I did). In some cases it takes more time to get the code from bug reports working than it takes to track down and fix the actual problem. So it really simplifies things if you post examples that work out of the box. Juergen
So Whats Wrong with the JAVA demo/molecule program.
well in essence there is nothing wrong with the demo/molecule program as it is run
on the JDK that I produce for the ALPHA. You get a blank screen because the client
( appletviewer ), and the X server are unable to communicate SHM ( shared memory
info ) to each other !!!.
This is simply due to the kernel ( 2.0.33) , or glibc's ( 2.0.7 - i think -19 )
incompatible definition of struct ipc_perm. The kernel thinks that most of the
members are ushort, whereas glibc thinks that most of the members are unsigned
int. Anyway, when X asks for the size of the shared segment, it appears to get a
size of 0 bytes, and gives a EACCESS boo boo - refusing to get the image that is
to be painted.
Changing the ipc_perm in linux/include/linux/ipc.h to
#if 0
struct ipc_perm
{
key_t key;
ushort uid; /* owner euid and egid */
ushort gid;
ushort cuid; /* creator euid and egid */
ushort cgid;
ushort mode; /* access modes see mode flags below */
ushort seq; /* sequence number */
};
#else
struct ipc_perm
{
key_t key;
unsigned int uid; /* owner euid and egid */
unsigned int gid;
unsigned int cuid; /* creator euid and egid */
unsigned int cgid;
unsigned int mode; /* access modes see mode flags below */
unsigned short int seq; /* sequence number */
};
#endif
and then rebuilding the kernel made my java/demo working again.
It also makes the program ipcs also work again.
I cannot tell u who is right, but it is easier to change 1 kernel, than rebuild
all sorts of other peripheral programs quickly.
gat
BTW the demo's are now a part of the JDK 117 src pkg.
Uncle George wrote:
> its not surprising to me, but there is no demos directory that comes with the
> jdk source from javasoft et al. if its packaged somewhere else, can u tell me?
> There are probably other things that are missing from the jdk bin's, but that
> is what javasoft gave to me, and thats how its build proceeds.
> gat
>
> Simon Kenyon wrote:
>
> > > anyway - where can i find the molecule viewer/demo - THE ONE U ARE
> > > USING.
> >
> > it is the one that comes with the jdk (the stuff you didn't ship as part of
> > the alpha port in demos/MolecularViewer
> > --
> > simon
Re: So Whats Wrong with the JAVA demo/molecule program.
On Mon, Oct 26, 1998 at 09:14:21PM -0500, Uncle George wrote: > This is simply due to the kernel ( 2.0.33) , or glibc's ( 2.0.7 - i > think -19 ) incompatible definition of struct ipc_perm. The kernel > thinks that most of the members are ushort, whereas glibc thinks that > most of the members are unsigned int. Glibc is correct. The axp kernel patch sets that have been floating about throughout the life of the 2.0 series fix this, among other things. r~
Re: mklinux versions
Hi, If you are asking about MkLinux on PowerPC then that port is very much alive and in sync with the x86 ports (we build from one unified diff). Our current release is jdk 117 v1 and the Metrowerks JIT compiler is also available. The home page for MkLinux on ppc for jdk releated activities is: http://business.tyler.wm.edu/mklinux/ If you are asking about mklinux on intel, unfortunately I know nothing about it. I hope this helps. Let me know if you have any questions. Kevin -- Kevin B. Hendricks Associate Professor, Operations & Information Technology School of Business, College of William & Mary Williamsburg, VA 23187, [EMAIL PROTECTED] http://business.tyler.wm.edu
Bug fix for checkVersions
It seems the script was missing some spaces between some curly
braces and a method call...
I've attached the slightly changed version. Hope this helps...
(I'm running Slakware 3.3 with almost every version of Java installed
somewhere on my machine!)
Ben
--
Ben Greear ([EMAIL PROTECTED]) http://www.primenet.com/~greear
Author of ScryMUD: mud.primenet.com
http://www.primenet.com/~greear/ScryMUD/scry.html
#!/bin/sh
##
# NOTE: this file is NOT a part of the standard Sun JDK distribution!
# It is part of the Linux JDK, for use in dealing with the wide
# variety of shared library versions that various people have.
##
# Check the library versions of the executable to see if they are suitably
# advanced. If so, don't add a reference to the linuxlibs subdirectory
# into LD_LIBRARY_PATH's value
# grab the first number of a dotted version number and return it
firstField() {
expr "$1" : "\([0-9][0-9]*\).*"
}
# return everythng after the first number of a dotted version number
# (excluding the dot following the first number).
restFields() {
expr "$1" : "[0-9][0-9]*\.\(.*\)"
}
# returns 0 if the first version number (a dotted version number) is
# greater than or equal to the second version number.
isGreaterOrEqual() {
ver1="$1"
ver2="$2"
# echo "v1 [$ver1] v2 [$ver2]"
# first, a quick test for equality, then some "did one or the
# other run out early" tests.
if [ "$ver1" = "$ver2" ] ; then
return 0
elif [ -z "$ver1" ] ; then
# ver1 ran out first, so it's less
return 1
elif [ -z "$ver2" ] ; then
# v1 has fields, so it's greater
return 0
fi
# at this point, the two version still have at least term remaining,
# so compare those terms.
v1Term="`firstField $ver1`"
v2Term="`firstField $ver2`"
if [ "$v1Term" -gt "$v2Term" ] ; then
# v1 definitely is greater
return 0
elif [ "$v1Term" -lt "$v2Term" ] ; then
# v1 definitely is less
return 1
fi
# if we're here, the first terms are equal, so we need to
# check the next ones.
isGreaterOrEqual "`restFields $ver1`" "`restFields $ver2`"
return
}
# given the output of ldd as argument 1, this function emits the
# actual version number of the actual library, following symlinks
getVers() {
libline="$1"
lib=`echo $libline | awk '{ print $3 } '`
lib=`ls -l $lib | awk '{print $NF}'`
echo "$lib" | sed 's/^.*\.so\.//'
}
# returns the current version of the library given by parameter
# 1
getLibVers() {
libName="$1"
lddOut="$2"
libsVers=`egrep "$libName" "$lddOut"`
getVers "$libsVers"
}
# given the a library name to look for (1), and the name of a file
# containing the output of ldd on the target executable (java), this
# return the name of the library, including the major version
getLibName() {
egrep $1 $2 | awk '{ print $1 }'
}
# returns 0 if the supplied libraries are needed, 1 if they
# are not
checkLibc5Version () {
lddOut="$1"
libcVers=`getLibVers libc $lddOut`
libdlVers=`getLibVers libdl $lddOut`
# 5.4.33 & 1.9.6 seem to do it too
if isGreaterOrEqual "$libdlVers" 1.9.6 ||
{ isGreaterOrEqual "$libcVers" 1.5.44 &&
isGreaterOrEqual "$libdlVers" 1.9.9 }
then
# supplied libraries are not needed
return 1
else
# supplied libraries ARE needed
return 0
fi
}
# returns 0 if the supplied libraries are needed, 1 if they
# are not
checkGlibcVersion () {
lddOut="$1"
libcVers=`getLibVers libc $lddOut`
libdlVers=`getLibVers libdl $lddOut`
# NOTE: almost all of the mail that I (sbb) got about the
# behavior on glibc systems indicates that things just "run out of the
# box", so for right now I'm opting to leave the our supplied libraries
# in place.
return 1
}
# computes the standard environment variables which describe where this
# shell script was found (and, by implication, where both java and the
# target libraries can be found). Sets global variables ARCH, THREADS_TYPE,
# and JAVA_HOME (if not set).
computeDirVars() {
prog=`type -p $0` >/dev/null 2>&1
# If prog is a symlink, trace it to the real home directory
while [ -L "$prog" ]
do
newprog=`expr "\`/bin/ls -l "$prog"\`" : ".*$prog -> \(.*\)"`
expr "$newprog" : / >/dev/null || newprog="`dirname $prog`/$newprog"
prog="$newprog"
done
CV_HOME=`dirname $prog`/..
progname=`basename $0`
ARCH=`arch`
# The default THREADS_TYPE is "green_threads". To change the default change
# the setting of the DEFAULT_THREADS_FLAG variable. The only valid values
# of that variable are 'green' and 'native'.
#
# This introduces a dependency of this wrapper on the policy used to do builds.
# e
