A.KLOS@siep.shell.com: RE: java AWT and Swing without XWindows
I'm not sure it is that bad. Take a look at TinyAWT. M. - -- | From: arjun.panday / mime, , , [EMAIL PROTECTED] | To: java-linux / mime, , , [EMAIL PROTECTED] | Subject: java AWT and Swing without XWindows | Date: Friday, September 25, 1998 4:40PM | | To the java port developpers, | | I'm designing an embedded application (=>small footprint!) in Java that I'd | like to have running on a Linux OS. Is there a way to have Java (especially | the AWT and Swing components) run without XWindows? | That would mean using either |the frame buffer, | orGGI, | orSVGI lib. Theoretically it should be possible, but it will mean that you will have to re-implement the AWT on top of whatever graphical subsystem you want it to have it on (e.g. GGI or SVGAlib???) and that will be a lot of work. Cheers, Addy.| --- End of Forwarded Message
Re: jre failed
> I tried to run an application packed in a JAR file: > $ jre -cp testq.jar QueueTest > but got the following message: > > Unable to initialize threads: cannot find class java/lang/Thread > Could not create Java VM > > I use jdk-1.1.6, RPM version (jdk-sbb-1.1.6-2.1.2glibc). > CLASSPATH, JAVA_HOME, and JDK_HOME are all > set appropriately (I think). The problem is, JRE cannot find the classes.zip file, which implies that CLASSPATH is *not* set appropriately (alternatively, but much less likely, is that something is wrong with your classes.zip). M.
Re: Write Once Run Anywhere? - MYSTERY SOLVED
> It turns out that the wildcard expansion under Win95 does not include filenames > containing '$'. Thus, if you say, "jar cvf fubar.jar *.class", you won't get > any of your anonymous classes. In general, do not attempt to use wildcard expansion under DOS. Different *programs* expand them in subly different way. In particular, DIR is more conservative than DEL, so you can test a proposed expansion with DIR then delete *more* files than you expected. The day I found that out, I decided to resign from Microsoft. M.
Re: My source code crashes javac
> I am trying to compile the attached program in javac. I've tested it > under Sun's JDK 1.1.5 on Solaris, Symantec's Visual Cafe (forgot which > version, but it's based on JDK 1.1.3) on Windows NT, and Blackdown's JDK > 1.1.6v5 on Linux. All of them give the exact same result: > > java.lang.NullPointerException: > at java.util.Hashtable.get(Hashtable.java) > at sun.tools.asm.ConstantPool.put(ConstantPool.java) > at sun.tools.asm.Instruction.collect(Instruction.java) > at sun.tools.asm.Assembler.collect(Assembler.java) > at sun.tools.javac.SourceClass.compileClass(SourceClass.java) > at sun.tools.javac.SourceClass.compile(SourceClass.java) > at sun.tools.javac.Main.compile(Main.java) > at sun.tools.javac.Main.main(Main.java) > binary += pixels[y * >FONT_HEIGHT + x] == 0 ? System.out.print("1") : System.out.print("0"); Well, this line is just plain wrong. You cannot ? between two void functions. Shouldn't crash the compiler, of course. M.
Re: Java language question: static classes ?
> Thanks that is the correct answer for "static inner class". > > However a static inner class > cannot have it self a static inner class. Yes, it can. Why couldn't it? The innerness of a static inner class is purely a naming thing. > Static inner class > 2) cannot refer to any member or method belonging to the outer >class. To any *non-static* member or method, you mean. And of course, it can refer to any member or method, through a variable of the appropriate type. M.
Re: Swing 1.0.3
> setenv JAVA_HOME /home/jdk116_v5 > setenv SWING_HOME /home/swing-1.1beta3 ^ > java.lang.NoClassDefFoundError: com/sun/java/swing/ImageIcon > at xenon.xsql.editor.Xsql.(Xsql.java:142) > at xenon.xsql.editor.Xsql.main(Xsql.java:670) You are using Beta-3 with pre-Beta-3 nomenclature. It should be javax.swing.ImageIcon. M.
Re: request for a sendmail java script
> I would also sugest that you check out the O'Reilly book "Java Examples > in a Nutshell". You can download all the examples for this book at: > > http://www.oreilly.com/catalog/jenut/examples/ There's also a JavaMail API which has drivers for SendMail (actually for SMTP). M.
Re: nusty linux exception
> From: John Summerfield <[EMAIL PROTECTED]> > > On Fri, 23 Oct 1998, Pinca George wrote: > > I made a program useing symantec's classes.zip. > > It works fine on windows bat when I move it to Linux I get a nusty > > NullPointerException exception on the line : > > searchButton.setImageURL(symantec.itools.net.RelativeURL.getURL("xx.jpg")); > > > > Does anyone have a clue ? > > Has searchButton been initialised properly? I often get these > NullPointerExceptions when I try to access a method an object doesn't have: > for example, a method in my extension to Frame when the object I'm dealing >with is really a Frame. I suspect that the RelativeURL.getURL is failing for whatever reason (perhaps you have to have the right current directory -- for some definition of "current"). M.
Re: classpath problems?
> > Here is my CLASSPATH that is not working > > CLASSPATH=.:/usr/local/jdk116_v5/lib/classes.zip:/usr/local/jdk116_v5/lib:/u > sr/local/jdk116_v5/lib/moreClasses:/usr/local/apache1.3.3/share/j-bin Did you remember to EXPORT your path? M.
Re: Interest in a JIT on Linux
> user who happens to work for IBM in the Research division, I've been wondering > if some of the technology we have here could be useful to the Java on Linux > effort. More specifically, I was thinking that I might be able to get a > "research" effort going to port IBM's Intel JVM with its JIT (we have a pretty > good one) to Linux. Well, there is the TYA JIT ftp://gonzalez.cyberus.ca/pub/Linux/java/ It certainly *seems* fast, but I am curious if there are any benchmarks for it. M.
Re: String to char conversion
> I have a string that contains the characters \u201a - that is a six > character string. How do I convert this to a single Unicode char ? Well, if you *know* it begins with "\u", (char) Integer.parseInt(s.substring(2), 16); will work M.
Re: Basic installation. Please Help.
> I do hope someone comes up with a better idea than classpath RSN: mine runs > to well over 2K. 1.2 does not use classpath, praise be. M.
Re: servlets
> Is anyone using servlets with Apache? > What documentation is there? I am, using the JServ module from Apache and the standard Sun docs. Works fine. M.
Re: Basic installation. Please Help.
Re: Basic installation. Please Help.
My understanding is that all jars found in a certain directory are used. I suppose the idea is you symbolically link your jars to there. M. > From: Mario Camou <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED] > Subject: Re: Basic installation. Please Help. > > What does it use, then? > > -Mario. > > [EMAIL PROTECTED] wrote: > > > > I do hope someone comes up with a better idea than classpath RSN: mine runs > > > to well over 2K. > > > > 1.2 does not use classpath, praise be. > > > > M. > >
Re: Runtime.exec ()
> From: Mark Hofmann <[EMAIL PROTECTED]> > Subject: Re: Runtime.exec () > > Hi, > > I tried the same thing some time ago. > The problem is, exec works, for example if you try exec("ls") you wont get > problems. However, running anything as a command that has a > redirection of out-/ input in it fails. > > I don't know why, but that's what I experienced. > > Anybody knows why ??? Simply that redirection is part of the shell, not part of the OS. You must invoke a shell to see that behavior. M.
Re: RMIC-Replacement Jiffy
> Holger Joest ( mailto:[EMAIL PROTECTED] ) has developed a replacement > for rmic called jiffy. It is written in C++ an believe it or not - > it's a little bit faster ;-) Why? RMIC is run only when the interface changes, i.e., rarely. Even then, it takes only a second to run. What's the payoff? M.
Re: Help!
> [EMAIL PROTECTED] > lcomp98.fi-b.unam.mx carlos>javac HolaMundo.java > No library path set. > I revised my PATH and CLASSPATH. They are correct. > Only if I type full path > lcomp98.fi-b.unam.mx carlos>/users/local/bin/java/jdk1.1.5/ > bin/javac HolaMundo.java It looks to me like you have Kaffe somewhere in your path ahead of the jdk. M.
Re: How to send e-mail ?
> > I want to send e-mail from my java program. > > > [I don't think there's a Mail API in Java 1.1, I don't know why you would think that. It's called Java...wait for it...Mail! Works find with SMTP, so far as I can tell, and pretty easy to use. I haven't tried it with POP or IMAP and fully intend to die before trying it with MAPI. M.
Re: Java threading
> In practice, Java threads are woefully underspecified, and so it's > nearly impossible to write correct multithreaded Java. This is the > most serious deficiency in Java. I agree, kernel threads (with > preemption and real priority scheduling) is the right way to go, and > I'm glad to see that Linux now supports them. What, specifically, do you see as the problems? Where are there places that the specification should be tightened up? M.
Re: finalize() again
> I've put in checks in our code to check is things are getting finalized... It does > happen (eventually) > > To force cleanups, I rely on the following: > > 1.add a void kill() in all heavy classes. make it delete files, close > sockets... etc. I would use the word "dispose()" for this -- kill is a transitive verb and implies that this object is killing some other object. > 2.In void finalize() I make all references point to null Do you have any proof that this is a good idea? Seems like a bad one to me... > 3.Don't forget to do a super.finalize() in all subclasses at the last line in > void finalize() Sound good. M.
Re: Building a tree (data structure) with Java.
> How about using JTree? That's what we use to store our trees, though > I'm not certain how suitable they are to standard graph-theoretic > algorithms. JTree is a UI element. You could use DefaultTreeNode, I suppose. > On Fri, 8 Jan 1999, dog wrote: > > thomas down wrt: > > > I need to generate a tree structure in my Java app. The size of > > > the tree cannot determined until runtime. THe idea i have is to store the > > > tree as an array using the Vector class. Before i start implementation, i > > > want to ask if there is an alternative approach to this?
Re: Linux Java & the Java2 ORB, and how to use shared memory from Java
> 2. Is there a Java API for using shared memory? >There doesn't seem to be one in JDK 1.1, but >is this in Java2? I would be stunned if there were (ever) a Java API for using shared memory directly. There isn't one now. A mechanism whereby the allocators of several JVMs could draw from a pool of shared memory would be interesting (how would you handle GC?) but, given a strong thread model and RMI, I don't know if it would be useful. M.
Re: I don't want to know when 1.2 will ship - honest!
I, by contrast, DO want to know, I'm just not going to ask. M.
Re: little endian & big endian
> I now have two different opinions. Some say Java is big-endian, some > say it depends which machine it's on. Who's right? Proofs, please. Class files and serialized objects are MSB. The endianness of the VM itself is implementation dependent; however, if you could devise a pure-Java program that could detect the endianness of the VM, you would have found a bug in the spec. M.
Latest Java 2 Rumor
>From a pretty good source at LinuxWorld -- Sun's going to allow the release of Java 2 for Linux with the socket bug (which apparently only affects multicasting on multi-homed machines running 2.0.3) *THURSDAY*! Which is 25 hours from now. And there was much rejoicing. -- Michael Lorton Chief Technology Officer Civet Systems -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: how to remotely launch java (nt, linux) ? (off-topic...)
> From: "Michael Sinz" <[EMAIL PROTECTED]> > On Mon, 08 Mar 1999 00:39:52 +, Context Grey wrote: > > >My question: is there any way to start a java program on NT > >either remotely, or automatically (e.g. is there an autoexec.bat > >script that can be used to start it??) > > Well, depends on the program. If it does not interact with the > display or console then you can use the NT Resource Key tool > that lets you run any program as a service and have it auto-started > when NT boots. Or you can just use "telnet" to start a terminal session on the NT machine. Yes, you can. M. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: HotSpot?
> According to the last statements from SUN HotSpot will be sold > separately as a commercial product. The press release said "free" about five times. M. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]