Re: Upper Case
Hi, use: String myString = "lowercase content"; String anotherString = myString.toUpperCase(); And please, next time try to invest some effort in looking up such things in the Java documentation. This question would have easily be answered by scanning the doc of the class java.lang.String for an appropriate method. Matthias Pfisterer Van Sy wrote: > > Hi, > > I'm new to Java and would like some advice on how to convert a string to > upper case. > Thanks in advance, > > Van Sy > > -- > 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: Invalid DatagramSocket option
Hi, I remember hearing that there was a problem with multicasting due to a bug in the Linux kernel 2.0.36. This should be solved with the 2.0.37 kernel (and perhaps a special patch, don't remember exactely). Try to check the blackdown site for details. Matthias Pfisterer Larry Hsiao wrote: > > Hi, > > I have an applet that performs a multicast function on a Linux machine. > The browser used is Netscape communicator 4.51. The applet is a signed > applet and has passed the "Multicast" privilege checking when the applet > is executed. Right after the privilege checking, the applet attempts to > instantiate a MulticastSocket with the following code: > DatagramSocket socket = new MulticastSocket(); > At this point, a SocketException occurrs. > > The Stack traces are: > invalid DatagramSocket option > at java.net.PlainDatagramSocketImpl.setOption > (PlainDatagramSocketImpl.java:156) > at java.net.MulticastCreate (MulticastSocket.java:111) > at java.net.DatagramSocket. (DatagramSocket.java:115) > at java.net.DatagramSocket. (DatagramSocket.java:101) > at java.net.MulticastSocket. (MulticastSocket.java:92) > at inria.net.MulticastSession.run (MulticastSession.java:205) -- applet > code > at java.lang.Thread.run (Thread.java:504) > > Note: The same applet running with Netscape communicator 4.51 under > Windows is OK. > > Can someone tell me what's the cause of this problem? > > Thanks. > > Larry Hsiao > Foresyte Technologies, Inc. > > -- > 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: Jrun on linux and apachie?
Rachel Greenham wrote: > > > This is not absolutely true. > > There are case where your dynamic content includes generated/altered > > images. > > You need X for awt/java2D to work. > > Yes, this is true. Luckily I haven't needed this once. We tried to write > software to manipulate images without a window on the screen. Basically > impossible. :-( Yes, it is really ugly ;-} Although you will have to do it anyway for processing ( awt/java2D don't provide any extraordinary kind of functionality for image processing ), developing the codecs from scratch is a real burden. Nathan's suggestion about Xvfb is really appealing in this case! -- dimitris [mailto:[EMAIL PROTECTED]] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Jrun on linux and apachie?
Dimitris Vyzovitis wrote: > > Rachel Greenham wrote: > > > > > > This is not absolutely true. > > > There are case where your dynamic content includes generated/altered > > > images. > > > You need X for awt/java2D to work. > > > > Yes, this is true. Luckily I haven't needed this once. We tried to write > > software to manipulate images without a window on the screen. Basically > > impossible. :-( > > Yes, it is really ugly ;-} > Although you will have to do it anyway for processing ( awt/java2D don't > provide any extraordinary kind of functionality for image processing ), > developing the codecs from scratch is a real burden. > Nathan's suggestion about Xvfb is really appealing in this case! And terribly original :-). You'll find the suggestion in the second paragraph on the Xvfb man page. Nathan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
READING HTML files from within zip or jar files
Is there a quick and dirty way to read into memory (either String or StringBuffer) the contents of an .html file stored with a .jar or .zip. The java classes reading these files will be stored within the same .zip file. I need to read the .html files without really referencing the name of the zip or jar directly within code, for the name of the zip will change from distribution to distribution. Any help would be greatly appreciated. Sterling. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: READING HTML files from within zip or jar files
Sterling Moses wrote: > > Is there a quick and dirty way to read into memory (either String or > StringBuffer) the contents of an .html file stored with a .jar or .zip. > > The java classes reading these files will be stored within the same .zip > file. I need to read the .html files without really referencing the name of > the zip or jar directly within code, for the name of the zip will change > from distribution to distribution. Use getResourceAsStream() to get an input stream for the HTML file, read from that and write to a StringWriter or CharArrayWriter. getResourceAsStream is a method of the class Class. Best bet is to use a class that's sitting in the same directory in the zip file as the HTML file. Then the argument to it is just "foo.html": myObject.getClass().getResourceAsStream("foo.html") if you have an instance, or MyClass.class.getResourceAsStream("foo.html") if you don't. HTH, Louis -- <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> Louis Tribble [EMAIL PROTECTED] Metamata, Inc. http://www.metamata.com Tools for serious Java developers. +1 510 796 0915 <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Error : Too many open files
Hi, Hi I have an application, where it is absolutely necessary to open multiple sockets, in the tune of 50's.But the system does not allow me to do this and infact throws a socketexception with the error message as "Too many open files". AFAIK, the OS allows(solaris, linux) an application to simultaneoulsy have 1024 file handles.But the JVM breaks much before this ( in the 30's) .So is there a way to increase this number.I was desperately tring to find a system property that limits the maximum number of open files.But was not able to find one.Hence it would be of great help, if someone could suggest a solution. thanks, vijay -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Graphics Acceleration
I am using Jdk1.2 in a standard Red Hat 5.1 and my computer is equipted with Virge display card. When i am trying to use graphics in my programs i am getting a drammatical reduction in the program speed while this is not the case when the programs are running in Nt or 98. My first thought is that Red Hat 5.1 doesn't take in advantage the hardware drawing capabilities of the virge chip while 98 and Nt do. Are there any solutions? Get FREE voicemail, fax and email at http://voicemail.excite.com Talk online at http://voicechat.excite.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Comments about JDK1.2pre-v2
Hello, I dowloaded and setup my machine to use JDK1.2pre-v2(by switching from a 16bp to 32bp) and from screen resolution(1280x1024 to 1024x768..:() so that I can try out swing to see if it works. Well, here are my observations: 1)Seems 1.2 runs faster than 1.1 2)Did run out of memory(I know of the bug and haven't had a chance to run it w/o JIT) 3)Ugly Fonts(fixing this bug today) 4)Does it suppose to be correct with running the SwingSet program that it suppose to say Swing 1.0 Because thats whats it said when I viewed it last night. I also have jdk117v3/Swing 1.1 and when I view SwingSet inside it, it said "Swing 1.0" 5)When I viewed the table inside the SwingSet, it didn't work correctly and when i tried using the Debug graphics, it went SLOWW. Any comments to what I have discussed above? Matt Brown -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
KeyBoard events don't work in jdk117_3.
Hello, As I previously posted, I can't get keyboard events to work with the blackdown jdk117_v3. Can someone please test on your own versions to see if the samething happens with you. Thanks, Bob import java.applet.*; import java.awt.*; import java.awt.event.*; public class KeyTest extends Applet implements KeyListener{ char ch; public void init(){ requestFocus(); addKeyListener(this); } public void paint(Graphics g){ g.drawString("The Key typed was " + ch, 10, 100); } public void keyTyped(KeyEvent e){ ch = e.getKeyChar(); repaint(); } public void keyPressed(KeyEvent e){ } public void keyReleased(KeyEvent e){ } } _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Problems with Java 1.2 pre-v1 on Linux
Nacho Mayorga wrote: > > Madrid, July 23rd 1999 > > Hi, > > I've got Java 1.2 pre-v1 installed on RedHat 6.0. While trying to > compile (javac) one version of the world-infamous HelloWorld applet > (just for trying purposes) the following error occurred: > > *** panic: GC: getStickySystemClass failed: java/lang/ref/Reference > CLASSPATH may be incorrect > SIGABRT 6* abort (generated by abort(3) routine) > stackpointer=0xb5b0 > > Full thread dump Classic VM (Linux_JDK_1.2_pre-release-v1, native > threads): > "main" (TID:0x40cf91e0, sys_thread_t:0x804c4f8, state:R, native > ID:0x400) pr > io=5: pending=java.lang.OutOfMemoryError > Monitor Cache Dump: > Registered Monitor Dump: > utf8 hash table: > JNI pinning lock: > JNI global reference lock: > BinClass lock: > Class linking lock: > System class loader lock: > Code rewrite lock: > Heap lock: > Monitor cache lock: owner "main" (0x804c4f8) 1 entry > Thread queue lock: owner "main" (0x804c4f8) 1 entry > Dynamic loading lock: > Monitor registry: owner "main" (0x804c4f8) 1 entry > > It seems curious to me the reference to the CLASSPATH var. After reading > the JDK1.2 pre-v1 documentation I assumed that there was no need for > CLASSPATH or JAVA_HOME vars at all. > > BTW, the applet (which language is Spanish ;-)) is as follows: > > // > // Applet HolaMundo de ejemplo > // > import java.awt.Graphics; > import java.applet.Applet; > > public class HolaMundo extends Applet { > public void paint( Graphics g ) { > g.drawString( "Hola Mundo!",25,25 ) ; > } > } > > Any explanation or idea? > > Thanx a bunch in advance! > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] Hi, You got to download jdk1.2 pre-v2 instead of pre-v1(glibc2.1).It is working fine with my system (RH6.0). - Nagaraj S.B. Bells Softech Ltd,Bells House,1036, 26th Main,4th 'T' Block, Jayanagar, Banglore - 560 041.Ph.No.:6650084/33. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Linux JDK applets on other platforms
I can't get some of my applets to run on any other platforms other than Linux/Netscape. I have a few more complicated projects that I've been working on that I can't get to run on IE or anything Mac based. The simple stuff works, but as soon as I throw in frames, I seem to not be able to have other people run the applets. The IE5.0 browser just plain refuses to run them. (at least that's what I'm told) With Netscape 4.X on Mac, they get an error similar to "can't find class "java.awt.event.WindowEvent". I'm sure I'm doing something grossly wrong here because I'm not seeing any other people here or in the archives with the same problem. Can someone take a quick look? Here are the applets and sourcecode. GPS receiver Class Project http://24.1.12.134:5829/java/AdvJava_proj/Final/index.html VHF Scanner Project http://24.1.12.134:5829/java/scanner/index.html (the pass phrase is "there is no pass phrase" if you want to control it) -- Glenn Valenta Engineering @ http://www.coloradostudios.com [EMAIL PROTECTED] http://ouray.cudenver.edu/~gavalent/ [EMAIL PROTECTED] Personal mail [EMAIL PROTECTED] Work mail -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Off-Topic (JNI)
Hi Jini users, Excuse me for asking this question !!.It is a part of my Jini Service which uses Java Native interafce with C.I am new to Java, I have written a small java code which calls a C function by passing a string array(2D). Following is the native function C code which prints garbage when I execute 'java' of my java class. It is perfectly printing the length of the array but not the contents of the arrya.How to access the contents of string array and also how to return a 2D array from C to java and read in java?. - ... JNIEXPORT void JNICALL Java_MyFunction (JNI Env *env, jobject my_object,jobjectArray my_array) { jobject value1 = (*env)->GetObjectArrayElement(env, my_array, 1); printf("%s\n",value1); } - Thanks in advance, Nagaraj -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]