comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * JNI and storing C pointers in the Java Class variables - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3948fccf951482eb * Create module for NetBeans - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f385c16f8315794b * Reverse Engineering, class diagram - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e3e67940724fa9b2 * solving java.lang.ClassFormatError: Field "has inconsistent hierarchy" in class - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/774950f496689315 * Looking for a class similar to 'opendir' and 'readdir' - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/815039ea9d4f6366 * How to implement Remember my Id in this computer? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ed7f8d70fc3d3efb * Struts Validator issue - Please Help - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cb68f5b4d54c2101 * comp.lang.java.{help,programmer} - what they're for (mini-FAQ 2004-10-08) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/efaa732d6dd296a1 * J2SE Bluetooth and java comm API - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/16e6786cb0f953d8 * Tomcat Help - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa88f8cee5426f60 * About java help under linux - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6578e87a6d01bdc9 * ip string to long and back again - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5c9c07b6c5b6449 * 1+ program writing simulatenously into a file, possible? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3405f5202a0623a4 * How to place the progressBar.......... - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5e3efee55c0c5296 * jdbc question - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bab6d8d5c6089b91 * [jsp]: getProperty - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6230ddcfe0818100 ============================================================================== TOPIC: JNI and storing C pointers in the Java Class variables http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3948fccf951482eb ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 12:46 am From: [EMAIL PROTECTED] Hi, Long does not work, but I need to double-check my code. One question : will pointer-as-long be also OK on a 64bits machines ? ( I do not have an Itanium, but AMD does have fine 64bits CPU... ) --p ============================================================================== TOPIC: Create module for NetBeans http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f385c16f8315794b ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 9:55 am From: "cc" Hi, where I can find the documentation/tutorial for create module/plugin for NetBeans 4.0 or 3.6? The documentation on www.netbeans.org is little. The documentation of Tome is very little. Thanks for your help, Carlo. ============================================================================== TOPIC: Reverse Engineering, class diagram http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e3e67940724fa9b2 ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 10:15 am From: "Hans Stoessel" Hi I have several Java- and C++-Projects. Now I would like to generate class diagrams from this projects. I'm looking for a (Windows-)freeware or shareware tool to do that. Does somebody knows such a tool? Thanks you very much. Hans ============================================================================== TOPIC: solving java.lang.ClassFormatError: Field "has inconsistent hierarchy" in class http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/774950f496689315 ============================================================================== == 1 of 2 == Date: Wed, Dec 29 2004 1:24 am From: [EMAIL PROTECTED] (hiwa) One probable cause is that your compiler version and JRE version that Tomcat uses are different. For example, 1.5 vs. 1.4. == 2 of 2 == Date: Wed, Dec 29 2004 7:51 am From: "Ryan Stewart" "hiwa" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > One probable cause is that your compiler version and JRE version that > Tomcat uses are different. For example, 1.5 vs. 1.4. You would get an UnsupportedClassVersionError for that. Besides which, the stack trace posted is from Tomcat 5.5.4 which runs on Java 1.5, so Java version isn't likely to be the problem. Unless someone is trying to run Tomcat 5.5.4 on Java 1.4. There's no telling what that would do. ============================================================================== TOPIC: Looking for a class similar to 'opendir' and 'readdir' http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/815039ea9d4f6366 ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 1:49 am From: "Ramon" Hi Ann: Thanks for your answer. It's helpful and makes sense, too. > You don't need this, why do you think you want it? I'll answer the above in a general manner. I can think of 2 reasons why I like to be able to use relative paths and change default directory at run time: (1) I like a world were I have options and choices. (2) I don't like being lied to. A 'chdir()' call that does nothing is a lie. -Ramon ============================================================================== TOPIC: How to implement Remember my Id in this computer? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ed7f8d70fc3d3efb ============================================================================== == 1 of 2 == Date: Wed, Dec 29 2004 2:01 am From: [EMAIL PROTECTED] (Amar More) hello, I am implementing messenger in java. I want to proivde the facility of remembering the id and password on the local machine. Since I am a new user, I don't know where these id and passwords are saved in case of Windows operating system. Can anyone tell me whrere those entries are saved, and general idea of how to implement that? Eagerly waiting for your reply. == 2 of 2 == Date: Wed, Dec 29 2004 10:39 am From: Andrew Thompson On 29 Dec 2004 02:01:07 -0800, Amar More wrote: > I am implementing messenger in java. I want to proivde the > facility of remembering the id and password on the local machine. Ask the user for the id/password, then store it in a sub-directory of 'user.home'. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ============================================================================== TOPIC: Struts Validator issue - Please Help http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cb68f5b4d54c2101 ============================================================================== == 1 of 2 == Date: Wed, Dec 29 2004 2:10 am From: "Saad Malik" Hi Everyone, I'm building a wizard flow that has about 5 pages linked to the same form. The only issue I'm having is the validator is requiring fields that haven't even been submitted.. Example: Assume the ActionForm contains two fields (both of them required): firstName and SSN.. On the first page the user would enter his firstName and click next to type in the SSN. So in the validation.xml I would depend both of firstName and SSN, but it never moves from the first page because SSN is always empty... Please tell me the **BEST** solution... (j/k)... I want the cleanest and 'best practiced' solution please... Thanks. == 2 of 2 == Date: Wed, Dec 29 2004 8:48 am From: Sudsy Saad Malik wrote: <snip> > On the first page the user would enter his firstName and click next to > type in the SSN. > > So in the validation.xml I would depend both of firstName and SSN, but > it never moves from the first page because SSN is always empty... > > Please tell me the **BEST** solution... (j/k)... I want the cleanest > and 'best practiced' solution please... <snip> From the documentation to which you should have already referred (vis <http://struts.apache.org/userGuide/dev_validator.html>), here's an extract: "Multi Page Forms The field element has an optional page attribute. It can be set to an integer. All validation for any field on a page less than or equal to the current page is performed server side. All validation for any field on a page equal to the current page is generated for the client side Javascript. A mutli-part form expects the page attribute to be set. <html:hidden property="page" value="1"/> " IOW, RTFM. ============================================================================== TOPIC: comp.lang.java.{help,programmer} - what they're for (mini-FAQ 2004-10-08) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/efaa732d6dd296a1 ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 10:25 am From: [EMAIL PROTECTED] (David Alex Lamb) Last-Modified: Fri Oct 8 11:38:42 2004 by David Alex Lamb Archive-name: computer-lang/java/help/minifaq Posting-Frequency: every 4 days Before posting read Jon Skeet's "How to get answers on the comp.lang.java.* newsgroups" at http://www.pobox.com/~skeet/java/newsgroups.html Java FAQs and advice: - Java FAQ (Andrew Thompson) http://www.physci.org/codes/javafaq.jsp including his list of other FAQs http://www.physci.org/codes/javafaq.jsp#faq - Java/Javascript/Powerbuilder HOWTO (Real Gagnon) http://www.rgagnon.com/howto.html - Java Glossary (Roedy Green) http://www.mindprod.com/jgloss.html - jGuru jFAQs (John Zukowski) http://www.jguru.com/jguru/faq/ - Focus on Java (John Zukowski) http://java.about.com/ - Java Q&A (David Reilly) http://www.davidreilly.com/jcb/faq/ - Java GUI FAQ (Thomas Weidenfeller) http://www.physci.org/guifaq.jsp comp.lang.java.help Set-up problems, catch-all first aid. According to its charter, this unmoderated group is for immediate help on any Java problem, especially when the source of the difficulty is hard to pin down in terms of topics treated on other groups. This is the appropriate group for end-users, programmers and administrators who are having difficulty installing a system capable of running Java applets or programs. It is also the right group for people trying to check their understanding of something in the language, or to troubleshoot something simple. comp.lang.java.programmer Programming in the Java language. An unmoderated group for discussion of Java as a programming language. Specific example topics may include: o types, classes, interfaces, and other language concepts o the syntax and grammar of Java o threaded programming in Java - sychronisation, monitors, etc. o possible language extensions (as opposed to API extensions). The original charter said that discussion explicitly should not include API features that are not built into the Java language and gave examples like networking and the AWT. These days AWT belongs in clj.gui, and networking (and many other APIs) are often discussed in clj.programmer. Do not post binary classfiles or long source listings on any of these groups. Instead, the post should reference a WWW or FTP site (short source snippets to demonstrate a particular point or problem are fine). For some problems you might consider posting a SSCCE (Short, Self Contained, Correct (Compilable), Example); see http://www.physci.org/codes/sscce.jsp Don't post on topics that have their own groups, such as: comp.lang.java.3d The Java 3D API comp.lang.java.advocacy Arguments about X versus Y, for various Java X and Y comp.lang.java.beans JavaBeans and similar component frameworks comp.lang.java.corba Common Object Request Broker Architecture and Java comp.lang.java.databases Using databases from Java comp.lang.java.gui Java graphical user interface design and construction comp.lang.java.machine Java virtual machines, like JVM and KVM comp.lang.java.security Using Java securely comp.lang.java.softwaretools Tools for developing/maintaining Java programs Don't cross-post between these groups and c.l.j.programmer or .help -- it just wastes the time of people reading the general groups. Don't post about JavaScript; it's a different language. See comp.lang.javascript instead. -- "Yo' ideas need to be thinked befo' they are say'd" - Ian Lamb, age 3.5 http://www.cs.queensu.ca/~dalamb/ qucis->cs to reply (it's a long story...) ============================================================================== TOPIC: J2SE Bluetooth and java comm API http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/16e6786cb0f953d8 ============================================================================== == 1 of 3 == Date: Wed, Dec 29 2004 11:44 am From: ByteCoder Eta wrote: > Hello > >> What happens if you use the exact same code in the example and just >> change the message String? >> > > Normally I use the exact same code in the example! > If I change the message String the result is the same! > > Eta Could you only past the non-modified example please? -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat == 2 of 3 == Date: Wed, Dec 29 2004 12:24 pm From: Eta Hi, here you: > > Could you only past the non-modified example please? > import java.io.*; import java.util.*; import javax.comm.*; public class SimpleWrite { static Enumeration portList; static CommPortIdentifier portId; static String messageString = "Hello, world!\n"; static SerialPort serialPort; static OutputStream outputStream; public static void main(String[] args) { portList = CommPortIdentifier.getPortIdentifiers(); while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { serialPort = (SerialPort) portId.open("SimpleWriteApp", 2000); } catch (PortInUseException e) {} try { outputStream = serialPort.getOutputStream(); } catch (IOException e) {} try { serialPort.setSerialPortParams(9600, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); } catch (UnsupportedCommOperationException e) {} try { outputStream.write(messageString.getBytes()); } catch (IOException e) {} } } } } } == 3 of 3 == Date: Wed, Dec 29 2004 12:48 pm From: ByteCoder Eta wrote: > Hi, here you: > >> >> Could you only past the non-modified example please? >> <snip code> > static String messageString = "Hello, world!\n"; <snip code> You're telling me that "Hello, World!\n" works, but any other test doesn't? I hope you didn't forget the newline character at the end of the string. Have you tried this? static String messageString = "Work, you POS!\n"; ;) I suppose the newline character is important. -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat ============================================================================== TOPIC: Tomcat Help http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa88f8cee5426f60 ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 3:21 am From: "Paul W" > > 2) Anyone try to run multiple instances of Tomcat as a service on the > > same box? > > All the time on *nixes. Never tried it on NT, though. You might have to > make your own service bootstrap. Not sure if the jakarta installer will > do that for you. > How easy\hard is that? Looks like I need to read up on Java a bit more. Thanks, for everyone's help. Looks like this might be easier then I thought! Paul W PS Sorry for the delay in responding, Xmas got in the way. ============================================================================== TOPIC: About java help under linux http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6578e87a6d01bdc9 ============================================================================== == 1 of 2 == Date: Wed, Dec 29 2004 11:41 am From: Juha Laiho [EMAIL PROTECTED] (kevin) said: >I wonder if there is some help documents available under linux for >java, like chm help document for windows, I installed gnome chm >viewer, but it is not so functional compare with that under windows, >so, could you give some suggestions about how I can get the JAVA API >query function with linux. If your connection is fast (and reliable) enough, you can browse the Java API doumentation straight from Suns web site; http://java.sun.com/j2se/1.4.2/docs/api/ (just substitute the 1.4.2 with the version number of your JDK). For direct access to documentation of some given class, use URLs like http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html For local copy of the API docs, there are download links at http://java.sun.com/j2se/1.4.2/docs/ Additionally, Java IDEs may include an internal documentation browser (f.ex. Netbeans does). -- Wolf a.k.a. Juha Laiho Espoo, Finland (GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++ "...cancel my subscription to the resurrection!" (Jim Morrison) == 2 of 2 == Date: Wed, Dec 29 2004 12:44 pm From: Steve Horsley kevin wrote: > Hi guys: > > I wonder if there is some help documents available under linux for > java, like chm help document for windows, I installed gnome chm > viewer, but it is not so functional compare with that under windows, > so, could you give some suggestions about how I can get the JAVA API > query function with linux. > The only thing I use is the API documentation and the Tutorial. Since konqueror can read html inside zip files, there's no need to unzip the two files into directory trees at all. Steve ============================================================================== TOPIC: ip string to long and back again http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5c9c07b6c5b6449 ============================================================================== == 1 of 2 == Date: Wed, Dec 29 2004 12:40 pm From: Steve Horsley Ryan Stewart wrote: > "ByteCoder" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Ryan Stewart wrote: >> >>>The other posts will help you along, but I'm curious how you intend to >>>represent an IP as a long. Does 127.0.0.1 become 127001? If so, then what >>>about 12.70.0.1? >> >>You could use leading zero's. So 127.0.0.1 would become: "127000000001" >> > > Duuuh. That didn't occur to me :) > > Another thing that does not seem to have occured to anyone - a long is not long enough to hold an IPv6 address. And any code that assumes that IP addresses are only 4 bytes is broken. Steve == 2 of 2 == Date: Wed, Dec 29 2004 6:05 am From: ByteCoder Steve Horsley wrote: > Ryan Stewart wrote: > >> "ByteCoder" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> Ryan Stewart wrote: >>> >>>> The other posts will help you along, but I'm curious how you intend >>>> to represent an IP as a long. Does 127.0.0.1 become 127001? If so, >>>> then what about 12.70.0.1? >>> >>> >>> You could use leading zero's. So 127.0.0.1 would become: "127000000001" >>> >> >> Duuuh. That didn't occur to me :) >> > Another thing that does not seem to have occured to anyone - a long is > not long enough to hold an IPv6 address. And any code that assumes that > IP addresses are only 4 bytes is broken. Thanks for the info. I thought a long had more memory available than an int. Guess not. -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat ============================================================================== TOPIC: 1+ program writing simulatenously into a file, possible? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3405f5202a0623a4 ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 12:55 pm From: Steve Horsley ByteCoder wrote: > I agree with that. That's a better solution than mine, but what do you > mean by "Your write routine would first try to allocate a server socket > of a particular unusual number"? > Shouldn't the application controlling the file and accepting incomming > connections be using a ServerSocket? The server should be 'blocking' > like it normally does and the applications connecting to it should have > a timeout long enough allow another application to complete it's write. > He's talking about using the ServerSocket as a locking mechanism. Only one ServerSocket can be open at a particular port number. A second app trying to listen on the same port gets an exception "address in use". If everybody refrains from opening the file unless they also have the open ServerSocket then that guarantees single-user access only. The OP doesn't say why simultaneous (I guess he means concurrent) access is wanted, but I advise against trying. Some OSs won't allow it, and I know from experience that corruption can occur when it is possiblbe. For instance two threads or processes opening the same file for appending keep their own write-position indicator, don't know when the other thread writes, and tend to overwrite each other's output. It's a problem with log files. Steve ============================================================================== TOPIC: How to place the progressBar.......... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5e3efee55c0c5296 ============================================================================== == 1 of 2 == Date: Wed, Dec 29 2004 5:07 am From: "Bobby" Hi, i am developing a file transfer application, every thing was working fine, and now i want a progressbar to be popped up when file is being transfered, and the progressbar, should be like of popup and should display the progress of status, how can i show a progress bar in a popup (dialog). Thanks, dwurity == 2 of 2 == Date: Wed, Dec 29 2004 6:05 am From: Andrew Thompson On 29 Dec 2004 05:07:40 -0800, Bobby wrote: > ..how can i show a progress bar in a popup (dialog). Why AWT? <http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JProgressBar.html> ..and <http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JDialog.html> ..or.. <http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JOptionPane.html> BTW, are you aware of c.l.j.gui? <http://www.physci.org/codes/javafaq.jsp#cljg> HTH -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane ============================================================================== TOPIC: jdbc question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bab6d8d5c6089b91 ============================================================================== == 1 of 2 == Date: Wed, Dec 29 2004 5:57 am From: jmt Using JDBC , what would be a more elegant way of determining whether or not a record already exists in a DB table before inserting it? Jeff Registered Linux user number 366042 == 2 of 2 == Date: Wed, Dec 29 2004 6:03 am From: ByteCoder jmt wrote: > Using JDBC , what would be a more elegant way of determining whether or > not a record already exists in a DB table before inserting it? > > Jeff > Registered Linux user number 366042 There is a findByPrimaryKey method, if I am not mistaken. -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat ============================================================================== TOPIC: [jsp]: getProperty http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6230ddcfe0818100 ============================================================================== == 1 of 1 == Date: Wed, Dec 29 2004 5:59 am From: Sudsy Ryan Stewart wrote: > "Marcus Reiter" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> <snip> > Are you sure you're not supposed to be getting just one entry from the > database at a time and creating a single bean based on it? On what basis are > you retrieving values from the database? What's your key, so to speak? I > know before you were setting an int, which caused a Vector to be populated. > Why does a key have multiple values? *If* you've been doing something wrong, > and each key is only supposed to get one value, it's not too hard. I'm sure > you could figure that out. But something here isn't quite adding up. If > you're not supposed to use scriptlets or other libraries, and each key has > to correspond to multiple bean values... I'm just not seeing a clean way of > doing it. Since nobody else has jumped into this thread, I assume that they > aren't having any bright ideas either. <snip> Ryan, You and I did everything but write the code which would have made the original post work. OP then went off on various tangents. Now we find out that it's a uni assignment. I didn't want to get one of my spoons dirty (or spend the time) providing the complete solution based on the original post. I /assumed/ (my mistake) that the OP had a least a modicum of Java experience, else why would they be jumping into JSPs? The mods should have taken just a few moments: change the name of the mutator in the bean code and the property name in the jsp:setProperty tag. So why has this thread continued? Have the requirements changed? Why isn't OP asking his prof, someone who's actually getting PAID to provide assistance? ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
