comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * quick help with vb to java transalation - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4fe61018e7c6b66b * Secure FTP API for Java Released - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f0c759e54b0e087 * java program problem - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/acd76456c1dce143 * Process.destroy() on Win32 - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2677bdb23c8cb84b * IOException after Socket.connect() - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6edbb4e109df50fe * Would like a preprocessor. - 5 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f8d589c27ece424e * Classes ending with semi-colon - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1ac79b60dc00d846 * component similar to JTable, but AWT-based? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f15636daf0de7188 * java applet network - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e7c700cb1476b929 * chating in java applet - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a6e0246ff4a25a9c * JavaScript interpreter/evaluator class? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbf34c550ec28047 * opening an input stream to a file - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b0a7815976ed961 * hidden classes - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5a0582c77d807482 * Access to Wireless LAN ... - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b6710a272f95e58 * 1.5 howto - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f65789ac1abef909 * java & java script - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5bb29439dd2da26d * ATDT 123456789 How?? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c755fca6811fa45f ========================================================================== TOPIC: quick help with vb to java transalation http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4fe61018e7c6b66b ========================================================================== == 1 of 2 == Date: Mon, Aug 30 2004 3:45 pm From: [EMAIL PROTECTED] (Fred) What are the java translations for the following VB declarations: Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long == 2 of 2 == Date: Mon, Aug 30 2004 11:06 pm From: Paul Lutus <[EMAIL PROTECTED]> Fred wrote: > What are the java translations for the following VB declarations: Pick up a Java textbook and start over. The examples you posted are Windows-specific, and Java is a platform-neutral language. IOW you *cannot* translate these into Java. -- Paul Lutus http://www.arachnoid.com ========================================================================== TOPIC: Secure FTP API for Java Released http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6f0c759e54b0e087 ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 3:50 pm From: [EMAIL PROTECTED] (Sai Pullabhotla) MyJavaWorld.com is pleased to announce the release of Secure FTP API for Java, an API that allows you to add secure file transfer capabilities to your Java applications. Some of the features of Secure FTP API for Java are: Complete implementation of the File Transfer Protocol as defined RFC 959 Support for secure file transfer using SSL/TLS as defined in RFC 2228. Both Explicit and Implicit SSL connections are supported. Extendable architecture to support legacy/non-standard FTP servers Event notification to notify the connection and transfer evens to interested objects. Support for active and passive data transfers Support for ASCII and Binary data types Set the time outs and buffer size to use for the control and data connections And many more... Check it out at http://www.myjavaworld.com Regards Sai Pullabhotla ========================================================================== TOPIC: java program problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/acd76456c1dce143 ========================================================================== == 1 of 2 == Date: Mon, Aug 30 2004 3:56 pm From: Lee Fesperman <[EMAIL PROTECTED]> Thanasis (sch) wrote: > > Hello to everyone, > in the program below i define a class phone.It has 2 attributes company and > units. > Company is the telecomcompany and units is the phone units spent. > Inside the main method i define an array of objects (type phone). > I fill the array from keyboard, i print it and i compute the total call > cost. > However i'm always getting 0. > It might be a problem with method pay inside the class phone. > > Any help would be appreciated > > ... > if (company=="acom") > if (units<=200) > bill= 10 + units*0.1; > else > bill=10 +units*0.1 +(units-200)*0.08;//end acom You shouldn't be using == to compare String object. Use equals(): if (company.equals("acom")) Also, your dangling else works but is bad form. Put braces around the inner if: if (company.equals("acom")) { if (units<=200) bill= 10 + units*0.1; else bill=10 +units*0.1 +(units-200)*0.08; } //end acom Lastly, you should follow Java conventions on brace placement and naming (class names should be capitalized.) -- Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com) ============================================================== * The Ultimate DBMS is here! * FirstSQL/J Object/Relational DBMS (http://www.firstsql.com) == 2 of 2 == Date: Mon, Aug 30 2004 10:39 pm From: Superdude <[EMAIL PROTECTED]> Just take a dive. The school project is due tomorrow. Go to bed, cry, and face the music in the morning. ========================================================================== TOPIC: Process.destroy() on Win32 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2677bdb23c8cb84b ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 4:18 pm From: Rene <[EMAIL PROTECTED]> [EMAIL PROTECTED] (Joshua Jones) wrote: <snip> > This almost reminds me of using unix, where a "kill" won't work, so a > "kill -9" must be issued. The tool I'm working on is a builder for a This is a bit a broad statement. kill on unix works fine, however you need to understand what it does. It just signals the program that it should terminate and gives the program a chance to do proper cleanup. If the program at this point however is locked/crashed/otherwise fucked, it probably won't exit at this stage. kill -9 however simply removes the process from the system and frees all memory and filedescriptor ressources it used. The program being killed has no way to intercept or delay a kill -9. kill -9's can hang however, for example when the process to be killed is doing a priviledged uninterruptable io operation, because that is being done in kernel space and understandably, you're not supposed to kill the kernel. CU René -- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service $9.95/Month 30GB ========================================================================== TOPIC: IOException after Socket.connect() http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6edbb4e109df50fe ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 4:18 pm From: "alessandro" <[EMAIL PROTECTED]> Hi, I have a problem calling connect(): it throws an IOException. The server has not already started, but I setted a long timeout. Does the socket fail just because it doesnt find the server, or does it wait till timeout has elapsed? ========================================================================== TOPIC: Would like a preprocessor. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f8d589c27ece424e ========================================================================== == 1 of 5 == Date: Mon, Aug 30 2004 4:34 pm From: Rene <[EMAIL PROTECTED]> Paul Lutus <[EMAIL PROTECTED]> wrote: > Rene wrote: > > > Paul Lutus <[EMAIL PROTECTED]> wrote: > >> Liz wrote: > >> > >> > > >> > "Paul Lutus" <[EMAIL PROTECTED]> wrote in message > >> > news:[EMAIL PROTECTED] > >> >> Glen wrote: > >> >> > >> >> > > >> >> > OK--- I understand the compiler can inline too. I am interested > >> >> > in other features too and want to see what is out there. > >> >> > > >> >> > I have a method that is over 400 lines long. Huge switch > >> >> > statements. The centerpiece is a data structor called a bitboard > >> >> > that represents a chess position in 96 bytes. > >> >> > > >> >> > I've reviewed the JVM op codes and taken that into account. > >> >> > > >> >> > This will probably blown your mind but I would kill for a GOTO > >> >> > statement. > >> >> > >> >> I hate to tell you this, but Java actually does have a GOTO (not > >> >> under > >> > that > >> >> name). It's a special form of "break" that can go to a defined > >> >> label. See below. > >> >> > >> >> The reason I hate to tell you this is because it is always a bad > >> > programming > >> >> idea. > >> > > >> > That guy that invented Pascal, Nick Worth(sp), > >> > >> Niklaus Wirth. > > > > "Niklaus Wirth has lamented that, whereas Europeans pronounce his name > > correctly (Ni-klows Virt), Americans invariably mangle it into > > (Nick-les Worth). Which is to say that Europeans call him by name, but > > Americans call him by value." > > > > [quoted from unknown] > > :) > > >> > would disagree. He points > >> > to the situation where you have nested levels of 'if' statements, > >> > say 10 levels, > >> > and you have to 'get out' because of an error. Without the 'goto' > >> > you would have > >> > to handle this by having more or more complicated 'else' statements. > >> > The 'break label' handles this case nicely. > >> > >> As does the try ... catch clause, its modern replacement, which is in > >> every way better, and which is one reason Pascal is no longer on a > >> short list of useful languages. > > > > That's why there is object pascal, which if I'm not mistaken is what > > Delphi uses. That said, goto most often is a sign of a bad programmer > > at work but there are legitimate uses of it, > > The only "legitimate" use I can think of is to save the programmers' > time. It might take a great deal longer to structure the algorithm to do > without goto, but it is always possible. And in code that will never be > looked at again, one can argue that it doesn't matter. But this has the > effect of assuring conprehension problems if the code in fact must be > maintained or modified later on. It could make the code easier to read actually, when you jump out several levels of a nested structure. I've personally used it once in an error case. Throwing an exception would have been possible, but would have had the consequence of having to duplicate a bit of state information and complicating error handling a great deal. Another option would have been to break down the method in about 20 (!!!) small methods each doing only a few (very few) instructions each and jumping wildly around between them. Not to mention to copy state variables around or making them globally available. That's a bit ago and my memory on details is really fuzzy but the solution using a single labelled break was in my eyes far more straight forward and easier to read than the other options. I've no doubt that it is possible to achieve a better solution without the "goto" and without the shortcomings of the other alternatives but I didn't exactly have the time to mess around 2 days optimizing a single method (that is not a performance bottleneck). So in a way, yes, it did save me time but it did also make the code more readable. Don't forget, you can always document what you do and why you do it and a labelled break (or almost any break actually) is a great place to comment. > > however it is about as seldom if > > not more seldom as there are legitimate and useful uses of finalizers > > in java. And back on the assembler level, every branch is a goto so > > it's not exactly a vice, > > It's important to say that the presence of "goto" branches in assembly > don't justify their use in higher-level languages. Compilers are > deterministic, so they can deterministically compile well-structured code > just as well as that other kind. :) I can agree with that. I basically just wanted to point out to the people who heard that "goto is bad" and believe that whenever one shows up that means that the person who wrote it is to be fired, that assembler in the end knows nothing else and a well placed goto may yet have its place. > > though the compilers usually knows exactly when it makes > > sense to have one while people don't always. > > I don't think it's particularly useful to compare an abstraction like a > high-level language with assembly, which operates under different > constraints. It would be like requiring mathematicians to express > everything in binary, since that is ultimately what form any practical > computations will take later. > > Finally, GOTOs are like potato chips. It's very hard to have just one. :) Hehe that's a good oneliner :) I could live fine with just one. They are not inherently evil. If lots show up, that's a bad sign though. CU René -- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service $9.95/Month 30GB == 2 of 5 == Date: Mon, Aug 30 2004 4:38 pm From: Rene <[EMAIL PROTECTED]> "Liz" <[EMAIL PROTECTED]> wrote: > "Rene" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Paul Lutus <[EMAIL PROTECTED]> wrote: > > > Liz wrote: > > > > > > > > > > > "Paul Lutus" <[EMAIL PROTECTED]> wrote in message > > > > news:[EMAIL PROTECTED] > > > >> Glen wrote: > > > >> > > > >> > > > > >> > OK--- I understand the compiler can inline too. I am interested > > > >> > in other features too and want to see what is out there. > > > >> > > > > >> > I have a method that is over 400 lines long. Huge switch > > > >> > statements. The centerpiece is a data structor called a bitboard > > > >> > that represents a chess position in 96 bytes. > > > >> > > > > >> > I've reviewed the JVM op codes and taken that into account. > > > >> > > > > >> > This will probably blown your mind but I would kill for a GOTO > > > >> > statement. > > > >> > > > >> I hate to tell you this, but Java actually does have a GOTO (not > under > > > > that > > > >> name). It's a special form of "break" that can go to a defined > > > >> label. See below. > > > >> > > > >> The reason I hate to tell you this is because it is always a bad > > > > programming > > > >> idea. > > > > > > > > That guy that invented Pascal, Nick Worth(sp), > > > > > > Niklaus Wirth. > > > > "Niklaus Wirth has lamented that, whereas Europeans pronounce his name > > correctly (Ni-klows Virt), Americans invariably mangle it into > > (Nick-les Worth). Which is to say that Europeans call him by name, but > > Americans > call > > him by value." > > > > [quoted from unknown] > > > > > > would disagree. He points > > > > to the situation where you have nested levels of 'if' statements, > > > > say 10 levels, > > > > and you have to 'get out' because of an error. Without the 'goto' > > > > you would have > > > > to handle this by having more or more complicated 'else' > > > > statements. The 'break label' handles this case nicely. > > > > > > As does the try ... catch clause, its modern replacement, which is in > > > every way better, and which is one reason Pascal is no longer on a > > > short list of useful languages. > > > > That's why there is object pascal, which if I'm not mistaken is what > Delphi > > uses. That said, goto most often is a sign of a bad programmer at work > > but there are legitimate uses of it, however it is about as seldom if > > not more seldom as there are legitimate and useful uses of finalizers > > in java. And back on the assembler level, every branch is a goto so > > it's not exactly a vice, though the compilers usually knows exactly > > when it makes sense to have one while people don't always. > > > > CU > > > > René > > I worked on a project once that was about 25,000 lines of c code not > including comments. One of the guys put in 3 goto statements. He was > badgered so much to take them out that he quit. Well did they make the code more concise or did he put them in because he couln't solve a problem without them? In my experience, a well placed goto not only can solve a problem far easier but also far more readable instead of performing three catch and rethrows seven and a half level further up in a nested structure (ok, time to refactor the structure but just for the argument's sake...). A lot of goto's however means that the person that wrote the code started programming using gw-basic or a relative and has troubles with procedural and object-oriented programming. CU René -- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service $9.95/Month 30GB == 3 of 5 == Date: Mon, Aug 30 2004 9:40 pm From: Paul Lutus <[EMAIL PROTECTED]> Glen wrote: > > > Paul Lutus wrote: > > >> I hate to tell you this, but Java actually does have a GOTO (not under >> that name). It's a special form of "break" that can go to a defined >> label. See below. >> >> The reason I hate to tell you this is because it is always a bad >> programming idea. >> > > > Well the Java break can only be used inside a loop to get out of the > loop. It is not a goto. The Java break can in fact be used to go to an arbitrary label. So it is a goto. / ... >> So why not read about Java? >> >> http://java.sun.com/docs/books/tutorial/java/nutsandbolts/branch.html >> > > Well I'm a Java certified programmer with a degree in computer science-- > I've already read lots of books on Java. Had you read this link I provided you, you would have known that break is in fact a goto in Java. With all respect, you need to realize that saying "I have a degree in computer science" is a weak argument compared to actually reading the documentation. -- Paul Lutus http://www.arachnoid.com == 4 of 5 == Date: Mon, Aug 30 2004 9:42 pm From: Paul Lutus <[EMAIL PROTECTED]> Christopher Barber wrote: / ... >> The reason I hate to tell you this is because it [ goto, break ] is always a bad >> programming idea. > > Nonesense! What's wrong with labeled break/continue? Can you explain > exactly what kind of bad things can happen if you use it? It creates terrible, impossible-to-maintain code. It violates every precept of structured programming. This is why "goto" is gradually disappearing from computer languages. -- Paul Lutus http://www.arachnoid.com == 5 of 5 == Date: Mon, Aug 30 2004 9:45 pm From: Paul Lutus <[EMAIL PROTECTED]> Christopher Barber wrote: > Paul Lutus <[EMAIL PROTECTED]> writes: > >> > Break however has the severe limitation that it only allows breaking >> > out of one level of loop/switch. >> >> It also has the limitation that it can create unmaintainable code. > > Really, why is that? Please read the standard literature on this topic. > >> > goto and Javas break can exit more levels, which in some cases is very >> > handy. A return out of a function can do the same. >> >> But try ... catch is a superior alternative. > > No it isn't. It is much slower. False. You need to realize that a compiler turns a structured program listing into optimized code that bears very little resemblance to the original, and the more sophisticated the compiler, the less resemblance to the original there is. The choice to use goto or break is solely an issue of code maintainability and comprehension, it doesn't affect the running speed of the resulting program if the compiler is at all efficient. -- Paul Lutus http://www.arachnoid.com ========================================================================== TOPIC: Classes ending with semi-colon http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1ac79b60dc00d846 ========================================================================== == 1 of 2 == Date: Mon, Aug 30 2004 5:42 pm From: "P.Hill" <[EMAIL PROTECTED]> >>> String data[] = { >>> "this", >>> "is", >>> "a", >>> "test" >>> }; >>> >>>-- >> > Liz wrote: >>I think you can stick an extra comma after the last element >>in the list - > "test", > > Paul Lutus wrote: > Yes, but this is just a way to avoid a gratuitous error, it is not good > form. It's the same idea as the semicolon at the end of the class in the > original example. The array one is defined in the language spec, doesn't seem to appear in the spec: Class definition: http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#18988 Array Initializer: http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html#11358 My definition for good is that it matches the specified syntax, what definition of good are you using? I say Liz's example is perfectly good, but looking at Syntax in Chapter 18 of the JLS, the semi-after it turns out also to be good. The whole thing starts with: CompilationUnit: [package QualifiedIdentifier ; ] {ImportDeclaration} {TypeDeclaration} A Type declartion is defined: TypeDeclaration: ClassOrInterfaceDeclaration ; Which seems to mean that surprisingly enough a final semicolumn is a degenerate type definitation, so actually IS legal Java. Weird, really weird, -Paul H. == 2 of 2 == Date: Mon, Aug 30 2004 8:09 pm From: "Liz" <[EMAIL PROTECTED]> "P.Hill" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >>> String data[] = { > >>> "this", > >>> "is", > >>> "a", > >>> "test" > >>> }; > >>> > >>>-- > >> > > Liz wrote: > >>I think you can stick an extra comma after the last element > >>in the list - > "test", > > > > > Paul Lutus wrote: > > Yes, but this is just a way to avoid a gratuitous error, it is not good > > form. It's the same idea as the semicolon at the end of the class in the > > original example. > > The array one is defined in the language spec, doesn't seem to appear > in the spec: > > Class definition: > http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#1898 8 > Array Initializer: > http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html#11358 > > My definition for good is that it matches the specified syntax, what definition > of good are you using? > > I say Liz's example is perfectly good, but looking at Syntax in Chapter 18 of > the JLS, the semi-after it turns out also to be good. > > The whole thing starts with: > CompilationUnit: > [package QualifiedIdentifier ; ] {ImportDeclaration} > {TypeDeclaration} > > A Type declartion is defined: > > TypeDeclaration: > ClassOrInterfaceDeclaration > ; > > Which seems to mean that surprisingly enough a final semicolumn is > a degenerate type definitation, so actually IS legal Java. > > Weird, really weird, Not weird, the rationalization is that you can add additional array elements at the end without having to change this line. Only important when using a versioning system. ========================================================================== TOPIC: component similar to JTable, but AWT-based? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f15636daf0de7188 ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 6:57 pm From: Nikita Tovstoles <[EMAIL PROTECTED]> [ibm.software.websphere.studio.device-developer, comp.lang.java.programmer] Hi, I'm developing a PersonalProfile-based app to run on a PDA, and it seems like i really could use a component similar to javax.swing.JTable in functionality, but based on AWT. Are there any 3-rd party libs/components that fit that description? (stand alone, or part of gui toolkit) thanks -nikita ========================================================================== TOPIC: java applet network http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e7c700cb1476b929 ========================================================================== == 1 of 3 == Date: Mon, Aug 30 2004 8:01 pm From: marcus <[EMAIL PROTECTED]> BK -- I found his sarcasm funny. I also find the OP claims to be a native english speaker, which indicates either poor education or poor logic skills. Both of which are a severe handicap in programming. There is nothing racist in any of his remarks. Actually, he was asking pointed questions in a (vain IHMO) attempt to draw the OP out. if you find racism in places like this, perhaps you are looking a little too hard. Of course, I might just be a cracker (social sense, not networking sense). -- clh Babu Kalakrishnan wrote: > Paul Lutus wrote: > >> apple wrote: >> >> >>> :( >>> my first question is in english... >>> ok, i repeat my question, i have made a java applet and need use html >>> file >>> to call its class file. And now i want multiuser can call this applet by >>> specifying http://server_ip_address/vserver/filename.html. >> >> >> >> What? What Applet? What does it do? What is its purpose? How exactly >> is it a >> multiuser applet? >> >> >>> So how? >> >> >> >> How what? You already know how to use an HTML page to launch an >> applet, so I >> don't know what you are asking. >> > > Paul : > > If you don't understand the question or do not know the answer, why the > hell > can't you keep your big mouth shut for godssake ! As far as I know, Usenet > doesn't have a rule that says "All messages posted here must be > comprehensible > and answerable by a nincompoop who calls himself Paul Lutus". > > Insulting a user because his command of English doesn't match up to yours > stinks of racialism. Remember that English isn't the native language of the > majority of the world population. > > I am posting this message because I noticed the ridicule in identical > responses > by you to *two* different questions from the same user. From my past > interactions with you, I don't really expect you to think about this > rationally > and apologize for your remarks which were in bad taste, but at the same > time I > didn't want you to sit back and exult in the mistaken notion that the > rest of > Usenet enjoyed your poor attempt at satire (if they were meant to be that) > > To the OP : > > To get a reasonable answer to your queries, you have to make sure that > readers > can understand your question. In case you cannot express yourself well > enough > in the English language while posting in a newsgroup where the language > used is > English, try finding a newsgroup that speaks your native tongue - and if > such > an animal doesn't exist (which is very probable), please ask a friend > who can > express better in English to help you out. And also, ignore the Paul > Lutuses > that you'll find sporadically here - Unlike them who find pleasure in > putting > someone down in the name of language or nationality the vast majority of > users > post on Usenet are willing to help if possible. > > BK == 2 of 3 == Date: Mon, Aug 30 2004 9:55 pm From: Paul Lutus <[EMAIL PROTECTED]> Babu Kalakrishnan wrote: > Joona I Palaste wrote: >>>To the OP : >> >> >>>To get a reasonable answer to your queries, you have to make sure that >>>readers can understand your question. >> >> >> Isn't this exactly what Paul Lutus said? Why is it OK for you to say it >> but not OK for Paul Lutus to say it? >> > > Is it ? Thanks for translating - may be I misunderstood :-) Babu, I am sorry we had this exchange. I think I treated the OP reasonably well if brusquely, and he did say that English was his only language: "i only know english...", which made me think I was speaking to a native speaker. This is not the same kind of situation that you believed I was responding to, although in the end it may in fact have been the situation that you saw and I did not. Sorry for the entire exchange. -- Paul Lutus http://www.arachnoid.com == 3 of 3 == Date: Mon, Aug 30 2004 10:22 pm From: "apple" <[EMAIL PROTECTED]> To all java zu tou bing: ta ma de wang ba dan, ni men gou yen kan ren di, si feng zi. ========================================================================== TOPIC: chating in java applet http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a6e0246ff4a25a9c ========================================================================== == 1 of 2 == Date: Mon, Aug 30 2004 8:06 pm From: marcus <[EMAIL PROTECTED]> andrew gave you some good advice. Based on the several posts of yours I have read, I would suggest you take about twelve steps backwards and develop some basic skills before you tackle a chat program. You will need to have a good understanding of threads, serversockets, if streams, just to name a few. Try reading a few books and working through the sample programs. Also, this is a forum for specific problems with code -- try comp.lang.java.help for more general questions good luck! -- clh apple wrote: > i want to do multiuser chating program using java applet, and java applet > will be called in html, so is the connection method same if i java file > run as jframe but not applet class file called in html? > == 2 of 2 == Date: Mon, Aug 30 2004 10:41 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Mon, 30 Aug 2004 20:06:35 -0700, marcus wrote: (Applet chat program) I had meant, but forgot to mention, something like this.. > ..You will need to have a good understanding > of threads, serversockets, if streams, I/O streams? > just to name a few. Try reading a few books and working through the > sample programs. Yes. What marcus wrote. -- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology ========================================================================== TOPIC: JavaScript interpreter/evaluator class? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbf34c550ec28047 ========================================================================== == 1 of 2 == Date: Mon, Aug 30 2004 8:36 pm From: None <[EMAIL PROTECTED]> JavaScript interpreter/evaluator class? Does anyone know of a way to parse JavaScript expressions in Java? I am working on a report writer and one of the requirements is a formula facility. The best thing would be to be able to enter JavaScript expressions and have them evaluated. Does a class exist to do this? I've done some searching but haven't found anything. Thanks all! == 2 of 2 == Date: Mon, Aug 30 2004 10:27 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Mon, 30 Aug 2004 23:36:16 -0400, None wrote: > Does anyone know of a way to parse JavaScript expressions in Java? KC Wong apparently does, he was just mentioning it to some dude on c.l.j.help. ..Please do not multi-post. <http://www.physci.org/codes/javafaq.jsp#xpost> -- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology ========================================================================== TOPIC: opening an input stream to a file http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b0a7815976ed961 ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 9:48 pm From: Frank <[EMAIL PROTECTED]> On Mon, 30 Aug 2004 21:33:15 +0000 (UTC), Douglas <[EMAIL PROTECTED]> wrote: > I'm learning struts at the moment and in one example the code for a > business > class opens an input stream to a file using this code: > > java.io.InputStream i = > this.getClass().getClassLoader().getResourceAsStream("UserFile"); > > The InputStream object is then used to load data from the file into a > java.util.Properties object. > > My question is, why would someone open an input stream to a file this > way? > > Cheers. > > getResourceAsStream accounts not only that the file might be stored naturally in the client's file system, but will also search within the distributed .jar file for data files packaged with the program classes. -HTH Frank ========================================================================== TOPIC: hidden classes http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5a0582c77d807482 ========================================================================== == 1 of 2 == Date: Mon, Aug 30 2004 9:56 pm From: Frank <[EMAIL PROTECTED]> Hello, Got a small problem in a routine I've written... the code is much to large to post here, so I'm only asking if anyone has any similar experience. My routine compiles and executes just fine. However, when I look at the compiled files, I have one extra anonymous class. I expected to have a top level, and one inner level member class for a total of 2 classes. Instead I have a total of 3. When I disassemble this mystery class with javap -c -private, the result, in it's entirety is: Compiled from "MyClass.java" class MyPackage.MyClass$1 extends java.lang.Object{ } I erase the .class files, recompile, and the mystery class is again rebuilt. Checking my {'s and }'s, I think everything is lining up correctly (unless my eyes decieve me). Running javadoc on my code looks like all methods, fields are being assigned to their appropriate enclosing classes. Now the kicker: after compiling, I erase the mystery .class file, and execute the program with no problems. What could be causing the compiler to create extra files? Thanks, Frank == 2 of 2 == Date: Mon, Aug 30 2004 10:14 pm From: Frank <[EMAIL PROTECTED]> On Tue, 31 Aug 2004 04:56:42 GMT, Frank <[EMAIL PROTECTED]> wrote: Sorry, stumbled across my answer on another forum. It had to do with my private member class having a private constructor. Fixed that and no more surprises from the compiler :) > Hello, > > Got a small problem in a routine I've written... the code is much to > large to post here, so I'm only asking if anyone has any similar > experience. > > My routine compiles and executes just fine. However, when I look at the > compiled files, I have one extra anonymous class. I expected to have a > top level, and one inner level member class for a total of 2 classes. > Instead I have a total of 3. > > When I disassemble this mystery class with javap -c -private, the > result, in it's entirety is: > > Compiled from "MyClass.java" > class MyPackage.MyClass$1 extends java.lang.Object{ > } > > I erase the .class files, recompile, and the mystery class is again > rebuilt. > Checking my {'s and }'s, I think everything is lining up correctly > (unless my eyes decieve me). > Running javadoc on my code looks like all methods, fields are being > assigned to their appropriate enclosing classes. > > Now the kicker: after compiling, I erase the mystery .class file, and > execute the program with no problems. > > What could be causing the compiler to create extra files? > > Thanks, > > Frank ========================================================================== TOPIC: Access to Wireless LAN ... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b6710a272f95e58 ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 10:00 pm From: Paul Lutus <[EMAIL PROTECTED]> Michael Borgwardt wrote: > Paul Lutus wrote: >>>>So Bluetooth is NOT a wireless LAN technology? >>> >>>Not for the prevailing definition of "wireless LAN". >> >> >> You are embarrassing yourself in a technical forum. Sloganeering aside, >> Bluetooth is a wireless LAN technology. > > I am quite sure than most onlookers here will have found your behaviour > (sloganeering is a good word for it) rather more embarassing, certainly > socially, if not technically. Honest to God, you were entirely wrong and I posted the proof. > This thread was started with a request for technical help with > a specific problem, not for definition sophistry. Ah, I see. So once you are proven wrong, the sin is excessive technical sophistication on the part of your opponent. Ingenious, but not ingenuous. > And to that, > as I have to repeat for the socially challenged, it is absolutely > irrelevant whether Bluetooth is technically "*a* wireless LAN > technology", You once asserted forcefully that it was false and very relevant, now it is absolutely irrelevant. You could have taken the latter position earlier and saved yourself no small public embarrassment. -- Paul Lutus http://www.arachnoid.com ========================================================================== TOPIC: 1.5 howto http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f65789ac1abef909 ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 10:35 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Tue, 31 Aug 2004 00:16:45 +0200, Jacob wrote: > Apparently I can't get my code to compile under 1.5, > and as soon as I do, I can't make it work under 1.4. > So when I do make the leap, there is no turning back. Code compiled with 1.5 can be made to work with 1.1 (..and that's both MSVM 1.1.4 and Symantec 1.1.5) -- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology ========================================================================== TOPIC: java & java script http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5bb29439dd2da26d ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 10:51 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Mon, 30 Aug 2004 19:54:16 GMT, Grant Wagner wrote: >> Then Java became a "hot item", and so Netscape changed the name of >> Livescript to Javascript to cache in on the hype. (I'm not kidding, it's >> true.) (snip detail) > ..it seems that Sun was trying to benefit > from the name change as much as, if not more than, Netscape. ..and a very poor choice it was, one that resulted in untold confusion down the years, with lots more still to come. Ultimately though, I suspect it back-fired for both Java and Javascript.. Every bad thing in either language (lack of security, lack of availability, differences in implementation..) seems carried over to and dumped on the other, as far as end users and SysAdmins are concerned. -- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology ========================================================================== TOPIC: ATDT 123456789 How?? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c755fca6811fa45f ========================================================================== == 1 of 1 == Date: Mon, Aug 30 2004 11:07 pm From: Paul Lutus <[EMAIL PROTECTED]> - Chameleon - wrote: > How can I send to modem this string: > ATDT <phone number> On what OS, using what modem, on what computer? -- Paul Lutus http://www.arachnoid.com ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer". comp.lang.java.programmer [EMAIL PROTECTED] Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.java.programmer/prefs Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe ======================================================================= Google Groups: http://groups-beta.google.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/BCfwlB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/kumpulan/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
