Re: Help on installing Jserv
> Please help me! I just finished installing JServ. Mabye I can help. What is the exact error you are getting? Can we see the entry from /logs/error_log and /logs/mod_jserv.conf ? --shawn -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Moving datbase access servlets built with Jbuilder3 to Linux/Apache(jserv)/JRE
Hi! I am moving servlets accessing databases(jdbc) to Linux plattform with Apache(jserv) and I am unsure whether this will work or not. I am using a lot of com.borland.dx classes as well as others. Speaking generally: Will it work, provided that I also move required classes? I guess that my question really is: Does the available JREs/jserv handle these kind of classes well provided that they are available or am I restricted to use java* classes only? Many thanks in advance! OLA SAMUELSON [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: Class information in a static method
Godmar Back wrote,
> Miles Sabin wrote,
> > [snip: className.class vs Class.forName("className")]
>
> In other words, you're saving a try/catch clause at the
> expense of one hidden static variable.
Hmm ... well, a litte more than that. The lookup is done
only once (to initialize the static).
Still, I have to admit I was a bit surprised at the
generated bytecode. I'd assumed that the constant pool
would contain a reference to the class which would be resolved directly by
the JVM at load time, rather by
code at the first point of use.
Is this just a compiler artefact (I've checked both
jikes and javac from 1.2.2) or is there some intrinsic
reason why it has to be done this way? I haven't been
able to find anything obvious that bears on this in
either the JLS or the JVM spec. I suppose it might allow
some class loading to be deferred or eliminated ... is
that the rationale?
Cheers,
Miles
--
Miles Sabin Cromwell Media
Internet Systems Architect 5/6 Glenthorne Mews
+44 (0)181 410 2230 London, W6 0LJ
[EMAIL PROTECTED] England
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Moving datbase access servlets built with Jbuilder3 to Linux/Apache(jserv)/JRE
Ola Samuelson wrote: > > Hi! > I am moving servlets accessing databases(jdbc) to Linux plattform with > Apache(jserv) and I am unsure > whether this will work or not. > > I am using a lot of com.borland.dx classes as well as others. > Speaking generally: Will it work, provided that I also move required > classes? > > I guess that my question really is: Does the available JREs/jserv handle > these kind of classes well provided that > they are available or am I restricted to use java* classes only? THe main point to remember about using servlets and JSP is that it *is* Java, not some broken subset thereof. If you couldn't use other Java classes it would be kind of pointless. You can use any classes or beans that you like as long as it's sensible in the context (servlets with AWT/Swing code for instance is not sensible). You can also define *which* JVM to use with JServ (I use 1.2prev2 for instance). -- Rachel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Newbie Question
I'm new to java on Linux but have experience with programming java on Windows. I'm having some problems compiling servlets. When I run javac on simple servlets it complains saying that it can't find javax.servlet or javax.servlet.http or Superclass HttpServlet. I'm using Debian 2.1 and jdk1.2 Here is my profile info: PATH=/usr/local/jdk1.2/bin:/usr/local/jsdk2.0/bin:/usr/local/sbin:/usr/local /bin:/usr/sbin:/sbin:/bin:/usr/X11R6/bin DISPLAY=:0 JAVA_HOME=/usr/local/jdk1.2 CLASSPATH=.:$JAVA_HOME/lib/classes.zip:/usr/local/jdk1.2/jre/lib/rt.jar Any help would be appreciated, Don Hatch _ Get Your Free Email at http://www.webpipe.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Changing the font on Swing slider
hmmm... if that doesn't work, you might try overriding the PLAF for that component. On Thu, 7 Oct 1999, Jacob Nikom wrote: > Hi, > > I am trying to change the font style and size on some > of the Swing widgets, mostly JSlider (tick marks numbers), TabbedPanes > (tab names), etc. You cannot not set them up > directly with setFont. > > I could not find any information how to do it. Do you > have any idea how to do it? > > Thank you, > > Jacob Nikom > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java on RedHat 6.1
On Thu, Oct 07, 1999 at 11:18:43PM +0100, Rachel Greenham wrote: > Paolo Ciccone wrote: > > > > On Thu, Oct 07, 1999 at 10:49:58AM -0700, Dan Iuster wrote: > > > RedHat has just released the 6.1 version of Linux. I am curious if > > > anyone has had any experience with the 1.1.7, 1.1.8 or 1.2 JDK and JRE > > > on RedHat 6.1. I have some rather large applications to port, and I > > > would like to know if there are any known pitfall introduced by the new > > > kernel. I believe 6.1 is based on the 2.2.12 kernel. > > > > I don't know about RH 6.1 but I'm using Mandrake 6.1 with kernel 2.2.13 and > > JDK 1.2 works normally. > > Um, I hadn't heard 2.2.13 was out. Are you on a pre? No, just the downloaded Mandrake 6.1 I noticed that the latest advertised kernel is 2.2.12 but uname -a on my system reports 2.2.13. -- Paolo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Newbie Question
You dont have the JDSK classes in your classpath. They can be downloaded from sun if you dont have them. Add it in and things will work fine. --shawn Don Hatch wrote: > > I'm new to java on Linux but have experience with programming java on > Windows. I'm having some problems compiling servlets. When I run javac on > simple servlets it complains saying that it can't find javax.servlet or > javax.servlet.http or Superclass HttpServlet. I'm using Debian 2.1 and > jdk1.2 Here is my profile info: > > PATH=/usr/local/jdk1.2/bin:/usr/local/jsdk2.0/bin:/usr/local/sbin:/usr/local > /bin:/usr/sbin:/sbin:/bin:/usr/X11R6/bin > DISPLAY=:0 > JAVA_HOME=/usr/local/jdk1.2 > CLASSPATH=.:$JAVA_HOME/lib/classes.zip:/usr/local/jdk1.2/jre/lib/rt.jar > > Any help would be appreciated, > > Don Hatch > > _ > Get Your Free Email at http://www.webpipe.net > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Api Linux
How can I make a call to an API of the linux using java? I want to add an user to the linux, for example. thank you. Rogerio G Miranda -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Changing the font on Swing slider
Do you know where the information about current settings is located? Jacob [EMAIL PROTECTED] wrote: > > hmmm... if that doesn't work, you might try overriding the PLAF for that > component. > > On Thu, 7 Oct 1999, Jacob Nikom wrote: > > > Hi, > > > > I am trying to change the font style and size on some > > of the Swing widgets, mostly JSlider (tick marks numbers), TabbedPanes > > (tab names), etc. You cannot not set them up > > directly with setFont. > > > > I could not find any information how to do it. Do you > > have any idea how to do it? > > > > Thank you, > > > > Jacob Nikom > > > > > > -- > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Api Linux
Rogério Garibalde Miranda wrote:
>
> How can I make a call to an API of the linux using java? I want to add an
> user to the linux, for example. thank you.
>
> Rogerio G Miranda
If you want to call native C/C++ APIs, you'll need to use the Java
Native Interface to write a native method that accepts arguments from
Java, converts them as needed, and makes the API calls.
If you want to run Linux programs, you can do that with the
Runtime.exec() calls. For example:
Runtime.getRuntime().exec("/usr/sbin/adduser foobar");
Nathan
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Api Linux
If you have to call C routine from Java, use JNI. It works well under Java on Linux. Jacob Nikom Rogério Garibalde Miranda wrote: > > How can I make a call to an API of the linux using java? I want to add an > user to the linux, for example. thank you. > > Rogerio G Miranda > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Api Linux
On Fri, 8 Oct 1999, [iso-8859-1] Rogério Garibalde Miranda wrote:
> How can I make a call to an API of the linux using java? I want to add an
> user to the linux, for example. thank you.
>
I think the following method may be useful:
public int execSystemCommand(String cmdLine)
throws InterruptedException {
Process p = Runtime.getRuntime().exec(cmdLine);
return p.waitFor(); // by convention '0' means normal termination
}
Good luck.
--Antonio
DCA/FEEC/UNICAMP, Brazil.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Why is Linux thread locking so slow?
Hi folks,
I have a simple Java program where 2 threads spin in a tight loop each
grabbing the same lock and releasing it. This is on Linux x86 and has been
tested using GCJ 2.95.1, Blackdown JDK 1.1.7v3 (native threads), and
IBM JDK 1.1.8 (native threads). Note that I am on an SMP system (IBM
Netfinity Dual PIII Xeon).
When the lock is uncontended, performance is fine: about 2,000 loop
iterations per millisecond. But with more than one thread trying to
grab the lock, performance decreases considerably: down to 25 or 30
iters/millisecond!
Note that GCJ, IBM, and Sun's JDK all exhibit the same performance penalty
for contended locks. So I'm thinking this is a Linux Threads issue, not
a GCJ issue. However, I can't seem to duplicate the same problem
when writing a simple pthreads program in C -- the C program performance
doesn't decrease anywhere near as badly as Java. I believe I am using the
same locking mechanisms in C as are used in GCJ. I don't know how they
are implemented in the Sun and IBM JDK's, but I suspect it's similar.
Note also that using Green Threads on the Sun JDK has pretty reasonable
performance even in the contended case, as we would expect. Native Threads
are the culprit.
Both programs are appended below. Can someone shed some light on why
contended locks on Linux perform so poorly?
Thanks!
Matt Welsh, UC Berkeley
---
/* TestLock.java
* Compile with: gcj -O2 -o TestLock --main=TestLock TestLock.java
* Run as: ./TestLock
*/
import java.lang.*;
public class TestLock implements java.lang.Runnable {
public Object lock;
public TestLock() {
lock = new Object();
Thread t1 = new Thread(this);
Thread t2 = new Thread(this);
t1.start();
t2.start();
}
public void run() {
int i=0;
long before, after;
before = System.currentTimeMillis();
while (true) {
synchronized(lock) {
i++;
if (i%10 == 0) {
after = System.currentTimeMillis();
printTime(before, after, 10);
before = after;
}
}
}
}
private static void printTime(long long1, long long3, int int5) {
long long6 = long3 - long1;
double double8 = (double) int5 / (double) long6;
double double10 = double8;
System.out.println( int5 + " iterations in " + long6 +
" milliseconds = " + double10
+ " iterations per millisecond" );
}
public static void main(String args[]) {
TestLock tl = new TestLock();
}
}
-
/* lock-test.c
* Compile with: gcc -O2 -o lock-test lock-test.c -lpthread
* Run with: ./lock-test
*/
#define MAX_THREADS 2
#include
#include
#include
pthread_key_t _Jv_ThreadKey;
pthread_mutex_t themutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
struct my_starter {
void (*method) (void *);
int tnum;
char *name;
};
int my_mutex_lock() {
return pthread_mutex_lock(&themutex);
}
int my_mutex_unlock() {
return pthread_mutex_unlock(&themutex);
}
void *my_start(void *x) {
struct my_starter *info = (struct my_starter *)x;
pthread_setspecific (_Jv_ThreadKey, info);
info->method(info);
return NULL;
}
void print_time(char *name, struct timeval *before, struct timeval *after, int num) {
float msec = ((after->tv_sec) - (before->tv_sec)) * 1.0e3;
msec += ((after->tv_usec) - (before->tv_usec)) / 1.0e3;
fprintf(stderr,"%s: %d iters in %f msec, or %f iters/msec\n",
name, num, msec, num/msec);
}
void *my_threadrun(void *x) {
struct my_starter *info = (struct my_starter *)x;
int i = 0;
struct timeval before, after;
fprintf(stderr,"my_threadrun called for %s\n", info->name);
gettimeofday(&before, NULL);
for (;;) {
my_mutex_lock();
i++;
if ((i%10) == 0) {
gettimeofday(&after, NULL);
print_time(info->name, &before, &after, 10);
gettimeofday(&before, NULL);
}
my_mutex_unlock();
}
}
int main(int argc, char **argv) {
int i;
pthread_key_create (&_Jv_ThreadKey, NULL);
for (i = 0; i < MAX_THREADS; i++) {
struct sched_param param;
pthread_attr_t attr;
struct my_starter *info;
pthread_t thread;
fprintf(stderr,"CREATING THREAD %d\n", i);
param.sched_priority = 0;
pthread_attr_init (&attr);
pthread_attr_setschedparam (&attr, ¶m);
info = (struct my_starter *) malloc (sizeof (struct my_starter));
info->tnum = i;
info->method = my_threadrun;
info->name = (char *)malloc(80);
sprintf(info->name,"thread-%d", i);
pthread_create (&thread, &attr, my_start, (void *) info);
//pthread_attr_destroy (&attr);
}
fprintf(stderr,"main() spinning.\n");
for (;;) ;
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
More Newbie questions
Thanks to everyone that helped me with my last problem but now I get this error when I run java (compiles file): Exception in thread "main" java.lang.NoSuchMethodError : main I thought it was my code, but I've tried it with example servlets from both the jserv implementation as well as the jsdk2.0. I am compiling it in the directory /home/admin. Here is my updated profile info: PATH=/usr/local/jdk1.2/bin:/usr/local/jsdk2.0/bin:/usr/local/jsdk2.0/lib/jsd k.jar:/usr/sbin:/usr/bin:/sbin:/bin DISPLAY=:0 JAVA_HOME=/usr/local/jdk1.2 CLASSPATH=.:/home/admin:/usr/local/jdk1.2/jre/lib/rt.jar:/usr/local/jsdk2.0/ lib/jsdk.jar _ Get Your Free Email at http://www.webpipe.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Help on installing Jserv
Have you tried JRun? It's a lot easier to configure and supports the jsp 1.0 spec as well as the new servlet spec www.allaire.com look for jrun on index page Brian -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Newbie Question
java.servlet is not in the base distributionYou need to go to javasoft and download the JSWDK and then include the libs in there to compile your app Brian On Fri, 8 Oct 1999, Don Hatch wrote: > I'm new to java on Linux but have experience with programming java on > Windows. I'm having some problems compiling servlets. When I run javac on > simple servlets it complains saying that it can't find javax.servlet or > javax.servlet.http or Superclass HttpServlet. I'm using Debian 2.1 and > jdk1.2 Here is my profile info: > > PATH=/usr/local/jdk1.2/bin:/usr/local/jsdk2.0/bin:/usr/local/sbin:/usr/local > /bin:/usr/sbin:/sbin:/bin:/usr/X11R6/bin > DISPLAY=:0 > JAVA_HOME=/usr/local/jdk1.2 > CLASSPATH=.:$JAVA_HOME/lib/classes.zip:/usr/local/jdk1.2/jre/lib/rt.jar > > Any help would be appreciated, > > Don Hatch > > > _ > Get Your Free Email at http://www.webpipe.net > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Newbie to JDK
Group, Newbie here.. I want to run an ASP application that required the JDK to run. How do I know if the JDK has been installed properly? I am running Redhat 6.0 on an intel.. Downloaded software and 'I think' it is installed properly. What is a test I can run ? Eric
Re: Why is Linux thread locking so slow?
Juergen, You are absolutely right. This one was staring me right in the face and I didn't even know it; the C program now runs about as badly as the Java program (I suppose this is a good thing, no?) The only change was the do a pthread_join() rather than a busy loop in the main thread. Thanks for the help. Matt Welsh -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Why is Linux thread locking so slow?
> Matt Welsh writes:
Matt> I have a simple Java program where 2 threads spin in a tight
Matt> loop each grabbing the same lock and releasing it. This is
Matt> on Linux x86 and has been tested using GCJ 2.95.1, Blackdown
Matt> JDK 1.1.7v3 (native threads), and IBM JDK 1.1.8 (native
Matt> threads). Note that I am on an SMP system (IBM Netfinity
Matt> Dual PIII Xeon).
_Dual_ and the 'for (;;) ;' loop are the explanation here:
Looks like most of time the main thread of your C programm is on one
cpu, while the other two threads are on the other. This means the two
threads don't really contend for the mutex. Each of the two threads
gets its time-slice, and while one thread is sleeping the other one
unlocks and immediately re-locks the mutex.
If you make sure that the main thread doesn't consume that much CPU
time the contention will be stronger and the C program should show the
same behavior as the Java code.
Matt> int main(int argc, char **argv) {
Matt> int i;
pthread_t thread;
Matt> pthread_key_create (&_Jv_ThreadKey, NULL);
Matt> for (i = 0; i < MAX_THREADS; i++) {
Matt> struct sched_param param;
Matt> pthread_attr_t attr;
Matt> struct my_starter *info;
Matt> fprintf(stderr,"CREATING THREAD %d\n", i);
Matt> info = (struct my_starter *) malloc (sizeof (struct my_starter));
info-> tnum = i;
info-> method = my_threadrun;
info-> name = (char *)malloc(80);
Matt> sprintf(info->name,"thread-%d", i);
Matt> pthread_create (&thread, &attr, my_start, (void *) info);
Matt> }
Matt> fprintf(stderr,"main() spinning.\n");
pthread_join(thread, NULL);
Matt> }
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Porting Team
http://www.blackdown.org/java-linux.html
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Api Linux
Hi,
Be careful - that code snippet can cause deadlock, ie, execSystemCommand
will never return, at least on some systems. This is caused by an
undocumented "feature": there are output streams coming from the Process
object, and if these streams' buffers fill up, execution will stop until
someone else reads bytes from the streams. Since in your code snippet
there is nobody reading from these streams, deadlock can occur.
Cheers,
dstn.
> I think the following method may be useful:
>
> public int execSystemCommand(String cmdLine)
>throws InterruptedException {
>Process p = Runtime.getRuntime().exec(cmdLine);
>return p.waitFor(); // by convention '0' means normal termination
> }
-- Dustin Lang, [EMAIL PROTECTED]--
User, n.: a particularly slow and unreliable input/
output device that is attached by default to the
standard input and output streams.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Api Linux
try this http://java.sun.com/docs/books/tutorial/native1.1/ maybe it can help. -Mensagem original- De: Jacob Nikom <[EMAIL PROTECTED]> Para: Rogério Garibalde Miranda <[EMAIL PROTECTED]> Cc: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]> Data: Sexta-feira, 8 de Outubro de 1999 18:03 Assunto: Re: Api Linux >If you have to call C routine from Java, use JNI. >It works well under Java on Linux. > >Jacob Nikom > >Rogério Garibalde Miranda wrote: >> >> How can I make a call to an API of the linux using java? I want to add an >> user to the linux, for example. thank you. >> >> Rogerio G Miranda >> >> -- >> To UNSUBSCRIBE, email to [EMAIL PROTECTED] >> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > >-- >To UNSUBSCRIBE, email to [EMAIL PROTECTED] >with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: More Newbie questions
Maybe read the documentation on the sun site about Java and then look at the docs on the servlet api and how to do some of the stuff. It seems that you aren't grasping the basics of the tools of the java language. Your last question exhibits that exception because there isn't supposed to be a main method in a servlet. They are meant to be run with a servletrunner, or with a webserver supporting servlets, like apache with jserv, JRun, or Jetty. Good luck. But please maybe read the main java site and understand the tools first. Cheers James. Don Hatch wrote: > Thanks to everyone that helped me with my last problem but now I get this > error when I run java (compiles file): > > Exception in thread "main" java.lang.NoSuchMethodError : main > > I thought it was my code, but I've tried it with example servlets from both > the jserv implementation as well as the jsdk2.0. I am compiling it in the > directory /home/admin. Here is my updated profile info: > > PATH=/usr/local/jdk1.2/bin:/usr/local/jsdk2.0/bin:/usr/local/jsdk2.0/lib/jsd > k.jar:/usr/sbin:/usr/bin:/sbin:/bin > DISPLAY=:0 > JAVA_HOME=/usr/local/jdk1.2 > CLASSPATH=.:/home/admin:/usr/local/jdk1.2/jre/lib/rt.jar:/usr/local/jsdk2.0/ > lib/jsdk.jar > > _ > Get Your Free Email at http://www.webpipe.net > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: required Libraries
Okay, here's how I understand the Blackdown builds of the VM: there is a fully dynamic version and a static version. To switch between them, you set an environment variable (I think). If you want to use the dynamically-linked VM, you have to have both X and Motif shared libraries on your system. As for Swing, if you go far enough up the class hierarchy, you'll find that all Swing components descend from AWT's Component class, which means (unfortunately or fortunately) that Swing really does use native X and Motif at its most base level. The widgets themselves don't have native peers, true, but in order to draw, Swing uses facilities of X and Motif. I don't know the full down'n'dirty details, just that Swing does need X and Motif libraries. Unfortunately, I don't know if there's any way to get around it (besides the statically-linked version of Blackdown's port of the VM). --Jeff Jacob Nikom wrote: > > Hi, > > I am interested in this discussion, but I am trying to convert it into > more > plain English. I always thought that the lightweight components are > peerless. > They don't need X libraries and work "directly" with OS and hardware. > > Swing was claimed as lightweight component based package, so it should > not > need X or Windows. On contrary, AWT was claimed to be heavyweight based > component package, that is why it needs X - is it true? Is it different > on > Solaris, Windows or Linux? > > Also, "libXm appears to be statically linked into libawt.so" - does it > mean > that X modules were compiled and placed into libawt.so library, so in > reality > you call X, but you don't need to link with it? > > Thank you, > > Jacob Nikom > > Nathan Meyers wrote: > > > > Jeff Galyan wrote: > > > > > > Java *always* requires Motif and X libraries. Even on Solaris. End of > > > story. > > > > "Requires" meaning that Blackdown requires an *external* libXm? Not > > necessarily. JDK1.2pre2 certainly doesn't (libXm appears to be > > statically linked into libawt.so), and I believe something similar was > > done for some of the JDK1.1 executables and/or libraries. > > > > Nathan > > > > > > > > Carsten Hoeger wrote: > > > > > > > > On Sat, Oct 02, Jeff Galyan wrote: > > > > > > > > > Actually, libXm.so is Motif, which is required by AWT, and therefore > > > > > Java. You'll need to get a Motif distribution (I use RedHat Motif 2.1.10 > > > > > with no problems). > > > > > > > > That's not true! > > > > > > > > There are both, static and dynamic linked versions of the java > > > > vm. The dependency to libXm results from the dynamical linked > > > > version. > > > > > > > > The static linked version of java _does_ _not_ _need_ Motif > > > > Runtime Libraries!!! > > > > > > > > -- > > > > mit freundlichen Gruessen, > > > > > > > > Carsten Hoeger - SuSE Professional Services - > > > > > > > > SuSE GmbH, Schanzaeckerstr. 10, 90443 Nuernberg, Germany > > > > Tel: +49-911-7405356 Mo-Fr 09-17.00, Fax: +49-911-3206727 > > > > http://www.suse.de/bsupport/index.html Email: [EMAIL PROTECTED] > > > > > > > > Braune Blaetter schmeissen sich vom Baum und sind tot. > > > > Es ist Herbst. (O. Kalkofe) > > > > > > -- > > > Jeff Galyan > > > http://www.anamorphic.com > > > http://www.sun.com > > > jeffrey dot galyan at sun dot com > > > talisman at anamorphic dot com > > > Sun Certified Java(TM) Programmer > > > == > > > Linus Torvalds on Microsoft and software development: > > > "... if it's a hobby for me and a job for you, why are you doing such a > > > shoddy job of it?" > > > > > > The views expressed herein do not necessarily reflect those of my > > > employer. > > > > > > Sun Microsystems, Inc., has no connection to my involvement with the > > > Mozilla Organization. > > > > > > -- > > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > > > -- > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- Jeff Galyan http://www.anamorphic.com http://www.sun.com jeffrey dot galyan at sun dot com talisman at anamorphic dot com Sun Certified Java(TM) Programmer == Linus Torvalds on Microsoft and software development: "... if it's a hobby for me and a job for you, why are you doing such a shoddy job of it?" The views expressed herein do not necessarily reflect those of my employer. Sun Microsystems, Inc., has no connection to my involvement with the Mozilla Organization. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Changing the font on Swing slider
Yeah... I think it is in com.sun.plaf.DefaultLookAndFeel or something like that. On Fri, 8 Oct 1999, Jacob Nikom wrote: > Do you know where the information about > current settings is located? > > Jacob > > [EMAIL PROTECTED] wrote: > > > > hmmm... if that doesn't work, you might try overriding the PLAF for that > > component. > > > > On Thu, 7 Oct 1999, Jacob Nikom wrote: > > > > > Hi, > > > > > > I am trying to change the font style and size on some > > > of the Swing widgets, mostly JSlider (tick marks numbers), TabbedPanes > > > (tab names), etc. You cannot not set them up > > > directly with setFont. > > > > > > I could not find any information how to do it. Do you > > > have any idea how to do it? > > > > > > Thank you, > > > > > > Jacob Nikom > > > > > > > > > -- > > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > > > > > > -- > > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Applet transparency?
Hmmm... you may have some difficulty with this. In Eterm, for example, (not Java, I know, but it's a good example of this) the application basically just queries the root window of the display for its background, gets a clip region of the background based on the application's geometry and such, and sets its own background to be that clip region, creating the illusion of transparency. Probably the easiest way to do it from Java would be via JNI, but you can't do that with applets usually. You might be able to get it to work with a signed applet, but I'm not sure how you'd deal with delivering the native library (and then you have the headache of porting the native code to whatever platforms you want to support). Before giving up on it, though, you might want to look at the Toolkit class and see if it has any methods that can get the root window background (I've never checked). --Jeff "Roll, Greg" wrote: > > Hi All, > > Anyone know if there a way to set an applets background color to be > transparent? > > Greg E. Roll > > BT Office Products Intl. > Interface/Conversions Team > phone - (817) 323-1300 ext. 2921 > e-mail - [EMAIL PROTECTED] > > > Name: Tech Tools.gif >Tech Tools.gifType: GIF Image (image/gif) > Encoding: base64 -- Jeff Galyan http://www.anamorphic.com http://www.sun.com jeffrey dot galyan at sun dot com talisman at anamorphic dot com Sun Certified Java(TM) Programmer == Linus Torvalds on Microsoft and software development: "... if it's a hobby for me and a job for you, why are you doing such a shoddy job of it?" The views expressed herein do not necessarily reflect those of my employer. Sun Microsystems, Inc., has no connection to my involvement with the Mozilla Organization. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
