On Sunday 23 March 2008 07:25, Stan Goodman wrote:
...
Yes, that's what I have seen. But this is not clear to me; perhaps I should have started my query with that.
The location I named above is the only reference to "javax" I find in my system; I find no file or directory called "javax.swing". Is "javax.swing" inside some other java file?
That name, "javax.swing" is a package name, not a class name. (Class names start with a capital letter, by strongly held conventin.) All the compiled class files (suffix ".class") reside in JAR files in the shipped Java runtime. The JVM can read from JAR files (structurally like ZIP files) or from the file system. It maps the hierarchichal package structure onto the directory structure, either on a file system or within a JAR file.
To be even more specific, if I have a java app that is an older jar file that uses swing, and that is old enough that it wants to have the swing library called called in the classpath,
I don't know what this means. The Java standard library package namespace is standardized and Swing is included in that standard. No one would write a program to use Swing classes in non-standard packages.
how must I call this library?
You don't. Swing is built in. If a program uses Swing (properly), it will be there and be found.
Or does swing need to be in the classpath specifically at all; is it enough that it is in the jvm and will be found automatically/
Depending on how old your application is (it would have to be really old), it may not work at all, since the Swing packages were relocated early on in Java's evolution.
The background for the question is a java app that I have used for a long time in OS/2, under java v1.4.2. In that case, I did not have to add swing to the classpath. But with the self-same recipe, I have been unable to start the app now, in Linux, and have not been able to identify any other difference between the two environments. What I didn't think of until just now, however, is that I ought to try the app under v1.4.2, which is also on the machine, since the difference in the location of swing begins with java v1.5.
Now. The Swing packages were relocated between 1.1 and 1.2 of Java, about 10 years ago.
...
-- Stan Goodman
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org