Re: How to do a thread dump from program?
On 8 Dec 1998, Juergen Kreileder wrote:
> > Mario Camou writes:
> Mario> public class Foo {
> Mario> private Vector data;
>
> Mario> public Vector getData() {
> Mario> if (data == null) {
> Mario> return null;
> Mario> }
> Mario> synchronized (data) {
> Mario> while (status != LOADED) {
> Mario> try {
> Mario> wait();
>
> Yes, that is 'this.wait()' and you're not the owner of this' monitor.
> (You're only the owner of data's monitor). To get this' monitor you'll
> have to use synchronized (this) or a synchronized method.
In other words, what you probably want to do here is data.wait();
if you're synchronizing on data, otherwise, you would nede to synchronize
on 'this'
[ more code snippets cut ]
> Mario> public void loadData() {
> Mario> data = new Vector();
> Mario> synchronized (data) {
> Mario> try {
> Mario> while (something) {
> Mario> SomeObject obj;
> Mario> // blah blah blah (create object obj and load data into it)
> Mario> data.addElement (obj);
> Mario> } finally {
> Mario> notifyAll();
>
> ditto
do a data.notifyAll(); if synchronizing on data, etc.
. . . Sean.
Re: Possible bug in Thread.stop()?
There's a very embroiled discussion about this very same topic on the advanced-java list. Basically, instead of doing a while(true) you should probably be doing something more on the lines of while(!isInterrupted()) and then use interrupt() instead of stop(). This will not only allow termination but also graceful exit without corrupting any data structures. For a cogent discussion about why you should almost never use Thread.stop(), see Doug Lea's excellent page at http://gee.cs.oswego.edu/dl/cpj/cancel.html . . . Sean.
Re: Problems with Threads
On Sat, 12 Dec 1998, Carlos Alberto Roman Zamitiz wrote: > I have a problem with threads: My java client contains 2 threads which > call to 2 methods. First thread calls method "x" into while(true) but when > second thread calls method "y", first thread must wait. When second thread > finish method "y" must notify and first thread will awake. > > But I receive this message: > java.lang.IllegalMonitorStateException: current thread not owner Your two threads must wait and notify on the same object, and must also be synchronized on the same object. . . . Sean.
Re: Problems with Threads (Code included)
On Mon, 14 Dec 1998, Carlos Alberto Roman Zamitiz wrote: > Hi, I attached my Cliente.java > I have 2 threads: Receptor and Transmisor. Receptor sends and receives > data from server, using method recibirPeticion(), forever (well, it sleeps > 3 seconds). When Transmisor sends data, using method enviarPeticion(), > Receptor must wait until Transmisor ends his transmition. > > I get > java.lang.IllegalMonitorStateException: current thread not owner You need to do just this.wait() and this.notifyAll(), notification happens on the object Receptor and not on the threads. . . . Sean.
Re: Problems with Threads (Code included)
> The use of 'this' is neither redundant nor allowed here -- the > methods (recibirPeticion() and enviarPeticion()) are static and > there is no 'this' in class methods. A 'synchronized static' method > synchronizes on the class object. Jeurgen is of course right, sorry I didn't take enough time to look at the code properly. I believe it is possible to do a wait() on the class object also, but it is better practice to synchronized on an explicit lock object as Juergen's example provides. . . . Sean.
RE: Jdk 1.1.7 and X-Server
On Fri, 22 Jan 1999, Michael Sinz wrote: > On Fri, 22 Jan 1999 11:24:40 -0500, Warren Johnson wrote: > > >I have a web page that can be accessed with a browser (IE4 and Netscape) > >called Build the Snowman. On the left frame is the beginning template of > >the snowman on the right frame is stuff like clothes, hats, etc... On the > >bottom you hit a button which then calls a cgi program sitting on the Redhat > >5.2 server. In that cgi program, the image is transferred over to java to be > >merged as one picture. After that I guess it's thrown back to the cgi > >program to replace the image on the left side as the finished project. > Well, the issue is that the graphics toolkit needs motif which needs > the X server (for things like image depth and format) Why there is no > easy way to do this in the default Unix JDK is beyond me, but that is > how it works. > > I too noticed that doing graphics manipulation code requires an X Server > so it is hard to use Java for such things on a console-only system. Yes, that's exactly what's going on. The program is probably trying to create an Image object and then getting its graphics context to draw on it. In order to get it working, you will have to start up the X server on the web server machine and leave it up. > Maybe someone knows a workaround to this (or a nice trick?) I *believe* that jdk 1.2 allows you to create Images without resorting to X, with the 2d API, but I haven't tried it myself yet. The workaround for 1.1 is to create an array of pixels, draw on them yourself and get a GIF encoder (I used one called Acme) to convert it for the web. It's easy to draw vertical/horizontal lines & boxes, but for other figures you have to code some graphics algorithms yourself. . . . Sean.
Re: Implementating ClassLoader.getResource?
On Wed, 10 Mar 1999 [EMAIL PROTECTED] wrote: > Here is my CustomClassLoader written in a two days at least to load > class type data from a modified class path. I started my class with the > Java in a Nutshell Book example. > > Basically it emulates the primordial class loader. ... > The only problem is how do you change the URL stream handler > factory or customise it so that you add another protocol a runtime? > > Any help appreciated When in doubt, read the documentation =) http://java.sun.com/products/jdk/1.1/docs/api/java.net.URL.html#URL(java.lang.String, java.lang.String, int, java.lang.String) However I believe that the property name is incorrect, it should really be java.protocol.handler.pkgs . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Anybody any Idea?
On Fri, 12 Mar 1999, Ferenczi Gyorgy Laszlo wrote: > I gotta problem: > > Wrote a nice cute java Applet that connects to a POSTGRES database, works > fine with appletviewer. > > But!! > > If I wanna try to run in thru the web, it fails to connect Postgres must be running on the same computer as the web server that delivered the applet. Read up on applet security restrictions. And cut down on the caffeine please =) . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: javac 1.2 a real pig
On Fri, 12 Mar 1999, Steve Cohen wrote: > I had previously thought the errors I was getting on execution were the > result of using jikes. But apparently not so. Once javac finished its > compilation, an identical exception occurred on executing the compiled > application: > > [scohen@stevecoh jahtzee]$ java JahtzeeApp > Exception in thread "main" java.lang.NoClassDefFoundError: JahtzeeApp (wrong > name: jahtzee/JahtzeeApp) > at java.lang.ClassLoader.defineClass0(Native Method) > at java.lang.ClassLoader.defineClass(Compiled Code) > at java.security.SecureClassLoader.defineClass(Compiled Code) > at java.net.URLClassLoader.defineClass(Compiled Code) > at java.net.URLClassLoader.access$1(Compiled Code) > at java.net.URLClassLoader$1.run(Compiled Code) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Compiled Code) > at java.lang.ClassLoader.loadClass(Compiled Code) > at sun.misc.Launcher$AppClassLoader.loadClass(Compiled Code) > at java.lang.ClassLoader.loadClass(Compiled Code) > > What is the problem here? This application worked when compiled under > JDK117. Is JahtzeeApp in a package? If so, try 'java jahtzee.JahtzeeApp'. If you have a class in a package, then running it requires the fully qualified name, ie. ., and the .class file must be in a directory called , and _that_ directory needs to be in a directory listed in the CLASSPATH. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Java class run locally, only
On Fri, 12 Mar 1999, Ferenczi Gyorgy Laszlo wrote: > Thanks for your quick response. I would like to clarify my problem. In > fact, the connetc1.html file can call the class, but the connection to the > database works only when called from the same directory. Where is your JDBC driver? Sounds like you might want to consider packaging both your applet and the JDBC driver classes into one file, either .jar or .zip and then refer to that in the HTML. As this has nothing to do with Java-Linux, please reply privately and I will help as much as I can. Let's take this discussion off the mailing list. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Images 1-bit colour models
On Fri, 19 Mar 1999, Nick Bailey wrote: > We are having trouble with our "fonts". They are not real fonts: they > are images created by a memory image source which was created by reading > a TeX pk file. The fonts are read from the pk file to generate a pixel > map with one-bit-per-pixel. We want to write these images on the screen > using a colour model with 1 bit per pixel, i.e. fg (usually black) and > transparent. The "character" will be written on top of the musical > staff, so we need transparency, whether by real transparency or by > setting some writing mode to OR... My suggestion is that if 2bpp is broken, you might as well go for 8bpp. Aside from memory considerations, why not just convert your fonts into gif's and paint them as Image objects? Much simpler that way. Having said that, the Java2D features in 1.2 provide much more sophisticated drawing capabilities that you may want to look into. In any case here are my off-the-cuff observations to your questions: > ?1. Kaffe is open, so it is inherently the better route, even if it is > behind on the 1.2 compatibility It is only PersonalJava compatible. It's behind on 1.1 even. It's not really useable at the moment for any kind of serious graphics work. 1.2 has some graphics performance problems due to Swing & X, but Java2D makes up for a lot of it. > ?2. Sound and MIDI isn't there yet, even in so far as it's in the 1.2 > spec. We might as well code with JNI and go native. AFAIK sound works, no idea about MIDI. On Linux you could probably open up the proper /dev/midi file and write to it directly, although I couldn't say anything about the performance. You could also write or use a native sound server and connect to it through a socket. Sound support on Linux on the other hand is a different issue =p > ?3. Java2d on 1.1 isn't any different from Java2d on 1.2 1.1 doesn't have Java2D. > ?4. The Kaffe AWT had more bugs that the Sun one, and should be > avoided. For now, yes. > ?5. Use : it's better than most hated class library set> Use Swing if you can afford the performance hit & memory requirements, it's better than plain AWT. > ?6. Sun is the authoratitive reference, so if there are bugs in it, you > better code around them rather than expect anybody else to use your > minority stuff. If you want to ship a working product, JDK 1.1.7 is really your only realistic choice for the next six months or so. > ?7. Stop whinging and fix the sun bugs! Well we try when we can and when we have access to the source =0 - In general I'd say if you're deploying on good workstations with generous amounts of memory (> 32 mb) you would be well off using Java + Swing. In my experience with a lot of graphic libraries using C, C++, and Java, Java's lets you be more productive. If you're not going to be deploying for another six months, I'd bite the bullet and start working with JDK 1.2 if you need Java2D. From my impression, if you're going to be doing sophisticated rendering, you might as well. Let us know how things work out, I'd be really interested myself in a musical application =) . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Problems installing Netbeans
On Mon, 3 May 1999, Nobby Knox wrote: > My problem is that I cannot get the Netbeans application installed. > Netbeans is a very good Java IDE (in my opinion) and is written entirely > in Java. Also, this is not the only application that will not run on my > Redhat 5.2 system (JDK 1.2). With all these applications, the error > remains the same. I have included the error output below. You need to make a link from your current libstdc++ to the one expected. See the mail archives for more information. OTOH, I wouldn't suggest you run Netbeans with JDK 1.2 just yet. It crashes often. Netbeans with JDK 1.1.7 runs acceptably for me. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: newb: running Java service?
On Tue, 4 May 1999, Tom Roche wrote:
> I'm working on a Java-based website, running on Apache on a Linux
> box. It has a backend that connects users (applets) to the
> database. For testing, I've been logging in and running a script that
> runs my backend classes. Now I want the backend to run as a service,
> i.e. without a user logged in (like FTP, etc).
> Is "service" the proper term to use here? ("daemon"?)
"service" is the application, like mail, or web. The program providing
the service is called the "daemon".
> What is "the best way" to do this?
> I believe the best way to do this is via inetd: is this correct?
None. Like everything else, it depends. Does your backend listen for
network connections and stay up 24/7 and is multithreaded to allow for
multiple clients? Then the best way is to create a cron job that
runs periodically, checking to see if the server is up, and if not,
starting the server. You then let the server run all the time. This is
called "standalone" mode (following Apache's convention).
If your backend just listens for one client and terminates abruptly, then
you could consider inetd.conf.
However, since Java start-up time is significant, it might be better if
the JVM is running standalone. Also multiple clients would result in
multiple copies of your backend app.
> If so, what would be the proper settings for inetd.conf?
try "man inetd". If it's too obtuse, let me know.
Another option is to use servlets, the converse of "applets" but embedded
on the server side. Apache supports JServ (see java.apache.org) which
runs standalone alongside the web server. Servlets let you do fancy
things which you may want in the future. In particular you could pool
your database connections and reuse them from servlet to servlet.
. . . Sean.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Does JDK 1.2 work with RH 6.0
On Wed, 5 May 1999, Al wrote: > I am going to upgrade to Red Hat 6.0 and I was wondering if JDK 1.2 > work with Red Hat 6.0? The answer from previous mailings is "not yet". The next prerelease/release should fix the problem. > Does any JDK work with RH 6.0? A new release of JDK 1.1.7 is already planned Real Soon Now. If you're impatient there's an unofficial release of it posted earlier, check the mail archives at www.blackdown.org. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: newb: running Java service?
On Wed, 5 May 1999 [EMAIL PROTECTED] wrote: > On Wed, 5 May 1999, Ted Neward wrote: > > > How about this: instead of running a web server, run a generic application > > server (EJB, CORBA, who cares) that has a "servlet" (sorry to reuse the > > term) that listens on port 80, understands HTTP, and hands back HTML > > Why bother? Most application servers I've seen allow for using a web > server as part of their architecture. Their other feature is taht of > requiring deep pockets. :) > > > resources? Six of one, half-dozen of the other, you might argue, but most > > application servers are starting to go the > > clustered/load-balancing/fault-tolerance route, and if your application > > server is an EJB server, your HTTP SessionBean can always get swapped out > > when there's no HTTP requests Try doing *that* with Apache. :) > > One thing I see is companies using a fu ll blown app server for tiny web > projects. Seems like overkill to me. If you use a web server with > servlet support, when you are ready for that beast of an app server, you > can take all you've done with you. :) Looks like we're going more into what the original poster bargained for =) EJB is nice I certainly agree, but as alx points out: EJB servers are either a) at least $10,000 per installation or b) under beta testing or development. But they are certainly the way to go in the future if you want to do any seriously heavy server-side development in Java. I'm writing a course on EJB so if you want any pointers to resources on them I'd be happy to share. And there are open source projects in this area too. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Question (about EJB)
On Wed, 5 May 1999, Ted Neward wrote: (other attributions lost) > >> So I pose this question to my java compatriots with experience in other > >> realms of server side java. Why would I use an app server or some other > >> technology? What does EJB give me? Couldn't I use EJB with servlets as > >> opposed to an EJB centric appserver? > > > >In a nutshell (speaking as an "expert" who's read a few dozen more EJB > >documentation pages than you have :-), EJB is good for centralizing your > beans > >on large, high-capacity server(s) that offer the sort of performance, > >scalability, and reliability you need in an enterprise. The beans live, > >serverside, in containers that handle a lot of the plumbing issues -- so, for > >example, the beans can implement the business logic and let the container > worry > >about how to connect to databases. You connect to beans from the client side > >with ordinary RMI calls. In other words, with servlets, you have to manage the communications protocol, the server deployment, maintenance, load-balancing, database hookup, and persistence yourself. In EJB to some extent these are issues taken care of for you. For Java client to Java server connectivity, EJB makes it as (almost) easy as a method call. If you're doing HTML browser to server on the other hand, it wouldn't be a greater advantage than servlets unless you were thinking of very high volume services. > As another "expert" who's working for a company doing a LOT of development > based on EJBeans, I'd say the above is correct, to a degree. I believe that > the EJB community isn't quite yet sure what they've created, and are still > fishing for the patterns they need to do efficient, effective EJB > development. (My opinion is that EJBs and its > bean-managed-persistence/container-managed-persistence is fundamentally > flawed and will be the most highly rewritten part of the EJB spec over time.) Well speaking from having toiled through G3 and Tuxedo transaction monitor development in _C_, I can honestly say that the development effort for EJB is *much* *much* easier. It still has to mature though, agreed. Unless you are doing enterprise development (the E's there for a reason =) this probably won't be on your radar screen for a while. But as e-commerce and EDI heat up on the Internet, you can be sure EJB as it matures will start to dominate Java server-side development. . . . Sean, working with EJB and XML and is running out of three-letter words -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: A little help
On Thu, 6 May 1999, Mario Jorge Nunes Filipe wrote: > 13:38:01$ javac teste.java > teste.java:42: Method > DefaultTreeModel(javax.swing.tree.DefaultMutableTreeNode) not found in > class teste. > DefaultTreeModel model = DefaultTreeModel(root); > ^ > 1 error It should be: DefaultTreeModel model = new DefaultTreeModel(root); ^^^ as you're creating an object there. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: newb: running Java service?
On Wed, 5 May 1999, Ted Neward wrote: > >EJB is nice I certainly agree, but as alx points out: EJB servers are > >either a) at least $10,000 per installation or b) under beta testing or > >development. But they are certainly the way to go in the future if you > >want to do any seriously heavy server-side development in Java. > > > Agreed. But I'd watch prices come back down as a thousand different vendors > suddenly jump into the market with low-range to super-high-range EJB > servers. What's more, you can usually download these eval versions for > development to get a good idea of what EJB development is like without > shelling out a penny. (Gotta love this Open Source movement, eh?) :) Definitely. See below for pointers if you want to play around with the technology. > >I'm writing a course on EJB so if you want any pointers to resources on > >them I'd be happy to share. > > > Course for whom? Course for corporate training. Need any? =) Actually the EJB part is just the last day in a 5-day JavaBeans class. (And of course EJB despite the name isn't similar to JavaBeans much at all except that they're both component technologies) > >And there are open source projects in this area too. > > > > www.EJBHome.com (now a division of Iona) is one, I know of (I think) one > or two others as well EJBHome doesn't quite qualify as open source, but you can download their beta versions for free (they're at ejbhome.iona.com now). www.ejboss.org is the only one I've been able to get a hold of (m31.org and openejb.org seem to be down) but their server is not quite standard and doesn't support entity beans yet. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: newb: running Java service?
On Thu, 6 May 1999, John N. Alegre wrote: > Sorry I got into this thread late, but look into what information you > can get on J2EE (Java 2 Enterprise Edition). This will be the eclipse > of EJB for sure. Can not say much more than that without breaking non > disclosure. I'm not sure how J2EE is supposed to "eclipse" EJB. All it seems to me is a reference implementation of EJB, JTS, JNDI, servlets, etc. etc. in one bundle (finally). Working products based on these specs are already available, albeit separately. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: java versus c++ or perl
As has been pointed out, it really depends on the context of what you want to do. Choose the right tool for the job, and don't get stuck in the "when all you have is a hammer everything looks like a nail" syndrome. Here's my take on the various languages (having pretty much done work in all of them): C++: heavy duty, > 10k lines of code, best performance, large projects Java: easier to develop than C++, my choice for projects that are more involved than a script and need to be maintained for a while (using JavaBeans/servlets/EJB to help reduce development time is good here) Perl: best data processing capabilities, FASTER than Java and sometimes C++ (it's true and I can tell you why =) great for fill-in-the-gap programs, migration of data formats has a huge library of prebuilt code (see www.perl.com) extensible but not easily so easy for programmers already familiar with Unix sh, sed, awk maintenance becomes more nightmarish for larger programs hard to do good data structures and OO in Python: almost on par with Perl, cleaner syntax, easier to learn with JPython (Python running in Java) ideal for adding scripting to Java apps, good OO much better data structures than any of these other languages www.python.org, www.jpython.org Tcl: easiest to learn especially for non-programmers, slowest of all, and least powerful in its own right BUT most easily extensible by C code, embedded in C (I think there's a Java TCL interpreter also available) www.scriptics.com At 02:08 PM 5/6/99 -0700, [EMAIL PROTECTED] wrote: >we are having a discussion here at work about the deployment of a web based >database, > >i think jdbc is the choice othere think perl or c++ is the way to go, any >thoughts/links etc? IMHO: Forget about C++. Not needed, too complex. Good choices here would be Java, Perl, or Python. If the database is going to be on the order of 10k clients, going Java with JDBC and servlets is probably the way to go, with the proper development tools. However this technology is still maturing. For something you need ASAP Perl can't be beat. Small-sized (department level) databases would be ok. Most everything on the web is done with Perl. Python has a good web-publishing environment called Zope available. It has the advantage of being open-source AND backed by a commercial company. Have not tried it personally but I've heard it's recommended. www.zope.org . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: New to colormaps...
Hi Alan, Welcome to Java and Linux =) I'm not sure what your question was, but I can clear up a couple things: Although your display can show several million colors, it is limited to displaying only a certain number of colors at the same time, usually 256 if you have an 8-bit color depth. The colormap is then the list of 256 colors that are being displayed at the same time. Typically an application just adds its own colors to new colormap entries or picks colors already in the colormap which are close enough to use. But both the JDK and Netscape like to configure the entire colormap. Unfortunately, however, they have different ideas about what colors they want. So you will just have to put up with the messages from the JDK, they're really fairly harmless. It's just warning you that it's not able to get certain colors that it wants, which is not a big deal. To get around the messages, you could do various things, none of which are really all that great. It's probably possible to synchronize both the JDK's and Netscape's colormap, but I'm not aware of anyone doing that. The -install flag to Netscape will tell Netscape to create a private colormap, and as you may notice, that means everytime you go into a Netscape window the display switches colormaps to Netscape's. Which means that the rest of the screen becomes oddly colored. Hope this clarifies things a bit. If anyone else has good solutions, speak up =) . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [OT] Proposal: select(readfds, writefds, exceptfds)
On Mon, 31 May 1999, Bernhard Fastenrath wrote: > Michael Sinz wrote: [ snip ] > > Second, Java has threads built in. Why not use them? > > One of the really nice parts of Java is that it has some > > of these concepts, such as threads and synchronization > > built in. This is part of the language specification. > > One should use those mechanisms. > > Using a thread for each filedescriptor is a waste of > resources. I really don't understand why there's no > mechanism similar to select() in Java. > I might want to wait on several hundred sockets and > assign the connection to a thread from a thread pool > as soon as there's work to do. In very large servers you hit a scaling problem in Java. Most virtual machines currently are limited to ~1000 threads per process. Since each thread has stack space and context, it is resource intensive to use threads. Thread pools alleviate but do not eliminate the problem. One big downside is that you have to tie up a thread to both incoming and outgoing streams for fully asynchronous I/O. That's two threads per connection right there, a lot of overhead. At least one company I know of has been forced to a custom JVM (Hewlett-Packard's) in order to get acceptable performance out of a Java-based server, and they basically made an interface to select(). I believe they've submitted a proposal to Sun also. And according to them, the Sun engineers are amenable to doing something about this. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: select() API
On Wed, 2 Jun 1999, Bernhard Fastenrath wrote: > [EMAIL PROTECTED] wrote: > > At least one company I know of has been forced to a custom JVM > > (Hewlett-Packard's) in order to get acceptable performance out of a > > Java-based server, and they basically made an interface to select(). > > I believe they've submitted a proposal to Sun also. And according to > > them, the Sun engineers are amenable to doing something about this. > > Oops, i was just about to implement it myself. > Is their select() interface availabe online? I've received a copy of their interface but I can't disclose it publicly I'm afraid. It's based on poll() rather than select() and is pretty straightforward. According to my sources this should be part of the HP 1.1.8 JVM but whether it is custom or not is unclear. I was mistaken on the point that it will be a public specification, it is unclear at the moment. I'm also not sure how much work if any the JVM needs to do to support this other than the JNI. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Linux Desktop based on JDK 1.2
Hi Cliff, On Tue, 29 Jun 1999, Cliff Baeseman wrote: > I do not know if anyone is interested in this yet but here goes. > >I am not happy with the GNOME or the KDE desktops so I have started > building a desktop on top of a minimal RH 6.0 installation. I am using > JBuilder3 on windows to code the desktop. This is working out very well > and JBuilder already gave me 50 percent of what I needed to build the > system. I am using pre v-2 blackdown JDK and am having a bunch of fun > doing this. The desktop will talk to the linux bottom end via a api > socket server written in C++. > > Anyone else interested? I have a couple of things you might find of interest: 1) [EMAIL PROTECTED] is a not very active mailing list discussing such issues, mainly by the developers of Echidna. 2) JOS www.jos.org is doing an operating system in Java with a desktop compoonent. 3) to counter the speed issue, one solution would be to use gjc (sourceware.cygnus.com) and add X or other graphic support to it. One person is working on a gtk binding for AWT but I feel that's the wrong way to go. Another library of interest is Shark which is a Java windowing system that emulates AWT on top of X and/or native graphics drivers. It's available at http://www.gjt.org/pkgdoc/org/gjt/shark/index.html This would be a good project in and of itself, straightforward but a little challenging due to AWT being underspecified (any students looking for a project here? =) I think it's crucial to the adoption of Java under Linux among the C/C++ crowd that are doing GNOME, KDE applications now. Swing may be complex, but IMHO it's better to use than Gtk+ or Qt. 4) I've also been developing a different GUI desktop called Conch using Swing, but working with it on and off hasn't brought too much result. I'd be happy to discuss the concepts with anyone who'd care to listen =) Anyway it sounds like you stirred up a lot of interest. Care to give more details about your project? . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Linux Desktop based on JDK 1.2
On Wed, 30 Jun 1999, Cliff Baeseman wrote: > The speed is not that big a issue. I am running a desktop written in > jbuilder on linux rh6.0 P90 32 meg of ram my test machine It is just as fast > as gnome or even a little faster. > > The thing is the desktop does not even do that much work the apps do all of > the work. The desktop just looks cool and launches and configures apps. > > A very small job for the desktop. Ah, if you're doing the launcher part, you might want to take a look at JFA, www.javalobby.org/jfa . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Linux Desktop based on JDK 1.2
On Thu, 1 Jul 1999, Christoph Terhechte wrote: > What about ncurses? I believe a text mode windowing toolkit for Java > would beat everything else in speed - and most kinds of applications > don't really need to run under X. Many of my favorite programs like > pine, tin, emacs, mc are happy with the console. Has anybody ever > implemented that kind of thing in Java? I tried looking for an ncurses library once, the only thing I found was a JNI implementation which I didn't find useful. It should be possible to do a pure Java implementation over telnet, at least, but maybe not directly to the console. Again another good project to pick up =) Might be a straightforward port, and I would love to see it done too. . . . Sean. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
