Re: Ability to reload class files
Steve Byrne wrote: > Apache's mod_jserv does this, and the code is small enough to be easily > comprehensible. > I just recently looked over this code, and it is interesting, but I don't think it quite does what's described: As far as I understand it: - They have a ClassLoader implementation that can report if a *directly* loaded class file has been changed. - Before running a servlet, jserv asks the class loader if there's been a change to any of its classes. - If yes, it throws away the current class loader, and instantiates a brand new one. By default, this causes instances belonging to the old loader to also be trashed. AFAIK, this only detects changes in directly loaded classes, but not transitively loaded ones. So, this is kind of interesting... I was wondering what it'd be like to combine this with an IDE to be able to better adapt to changes. Not sure how applicable it is. - Robb -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
java and multithreading
Hi, I am new at this mailinglist so I am not sure if the following question
is still discussed.
I am a little bit astonished about the java multithreating under linux. For
me it looks like that the multithreading with the semantic java is much
better.
For example I tried the following programm:
class TestThread extends Thread {
String txt;
public TestThread(String t){
txt = new String(t);
}
public void run(){
for( int i = 0; i < 100; i++){
System.out.println( txt);
}
}
}
class main{
public static void main(String[] args ){
TestThread one, two, three;
one = new TestThread(" one ");
two = new TestThread(" two ");
three = new TestThread(" three ");
one.start();
two.start();
three.start();
}
}
I expected following output:
one
two
three
one
two
three
...
or similar. Under win95 everything went fine.
Unter suse-linux 6.1 with jdk1.1.7 and TYA JIT I got following output:
one
one
one
.
.
.
two
two
two
.
.
.
three
three
three
.
.
.
This did not look like multithreading. It is the same if I use native
threads and not green threads.
Has anybody an idea how to write a real multithread programm under
linux. I have to know it because we wrote a server and we want to run it
under linux and not under windows.
Thanks for our help
Holger
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java and multithreading
H.Nolte wrt: > I am a little bit astonished about the java multithreating under linux. For > me it looks like that the multithreading with the semantic java is much > better. > > ... > I expected following output: > > one > two > three > one > two > three > ... > > or similar. Under win95 everything went fine. > Unter suse-linux 6.1 with jdk1.1.7 and TYA JIT I got following output: > > one > one > one > . > . > . > two > two > two > . > . > . > three > three > three > . > . > . > > > This did not look like multithreading. It is the same if I use native > threads and not green threads. > Has anybody an idea how to write a real multithread programm under > linux. I have to know it because we wrote a server and we want to run it > under linux and not under windows. no, you haven't got it. onetwothree onetwothree onetwothree is single-threaded. multithreaded means you get no guarantees about when which instruction is executed, except as stated in the documentation about synchronized code and monitors. read the documentation again. dog -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java and multithreading
Well,
here is a little programm that works pretty well. Note that the
sleep part is to allow other Threads to take over the cpu for a while.
There are other ways to achieve this, but this one is, to my opinion, the
simplest one:
import java.awt.*;
public class test implements Runnable {
private String strg;
Thread runner;
test(String strg) {
this.strg = strg;
}
public void start() {
if(runner == null) {
runner = new Thread(this);
runner.start();
}
}
public void stop() {
if(runner != null) {
runner.stop();
runner = null;
}
}
public void run() {
while(true) {
System.out.println(this.strg);
try {
Thread.sleep(1);
} catch(Exception e) {
}
}
}
public static void main(String[] args) {
test tst1 = new test("Foo");
test tst2 = new test("bar");
tst1.start();
tst2.start();
}
}
Hope this helps...
Papi
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java and multithreading
On Tue, 11 May 1999 15:38:40 +0200, Nolte, Holger wrote: >Hi, I am new at this mailinglist so I am not sure if the following question >is still discussed. >I am a little bit astonished about the java multithreating under linux. For >me it looks like that the multithreading with the semantic java is much >better. Well, you are just assuming that threads of equal priority will switch between each printout in your code. In fact, the Java spec says that threads do not have to yield unless they are blocked by something (I/O or a monitor lock or...) In any multi-threaded program (even non-Java) you can not assume the size of your timeslice (as in how much work you can get done) except in what would be a "hard realtime system" and even then things can get interesting when you do not code in assembly (you do not know how many cycles a bit of code is unless you know exactly what the instructions are) As such, a large time slice or a very fast bit of code would make your little test have the 100 lines of output per thread happen all in one timeslice. (Depending on the buffering in the output stream, this is not hard to do in today's hardware) Michael Sinz -- Director of Research & Development, NextBus Inc. mailto:[EMAIL PROTECTED] - http://www.nextbus.com My place on the web ---> http://www.users.fast.net/~michael_sinz -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java and multithreading
Hi, <... prg deleted> > This did not look like multithreading. It is the same if I use native > threads and not green threads. > Has anybody an idea how to write a real multithread programm under > linux. I have to know it because we wrote a server and we want to run it > under linux and not under windows. The Linux output makes perfekt sense to me, and it it what I expected. I'm not exactly familiar how the java thread semantic is defined, but it certainly isn't defined like you think it is... The example you gave uses multithreading, but each thread needs less than a timeslice, so it can complete its output before it is interupted by another thread. Try an infinite while loop in the thread (or some time consuming calculation) and you will see the timeslicing. BTW: The windows output on the other hand seems very strange, the VM has to change the thread context at each println-call... Sounds not very performance promoting... -- Bye Georg Acher, [EMAIL PROTECTED] http://www.in.tum.de/~acher/ "Oh no, not again !" The bowl of petunias -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java and multithreading
Hi. I'd like to comment a few points (please, correct me if I'm wrong): Papi: >here is a little programm that works pretty well. Note that the > sleep part is to allow other Threads to take over the cpu for a while. > There are other ways to achieve this, but this one is, to my opinion, the > simplest one: I think that yield() is as simple as sleep(1) and it can do better: sleep(1) will make your thread sleep even if there are no more threads to run. yield() will do it only if there are other (same or higher priority?) threads to run. Michael: > Well, you are just assuming that threads of equal priority will switch > between each printout in your code. > > In fact, the Java spec says that threads do not have to yield unless they > are blocked by something (I/O or a monitor lock or...) That's perfectly right and, therefore, I think I can conclude that this is not: > As such, a large time slice or a very fast bit of code would make your > little test have the 100 lines of output per thread happen all in one > timeslice. (Depending on the buffering in the output stream, this is > not hard to do in today's hardware) Because even if your thread takes more than a timeslice to run, it will be perfectly able to continue so. Is that right? Best regards, -- Cassino -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java and multithreading
On Tue, 11 May 1999 11:40:22 -0300 (EST), Carlos Cassino wrote: > >Hi. > >I'd like to comment a few points (please, correct me if I'm wrong): > >Michael: > >> Well, you are just assuming that threads of equal priority will switch >> between each printout in your code. >> >> In fact, the Java spec says that threads do not have to yield unless they >> are blocked by something (I/O or a monitor lock or...) > >That's perfectly right and, therefore, I think I can conclude that this is not: > >> As such, a large time slice or a very fast bit of code would make your >> little test have the 100 lines of output per thread happen all in one >> timeslice. (Depending on the buffering in the output stream, this is >> not hard to do in today's hardware) > >Because even if your thread takes more than a timeslice to run, it will be >perfectly able to continue so. Is that right? The spec says it may continue to run. Or, if there is nothing else waiting to run it may continue. The spec for Java does not say that time slices need to be used but if they are, then the size of the slice will also affect the "behavior" of the multi-threading. This all gets down to the fact that in multi-threading there is not set way things will run unless/except at synchronization points. A JVM can be implemented such that each thread runs on its own CPU - now you have multiple threads actually running at the exact same time. What behavior will you get then? Or you can be on one CPU with pre-emption... Or it could be one CPU with cooperative multi-threading... If code depends on the interaction of threads without some form of synchronization or other locks/etc, then it will fail if the timeslice gets longer or the CPU gets faster or you get multiple CPUs or you have cooperative threading or... In other words, such code is broken :-) I was just trying to point out all of the different ways the output would be different than what the poster thought it "should" be. The code was written in such a way that it could be anything and would change as you changed the hardware (and in the Java world, as the JVM changed) since there was nothing in the code to make it deterministic as to its results. Michael Sinz -- Director of Research & Development, NextBus Inc. mailto:[EMAIL PROTECTED] - http://www.nextbus.com My place on the web ---> http://www.users.fast.net/~michael_sinz -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java and multithreading
there is also a good article on java multi threading n the java develpers journal vol3 issue 1 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
AW: java and multithreading
hi,
i still have some more questions about threads and the differences between
linux-windows95.
In my application I got a similar behaviour between linuxwin95 if I set the
Priority = 1 on linux. On win95 it is 5. Is the behaviour of these values
somewhere defiened or does it depende on the virtual machine. If it depends
on the virtual machine how can I write programms which behave same or
similar on both platforms ?
One solution might be that all threads must communicate during there
execution about the methode interrupt(). But I think that this is often very
inconvinient and (in my case) very difficult to implemente. So in my case it
would be the best if the behaviour of a thread is well defiened.
And still another question:
When should I use native threads, when green threads ? Is there
anywhere a paper about pro/contra of this both kind of threads ?
Thanks for discussing this questions
Holger
-Ursprüngliche Nachricht-
Von: Nolte, Holger [mailto:[EMAIL PROTECTED]]
Gesendet am: Dienstag, 11. Mai 1999 15:39
An: [EMAIL PROTECTED]
Betreff: java and multithreading
Hi, I am new at this mailinglist so I am not sure if the following question
is still discussed.
I am a little bit astonished about the java multithreating under linux. For
me it looks like that the multithreading with the semantic java is much
better.
For example I tried the following programm:
class TestThread extends Thread {
String txt;
public TestThread(String t){
txt = new String(t);
}
public void run(){
for( int i = 0; i < 100; i++){
System.out.println( txt);
}
}
}
class main{
public static void main(String[] args ){
TestThread one, two, three;
one = new TestThread(" one ");
two = new TestThread(" two ");
three = new TestThread(" three ");
one.start();
two.start();
three.start();
}
}
I expected following output:
one
two
three
one
two
three
...
or similar. Under win95 everything went fine.
Unter suse-linux 6.1 with jdk1.1.7 and TYA JIT I got following output:
one
one
one
.
.
.
two
two
two
.
.
.
three
three
three
.
.
.
This did not look like multithreading. It is the same if I use native
threads and not green threads.
Has anybody an idea how to write a real multithread programm under
linux. I have to know it because we wrote a server and we want to run it
under linux and not under windows.
Thanks for our help
Holger
--
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]
javax.swing not found
* [EMAIL PROTECTED] wrote: > > > At 03:12 a.m. 01/05/99 -0600, you wrote: > > >Keep the javax.swing.* line, only remove javax.swing.preview. > > > > > >--Jeff > > > > Ok, thankyou, I understand, my problem is that I dont have the > javax> package > > How could I find it, I´m using Linux 5.2 whith JDK 1.1.7 and there is > > not any "javax" in the crs.zip (?) directory. > > Pick it up from Sun. You can get the current released Swing for JDK1.1 at > http://java.sun.com/products/jfc/download.html , or the Beta version for the > next release at http://developer.java.sun.com/developer/earlyAccess/jfc . > > Nathan > * Well, in my case I am also having a similar problem. I get the message java.lan.NoClassDefFoundError javax/swing/JApplet I am using Linux 6.0 with JDK1.2.1 (I am trying it as well at home with W95 and WNT). But in any case Swing does not work (Only the appletviewer). It seems to be that my Browser is also not yet prepared for Swing. When i look to the infos under Sun pages, they talk about installing the java plug-in. Sorry, but I thought that Swing, 2D and the plug-in was already integrated within JDK1.2.1 Can any one please help me? Is there anyone in Germany or even better in Frankfurt am Main, whith whom I eventually could get in contact per telephone? Thank you very much in advance. Javier -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: AW: java and multithreading
Threads are independent streams of execution that run concurrently (or at least with the appearance of concurrency), possibly on multiple CPUs. If you want to coordinate activity between threads -- such as determining a sequence in which output appears -- you have to use the tools available for thread coordination. That's why Java gives you constructs such as "synchronize" as part of the language. You cannot, should not, must not, rely on unspecified behavior, such as how much of a time slice each thread gets, whether threading is preemptive, the order in which threads get time slices, the relative time threads get for different priorities, etc. If you want to coordinate activity between threads, you're going to have to deal with "inconvenient and very difficult" programming. Java makes this task much easier than do other environments, but you still have work to do. Nathan > hi, > i still have some more questions about threads and the differences > between > linux-windows95. > In my application I got a similar behaviour between linuxwin95 if I set > the > Priority = 1 on linux. On win95 it is 5. Is the behaviour of these > values > somewhere defiened or does it depende on the virtual machine. If it > depends > on the virtual machine how can I write programms which behave same or > similar on both platforms ? > One solution might be that all threads must communicate during there > execution about the methode interrupt(). But I think that this is often > very > inconvinient and (in my case) very difficult to implemente. So in my > case it > would be the best if the behaviour of a thread is well defiened. - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
two-tier threading for Java-linux?
Is anyone working on getting a two-tier threading architecture going for java-linux? I haven't had much luck even in tracking down existing c-level implementation libraries - perhaps someone else has? I have some reservations about using the native threading implementations of the blackdown port because one java thread == one linux kernel thread, but linux kernel threads are a severely limited resource. I understand Linus' argument for keeping the current single-level linux scheduler (for both threads and processes), but the argument breaks down when one tries applying this order of restriction to essential language-level features like java threads (to be silly, would you accept a limit of only 1000 String instances?). My application uses many (1000s) simultaneous threads, but only during the development cycle: Essentially, the deployed system runs over a large network of peers (say, on 100 different cpus). Each peer needs a fairly small number (10s) of threads for natural operation. It is, um, inconvenient to give each developer a hundred or so machines for testing the system behavior. Altering the system to be targetted to a small number of peers renders the results uninteresting. So, for now, while I run my green-threaded java VM, I keep the other CPU of my SMP machine busy running seti@home and playing mp3s ... Cheers, -mik -- Michael Thome ([EMAIL PROTECTED]) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: javax.swing not found
Netscape doesn't (yet) work with Java 2, aka JDK 1.2, but you can view swing applets if you put the swing classes in Netscape's classpath. I use a shell script to launch it, setting the CLASSPATH appropriately, so that an environment variable I'm using won't interfere. For 1.2, you are stuck with appletviewer for now. The HotJava browser may also work. Haven't looked at it for some time... Russ [EMAIL PROTECTED] on 05/11/99 11:40:14 AM To: [EMAIL PROTECTED] cc: [EMAIL PROTECTED], [EMAIL PROTECTED] (bcc: Russell Pridemore/Lex/Lexmark) Subject: javax.swing not found * [EMAIL PROTECTED] wrote: > > > At 03:12 a.m. 01/05/99 -0600, you wrote: > > >Keep the javax.swing.* line, only remove javax.swing.preview. > > > > > >--Jeff > > > > Ok, thankyou, I understand, my problem is that I dont have the > javax> package > > How could I find it, I´m using Linux 5.2 whith JDK 1.1.7 and there is > > not any "javax" in the crs.zip (?) directory. > > Pick it up from Sun. You can get the current released Swing for JDK1.1 at > http://java.sun.com/products/jfc/download.html , or the Beta version for the > next release at http://developer.java.sun.com/developer/earlyAccess/jfc . > > Nathan > * Well, in my case I am also having a similar problem. I get the message java.lan.NoClassDefFoundError javax/swing/JApplet I am using Linux 6.0 with JDK1.2.1 (I am trying it as well at home with W95 and WNT). But in any case Swing does not work (Only the appletviewer). It seems to be that my Browser is also not yet prepared for Swing. When i look to the infos under Sun pages, they talk about installing the java plug-in. Sorry, but I thought that Swing, 2D and the plug-in was already integrated within JDK1.2.1 Can any one please help me? Is there anyone in Germany or even better in Frankfurt am Main, whith whom I eventually could get in contact per telephone? Thank you very much in advance. Javier -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
JDK1.2 and Swing
Hi --
I've noticed a very strange phenomenon: If I attempt to run a swing app
using JDK1.2, I always get the following exception:
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: Raster ShortInterleavedRaster: width
= 198 height = 78 #numDataElements 1 is incompatible with ColorModel
DirectColorModel: rmask=7c00 gmask=3e0 bmask=1f amask=0
at java.awt.image.BufferedImage.(BufferedImage.java:521)
at sun.awt.image.OffScreenImage.(OffScreenImage.java:70)
at
sun.awt.motif.MComponentPeer.createImage(MComponentPeer.java:286)
at java.awt.Component.createImage(Component.java:2079)
at java.awt.Component.createImage(Component.java:2077)
at
javax.swing.RepaintManager.getOffscreenBuffer(RepaintManager.java:517)
at javax.swing.JComponent.paint(JComponent.java:506)
at java.awt.Container.paint(Container.java:770)
at javax.swing.JFrame.update(JFrame.java:255)
at
sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:248)
at java.awt.Component.dispatchEventImpl(Component.java:2429)
at java.awt.Container.dispatchEventImpl(Container.java:1032)
at java.awt.Window.dispatchEventImpl(Window.java:714)
at java.awt.Component.dispatchEvent(Component.java:2289)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:258)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:68)
( BTW, I am also setting the os.name property to something like SunOS or
Windows, because otherwise I get a NullPointerException -- the UIManager
can not find the UIDefaults in the Hashtable.)
This occurs when I run the Blackdown port locally, and also when I run
the app on a Solaris box and set the remote display. My code simply
instantiates a blank JFrame and sets its bounds. I had the same problem
with a RedHat 5.1 and now the RedHat 6.0 system. The error does not
occur when I use awt only. Nothing of the sort occured with JDK1.1.7 and
the latest swing release.
My window manager is WindowMaker 0.51. I am using GNOME, from the RedHat
6 dist.
My code looks like this:
begin TestFrame.java --
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestFrame extends JFrame
{
public TestFrame(String title)
{
super(title);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
TestFrame.this.dispose();
System.exit(0);
}
});
setBounds(250,250,200,100);
setBackground(Color.white);
show();
}
public static void main(String[] args)
{
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception ex_ignored)
{
// default l&f left in place
}
new TestFrame("Test");
}
}
- end -
--
Armen Yampolsky
Axiom Software Labs
New York
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: two-tier threading for Java-linux?
I think Phill Edwards <[EMAIL PROTECTED]> plans to rewrite Linux's pthread package. You are right that the current state of linux- threads is unacceptable for a Java run-time, as is evident in the state of the 1.1.7native port. Implementing a hybrid architecture that would map multiple user-level threads on one or more kernel threads (as in Solaris) will still require kernel support, however. You guys need to convince Linus that that's necessary. He's looking at it only from the kernel perspective. I'm not sure what's actually needed. I'd guess you'd need at least a signal like SIGLWP, "all kernel threads are blocked", possibly another signal for cancel(?). You may be able to use some existing signals like linux-threads does, but I'd guess you run out at some point (doesn't Linux still have the only 32bit/signal mask restriction?) - Godmar -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: JDK1.2 and Swing
Thanks to everyone for the tip -- indeed, it was a color depth problem. In fact, I did have it at 16bpp in my XF86Config file, but when I changed it to 15 all the exceptions went away! On another note, I mucked around a bit with the fonts.properties -- basically changing the zapf dingbats lines to match my own, as I already had those installed. In spite of the fact that I don't get any font error messages, things look rather ugly. Does anyone know of a good fonts.properties file floating anywhere for 1.2 on RedHat Linux? Thanks again! -Armen "Alexander V. Konstantinou" wrote: > You need to switch your display to 16bpp depth. JDK1.2 has problems in > many cases dealing with 32bpp and 24bpp displays. > > Alexander > > On Tue, May 11, 1999 at 06:55:19PM +, Armen Yampolsky wrote: > > Hi -- > > > > I've noticed a very strange phenomenon: If I attempt to run a swing app > > using JDK1.2, I always get the following exception: > > > > Exception occurred during event dispatching: > > java.lang.IllegalArgumentException: Raster ShortInterleavedRaster: width > > = 198 height = 78 #numDataElements 1 is incompatible with ColorModel > > DirectColorModel: rmask=7c00 gmask=3e0 bmask=1f amask=0 -- Armen Yampolsky Axiom Software Labs New York -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
...
Now with the release of 1.1.7_v3 I was thinking of reinstalling it with Swing 1.1.1x and was wondering what the difference between that setup and jdk1.2prev1 would be. As far as abilities to do certain things. Thanks in advance. -- (: Riyad Kalla :) (:CS Major - U of A :) (: http://www.u.arizona.edu/~rsk :) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: javax.swing not found
javier ganzarain wrote: > > * > Well, in my case I am also having a similar problem. I get the message > java.lan.NoClassDefFoundError javax/swing/JApplet > > I am using Linux 6.0 with JDK1.2.1 (I am trying it as well at home with > W95 and WNT). But in any case Swing does not work (Only the > appletviewer). Make sure you do not have any CLASSPATH environment variable set - Java 2 has default search paths for the core classes, and gets confused if you have a CLASSPATH env var set. If you have given a package name to your own code, you only need to add that path with the -classpath flag -everything else happens automatically. You might also want to look in your Java directories to see if you have all the jar files that should have come with your download (dt.jar, tools.jar in jdk1.2/lib are the most important ones; jdk1.2/jre/lib/ext should have iiimp.jar and any third-party jar files you add to it). The dt.jar file should have the javax.swing.* classes in it. > > It seems to be that my Browser is also not yet prepared for Swing. When > i look to the infos under Sun pages, they talk about installing the java > plug-in. Sorry, but I thought that Swing, 2D and the plug-in was > already integrated within JDK1.2.1 > > Can any one please help me? Netscape doesn't use the version of Java you have installed on your local system to run applets - it uses its own internal version. You can get Swing applets working in Netscape by copying swingall.jar from the standalone Swing 1.1.X release to Netscape's "java/classes" directory (or whatever they're calling it these days). -- 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]
A question with JDK 1.2...
Hi, I have download the bz2 files for the JDK1.2. When I uncompressed them using bunzip2, the jre file is ok, but the jdk failed. would you please tell me where I could get the gzip version of these files? I need them for an urgent experiement. Thanks, Chen, Xuan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: JDK 1.1.7v2 Anywhere?
On Tue, 11 May 1999 17:26:07 -0500, Sterling Moses wrote: >I have checked the blackdown site and have not found a copy of the JDK >1.1.7v2. Have I missed it? Does anyone know where this can be found. > >I am trying to fix the error "undefined symbol: _dl_symbol_value" > >Any help would be appreciated. The 1.1.7 v2 release was skipped (well, as we were going to release it we fixed two more bugs and in order not to confuse things we named the next build v3) Anyway, the 1.1.7 v3 release should be making its way to the blackdown mirror sites now. Give it a day or two for the mirrors to get caught up and things should be better. (This is x86 Linux glibc version) From README.linux for JDK 1.1.7, Version 3 05/09/99 This is the Blackdown Java-Linux port of JDK 1.1.7 to Linux. - Includes numerous bug fixes direct from Sun - Additional bug fixes by the Blackdown Java-Linux Porting Team - Fix for kernel accept() bug, caused slow Java Web Server - turn-off by: export JDK_NO_KERNEL_FIX=true New in version 2: - (compiles and) runs on glibc 2.1 - Native threads update - AWT fixes - Keys off of the DISPLAY variable to automatically pick NS_JAVA when there is no X server. - Invocation API: Fixed default classpath returned by JNI_GetDefaultJavaVMInitArgs. New in version 3: - Support for Numpad keys (with the exception of JDC bug #4083691) - Keyboard shortcuts work with the default X configuration - Includes numerous bug fixes direct from Sun (1.1.7B) Michael Sinz -- Director of Research & Development, NextBus Inc. mailto:[EMAIL PROTECTED] - http://www.nextbus.com My place on the web ---> http://www.users.fast.net/~michael_sinz -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
JDK 1.1.7v2 Anywhere?
I have checked the blackdown site and have not found a copy of the JDK 1.1.7v2. Have I missed it? Does anyone know where this can be found. I am trying to fix the error "undefined symbol: _dl_symbol_value" Any help would be appreciated. Sterling Moses [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: JDK 1.1.7v2 Anywhere?
You will find it at http://www.wisp.net/~kreilede -- Aravind > -Original Message- > From: Sterling Moses [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 12 May 1999 08:26 > To: Java-Linux List > Subject: JDK 1.1.7v2 Anywhere? > > > I have checked the blackdown site and have not found a copy of the JDK > 1.1.7v2. Have I missed it? Does anyone know where this can be found. > > I am trying to fix the error "undefined symbol: _dl_symbol_value" > > Any help would be appreciated. > > Sterling Moses > [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: JDK1.2 and Swing
Armen,
I had a similar problem. After handling all of the
"know bugs", Swing applications would fail but
awt was ok. It was suggested to me that the configuration
of my Xserver may be a problem. The suggestion was to
move to 16 bit color (not 24 or 32) on the XFree86. It was also
pointed out that this problem went away for someone
that changed their Xserver to AcceleratedX (a product
of Xi Graphics). The latter is what I had experienced.
I had already ordered AcceleratedX, and when I
installed it, the Swing components started working.
I hope this is of use.
respectfully
David R. Thompson
_
David R.Thompson
Los Alamos National Laboratory
TSA 5
wk.ph:505.665.5572
email: [EMAIL PROTECTED]
_
On Tue, 11 May 1999, Armen Yampolsky wrote:
> Hi --
>
> I've noticed a very strange phenomenon: If I attempt to run a swing app
> using JDK1.2, I always get the following exception:
>
> Exception occurred during event dispatching:
> java.lang.IllegalArgumentException: Raster ShortInterleavedRaster: width
> = 198 height = 78 #numDataElements 1 is incompatible with ColorModel
> DirectColorModel: rmask=7c00 gmask=3e0 bmask=1f amask=0
> at java.awt.image.BufferedImage.(BufferedImage.java:521)
> at sun.awt.image.OffScreenImage.(OffScreenImage.java:70)
> at
> sun.awt.motif.MComponentPeer.createImage(MComponentPeer.java:286)
> at java.awt.Component.createImage(Component.java:2079)
> at java.awt.Component.createImage(Component.java:2077)
> at
> javax.swing.RepaintManager.getOffscreenBuffer(RepaintManager.java:517)
> at javax.swing.JComponent.paint(JComponent.java:506)
> at java.awt.Container.paint(Container.java:770)
> at javax.swing.JFrame.update(JFrame.java:255)
> at
> sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:248)
> at java.awt.Component.dispatchEventImpl(Component.java:2429)
> at java.awt.Container.dispatchEventImpl(Container.java:1032)
> at java.awt.Window.dispatchEventImpl(Window.java:714)
> at java.awt.Component.dispatchEvent(Component.java:2289)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:258)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:68)
>
> ( BTW, I am also setting the os.name property to something like SunOS or
> Windows, because otherwise I get a NullPointerException -- the UIManager
> can not find the UIDefaults in the Hashtable.)
>
> This occurs when I run the Blackdown port locally, and also when I run
> the app on a Solaris box and set the remote display. My code simply
> instantiates a blank JFrame and sets its bounds. I had the same problem
> with a RedHat 5.1 and now the RedHat 6.0 system. The error does not
> occur when I use awt only. Nothing of the sort occured with JDK1.1.7 and
> the latest swing release.
>
> My window manager is WindowMaker 0.51. I am using GNOME, from the RedHat
> 6 dist.
>
> My code looks like this:
>
>
> begin TestFrame.java --
> import java.awt.*;
> import java.awt.event.*;
> import javax.swing.*;
>
> public class TestFrame extends JFrame
> {
>
> public TestFrame(String title)
> {
> super(title);
>
> addWindowListener(new WindowAdapter()
> {
> public void windowClosing(WindowEvent e)
> {
> TestFrame.this.dispose();
> System.exit(0);
> }
> });
>
>
> setBounds(250,250,200,100);
> setBackground(Color.white);
> show();
> }
>
> public static void main(String[] args)
> {
> try
> {
>
> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
> }
> catch (Exception ex_ignored)
> {
> // default l&f left in place
> }
>
> new TestFrame("Test");
> }
> }
> - end -
>
>
> --
> Armen Yampolsky
> Axiom Software Labs
> New York
>
>
>
> --
> 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: Access Violation
---Reply to mail from Farhan Killedar about Access Violation > The error message is: > > sj -g -classpath > C:\VisualCafePDE\Programming\;C:\VISUALCAFEPDE\BIN\COMPONENTS\SYMBEANS.JAR;C > :\VISUALCAFEPDE\JAVA\LIB\;C:\VISUALCAFEPDE\JAVA\LIB\SYMCLASS.ZIP;C:\VISUALCA > FEPDE\JAVA\LIB\CLASSES.ZIP;C:\VisualCafePDE\Projects\city.jar;C:\VisualCafeP > DE\JFC\swing.jar;C:\jdk1.2.1\src.jar;C:\jdk1.2.1\jre\lib\i18n.jar;C:\jdk1.2. > 1\jre\lib\jaws.jar;C:\jdk1.2.1\jre\lib\rt.jar;C:\jdk1.2.1\jre\lib\ext\iiimp. > jar;C:\WINDOWS\TemporaryInternetFiles\I5OPMVUN\f1.jar > C:\VisualCafePDE\Programming\ArabicExample.java > > Fatal Error: (Access Violation at 015F:02F8D844) > > > Thanks > Farhan > As noted, this is a Windows environment but ... sj is symantec's java compiler for windows. The cafe environment comes with its own classes. You have included in your path (or you have added to the cafe environment) the jdk classes. You can use the sj compiler, just don't include both the environment that came with cafe and your new jdk. Minimize your class path to what you need. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: JDK 1.1.7v2 Anywhere?
> http://www.wisp.net/~kreilede > I don't know about anybody else, but whenever i go to donwload it it seems to crash ie. stop before all the file has been recieved ?? why ??? I've tried a number of times ?? Is it available on another site perhaps ftp ..( i don't trust netscape for large files) ;) cya adn -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
RE: JDK 1.1.7v2 Anywhere?
Hi, I also had the same problem. It took me about 7 tries before I got it. -- Aravind > -Original Message- > From: Andrew [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 12 May 1999 14:44 > To: Aravind Selvaraje > Cc: Sterling Moses; Java-Linux List > Subject: RE: JDK 1.1.7v2 Anywhere? > > > > > http://www.wisp.net/~kreilede > > > > I don't know about anybody else, but whenever i go to donwload it it seems > to crash ie. stop before all the file has been recieved ?? > > why ??? I've tried a number of times ?? Is it available on another site > perhaps ftp ..( i don't trust netscape for large files) ;) > > > cya > > adn > > > > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
1.1.7 bug?
I've been haveing some probelms with the appletviewer and displaying graphics/swing over a remote x session with 1.1.7v1. I've never actually gotten it to work. The frame shows up, however it's blank, and remains so. Does 1.1.7v3 or 1.2 take care of this? It's just me? Have i missed something? thanx, -jj- http://www.cs.earlham.edu/~jeremiah -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
How to measure efficiency?
I have written an ftp-client (connected to the ftp-server residing at the same computer) which I tried to measure how fast it can handle I/O. I used getCurrentTimeMillis() (or similar) which gave me for the same config (retrieve 1meg, same file) sometimes values that differed by a factor of 2. Now, how can I get "valuable values". Maybe I missed a similar discussion, so I would be thankful for every pointer. -willi -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
