comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Setting DOCTYPE to a DOM- document - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7f0a2e7258baad09 * iBatis / EJB - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2ed0d6a8ab4e527 * Encode url with JSDK 1.3 - 5 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c90968ed885b60c9 * getLocalHost Question - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e4c429df340243d0 * .class file includes debug info?? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/68f1bf9ec4850ab3 * JAVA DEVELOPER POSITION AVAILABLE Washington,DC - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8f89a0f9fa9f9a6b * How Web Service get container context??? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/35212768039a49a6 * cluster versus load balancing - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f73b032b5044c21f * Limiting the number of browsers launched - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47ce5a124ef5d54b * JDom -- > JTree - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6277bd3980a4fb6 * Splitting a full-duplex socket - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51615aee9a18c299 * AXIS attachment problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3bfcc79ab5bfb9a0 * AdjustmentEvent.getAdjustementType() Always Returns TRACK - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fe68c18f2db289d3 * Using Java sound API to record to a wav file - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b3e62ca66fa2a7db * which embedded JVM for JNI and irda socket ? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9287c98f42e24d10 * JNI object retrieval on C++ side - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc4f14e4dca84ee7 * Packing JRE - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d1a5c7579f5f09e2 ============================================================================== TOPIC: Setting DOCTYPE to a DOM- document http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7f0a2e7258baad09 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 8:25 am From: "John C. Bollinger" Michael: I wrote a response to your e-mail, but your mail system does not appear to be accepting it from mine. Refer to my last response on this thread for information on resolving your problem. John Bollinger [EMAIL PROTECTED] ============================================================================== TOPIC: iBatis / EJB http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2ed0d6a8ab4e527 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 2:30 pm From: "horseface" Hi everybody. Recenetly I have made a web services application, and I used iBatis as a basis for O/R mapping with a database. The application is kinda like JPetstore, only the services are a bit more functional and webapp/services are decoupled through the use of Web services. Now I'd like to switch some of the O/R mapping to EJB, because they need tighter security and transaction control. How can I do this with minimal invasion of the original source code? To be more precise, I'd like to keep the DAO objects, and somehow change some of the SQLMap objects into their entity EJB equivalents. Is this possible or these frameworks can't coexist together? Thanks for any kind of help. Cheers! ============================================================================== TOPIC: Encode url with JSDK 1.3 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c90968ed885b60c9 ============================================================================== == 1 of 5 == Date: Wed, Dec 22 2004 6:16 am From: "Jon Caldwell" That can be frustrating. I have one project I am bound to 1.3, and another I must use 1.1.8 (stupid antequated AIX releases!). The underlying implementation of URLEncoder.encode wraps a OutputStreamWriter which wraps around a ByteArrayOutputStream. They use the 1-parameter constructor of OutputStreamWriter, which accepts the OutputStream. URLEncoder is a very simple class, you may want to resort to rewriting your own implementation of it. Also, I believe that Jakarta Commons runs on 1.3. Check out the Commons Codec package. http://jakarta.apache.org/commons/codec/. == 2 of 5 == Date: Wed, Dec 22 2004 2:24 pm From: Andrew Thompson On 22 Dec 2004 06:16:58 -0800, Jon Caldwell wrote: .. > URLEncoder is a very simple class, .. Vis.. <http://www.physci.org/source.jsp?class=java.net.URLEncoder> -- 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 == 3 of 5 == Date: Wed, Dec 22 2004 6:40 am From: "Jon Caldwell" http://www.physci.org/source.jsp?class=java.net.URLEncoder appears to be the 1.4 version of the class, which, it appears, will actually compile against the 1.3 compiler. == 4 of 5 == Date: Wed, Dec 22 2004 3:33 pm From: Andrew Thompson On 22 Dec 2004 06:40:24 -0800, Jon Caldwell wrote: > http://www.physci.org/source.jsp?class=java.net.URLEncoder appears to > be the 1.4 version of the class, .. Yep, directly from the 1.4.2 src.zip. I might upload 1.5 soon. -- 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 == 5 of 5 == Date: Wed, Dec 22 2004 4:36 pm From: "Jacob Welsh" > http://www.physci.org/source.jsp?class=java.net.URLEncoder appears to > be the 1.4 version of the class, which, it appears, will actually > compile against the 1.3 compiler. Thanks a lot! ============================================================================== TOPIC: getLocalHost Question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e4c429df340243d0 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 6:52 am From: [EMAIL PROTECTED] Awesome. Thank you very much. ============================================================================== TOPIC: .class file includes debug info?? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/68f1bf9ec4850ab3 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 3:40 pm From: "Chris Uppal" [EMAIL PROTECTED] wrote: > Thanks for your suggestion. I understand your "approximate approach" to > mean that if I write a shell script which "greps" a .class file for the > words "LocalVariableTable" and "LineNumberTable", it will tell me > whether the .class file contains debug info. Yes, or any other file scanning tool that you are comfortable with. One thing I've just now discovered is that the JDK 1.5.0 javac seems to include a "LineNumberTable" whatever the value of the compile-time flags, so that part of the test may be of no use to you (depending on which part of the debugging information you want to know about). > I'm not too sure what you mean by "parsing the classfile (use whatever > bytecode library comes to hand)." Do you mean that I should write a > Java program, that will tell me whether the file contains debug info? > If so, any suggestions about how I might achieve this in Java (or some > other language) would be very welcome. Well, I mean that you /could/ "write a Java program [etc]". I'm not recommending you /do/ it unless you need to be able to tell /for sure/ what debugging information is present. My guess is that you /don't/ need to be so certain. Actually it's not difficult to do using something like BCEL, the bytecode library from the Apache Jakarta project. I was going to add a few pointers to how to do it (should you decide you need it) but it turns out to be easer just to post code, so I've appended a /very quick/ hack to the end of this. All it does is loads each classfile named on the command line. Loops over each class's methods. For each method it looks to see if there is LocalVariableTable (or LineNumberTable, but that's commented out), and prints the names of the classes that have at least one method with the required data. -- chris ======== QUICK HACK ========= import java.io.*; import org.apache.bcel.classfile.*; public class IsDebug { public static void main(String[] args) throws IOException { for (int i = 0; i < args.length; i++) if (hasDebugInfo(args[i])) System.out.println(args[i]); } public static boolean hasDebugInfo(String filename) throws IOException { ClassParser parser = new ClassParser(filename); JavaClass clazz = parser.parse(); Method[] methods = clazz.getMethods(); for (int i = 0; i < methods.length; i++) if (hasDebugInfo(methods[i])) return true; return false; } public static boolean hasDebugInfo(Method method) throws IOException { if (method.getLocalVariableTable() != null) return true; /* * interestingly, JDK 1.5.0 (and possibly earlier) seems to include * a line number table whatever the compile-time flags so this test * may not be much use. if (method.getLineNumberTable() != null) return true; */ return false; } } ============================================================================== TOPIC: JAVA DEVELOPER POSITION AVAILABLE Washington,DC http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8f89a0f9fa9f9a6b ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 10:44 am From: [EMAIL PROTECTED] JAVA DEVELOPER POSITION AVAILABLE Our Client is currently looking to fill this position in the Washington, DC area. Required * 5 to 7 years Java/J2EE Development experience * Proven experience with Java technologies: EJBs, JMS, JDBC * Proven experience with IBM products: Websphere, Rational XDE,MQ * Knowledge of Eclipse framework and open source tools (i.e., Jakarta project, Spring) * Developed and implemented Web Services using SOAP, WSDL, and XML * Lead small team or independently implemented complex designs for distributed systems * Knowledge of full system lifecycle development methodologies * Knowledge of and experience in applying Gang of Four and Enterprise Application Architecture design patterns * Proven experience in mentoring junior Java/J2EE developers * Excellent oral and written communications * Great attitude and willingness to work as member of a team Preferred * Exposure to test driven development (i.e., JUnit) and code coverage concepts (i.e, JCoverage) * Familiar with automated testing tools such as Quick Test Pro, Winrunner, LoadRunner, SOAPTest * Familiar with Use Case development approach * UDB / DB2 SQL experience * Development and/or maintained applications developed using IBM VisualAge Smalltalk * Experience in performance tuning and optimization Excellent package and remuneration. Please forward your resume in confidence to: Donald Lascelle [EMAIL PROTECTED] www.objectsearch.com All candidates will be contacted. ============================================================================== TOPIC: How Web Service get container context??? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/35212768039a49a6 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 8:26 am From: [EMAIL PROTECTED] (TDOR) My webservice is a plain old java object, it dosent inherit from GenericServlet class so i cant call getServletConfig().getServletContext() etc. It seems the filepath ".\" points to the root of the OC4J container, so one solution is to assume that the right path to web-inf is .\applications\<mywebapp>\<mywebapp>\web-inf. This is prob not container-agnostic but at least i have a solution. ============================================================================== TOPIC: cluster versus load balancing http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f73b032b5044c21f ============================================================================== == 1 of 2 == Date: Wed, Dec 22 2004 8:46 am From: [EMAIL PROTECTED] I want to know what's the differences between cluster and load balance? cluster consists of load balance? Please advise. thanks!! == 2 of 2 == Date: Wed, Dec 22 2004 7:43 pm From: ByteCoder [EMAIL PROTECTED] wrote: > I want to know what's the differences between cluster and load balance? > cluster consists of load balance? > > Please advise. thanks!! Tough you could easily look this up on google... The processing load is balanced among the nodes in the cluster. -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat ============================================================================== TOPIC: Limiting the number of browsers launched http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47ce5a124ef5d54b ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 6:51 pm From: Stanimir Stamenkov [cross-posted to c.l.j.programmer, follow-up to c.l.j.programmer] /Hegemony Cricket/: > My application launches a web browser to view various files. I use the > standard trick to launch them: > > Process p = Runtime.getRuntime().exec( new String[] { "command.com", > "/c", "explorer", myfilename } ); The above would fail on any WinNT (i.e. NT4/2000/XP and up) system. On these systems there's no "command.com" but "cmd.exe". AFAIK the preferred method to start the default registered browser on all Windows systems is by invoking: rundll32 url.dll,FileProtocolHandler <url> Where you need to substitute the <url> in the above line with the requested URL. Here's an article on this one: "Control browsers from your Java application" <http://www.javaworld.com/javaworld/javatips/jw-javatip66.html> > I'm trying to limit the number of browsers launched at any one time to, > say, three. I thought I could just keep a List of the Processes returned > from this call, and before I launched a new one, see if any of the previous > Processes have exited, and don't launch if there are more than three that > haven't. > > Unfortunately, the process seems to have an exit value right away, once > the browser is launched successfully. Is there any way to track the > actual browser process, and see if it is still running? The above may actually help solving this issue, I'm not sure though. -- Stanimir ============================================================================== TOPIC: JDom -- > JTree http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6277bd3980a4fb6 ============================================================================== == 1 of 2 == Date: Wed, Dec 22 2004 8:55 am From: [EMAIL PROTECTED] (Arun Hallan) Hi, I have so far created a program that takes an xml document and creates a document object model from it. My gui includes a JTree, and when a user opens an xml document, the JTree should show the contents of the xml file, each node being a new tag etc. I haven't much idea to go about this tho. I have looked around but become more confused as i research furthur. Could someone give me some tips on what i should research, and what process i should go about. == 2 of 2 == Date: Wed, Dec 22 2004 9:03 am From: "atishay kumar" hi arun, first you need to parse the XML file.. Your XML file will contain A root Element.. under which you will have categories(which will be nodes of the JTree).. and each category may have further sub categories(how many depends on the XML file). So You need to parse the XML and generate the list of categories.. and using that you should build the JTree.. cheers atishay ============================================================================== TOPIC: Splitting a full-duplex socket http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51615aee9a18c299 ============================================================================== == 1 of 3 == Date: Wed, Dec 22 2004 9:11 am From: "cyberco" I have a Server that supports full-duplex sockets (read and write simultaneously), but a client that can't. So what I want to do is create a proxy that talks full-duplex to the server, but over 2 seperate sockets to the client. What is the best way to do this? Thanks, cyberco == 2 of 3 == Date: Wed, Dec 22 2004 5:44 pm From: Steve Horsley cyberco wrote: > I have a Server that supports full-duplex sockets (read and write > simultaneously), but a client that can't. So what I want to do is > create a proxy that talks full-duplex to the server, but over 2 > seperate sockets to the client. What is the best way to do this? > Thanks, > cyberco > Can you explain the problem a bit more? What is wrong with the client, and how would 2 separate connections help? Steve == 3 of 3 == Date: Wed, Dec 22 2004 6:42 pm From: Gordon Beaton On 22 Dec 2004 09:11:35 -0800, cyberco wrote: > I have a Server that supports full-duplex sockets (read and write > simultaneously), but a client that can't. So what I want to do is > create a proxy that talks full-duplex to the server, but over 2 > seperate sockets to the client. What is the best way to do this? I'm having trouble understanding the real problem here. TCP sockets are full duplex at *both* ends. There are os-specific mechanisms for duplicating a file descriptor that you could use to separate reader and writer processes, but you can achieve the same thing by using two Threads in your java application. If your client can use two separate Sockets to communicate in each of two directions, why can't it use a single Socket to do the same? Maybe you need to be more specific: what makes the client unable to support full duplex sockets? Why can't you do in the client application what you intend to do in the proxy, but without the extra sockets? /gordon -- [ do not email me copies of your followups ] g o r d o n + n e w s @ b a l d e r 1 3 . s e ============================================================================== TOPIC: AXIS attachment problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3bfcc79ab5bfb9a0 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 9:12 am From: [EMAIL PROTECTED] Hi, Currently i tried to make attachment with AXIS . I have following error message Exception in thread "main" AxisFault faultCode: {http://xml.apache.org/axis/}Server.NoService faultSubcode: faultString: The AXIS engine could not find a target service to invoke! target Service is null faultActor: faultNode: faultDetail: I think i could resolve my problem if i found a little attachment sample ? Where could i found it, or a tutorial ? Regards Philippe ============================================================================== TOPIC: AdjustmentEvent.getAdjustementType() Always Returns TRACK http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fe68c18f2db289d3 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 8:57 am From: "kag" I am calling the getAdjustmentType method in an AdjustmentListener for a vertical scrollbar. Regardless of whether the up arrow or the down arrow is clicked, this method always returns AdjustmentEvent.TRACK. Shouldn't it be returning UNIT_INCREMENT or UNIT_DECREMENT? ============================================================================== TOPIC: Using Java sound API to record to a wav file http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b3e62ca66fa2a7db ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 6:40 pm From: Nomak Hello, i can't get how Java sound was done. I would like to do that: - enable the user to choose from a combo box an input device (webcam microphone, line-in, etc) - enable the user to choose from a combo box an audio format _compatible_ with the selected input device (which means the combo is updated after the input device is selected) Can somebody help me? -- Nomak ============================================================================== TOPIC: which embedded JVM for JNI and irda socket ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9287c98f42e24d10 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 11:06 am From: [EMAIL PROTECTED] Hi, My apps ( http://heartbit.sourceforge.net ) is targeted at small devices ( palm, pocketPC and smartphone ). Its needs access to socket-based IRda communication. I know SuperWaba, altough it does not support natively irda-socket, allows to write JNI-style native libs. which is fine for me. Which other JVM will allow to irda sockets ( natively or through JNI ) ? will J2ME include this ? I googled for the answer, without success... TIA, --Philippe ============================================================================== TOPIC: JNI object retrieval on C++ side http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc4f14e4dca84ee7 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 11:31 am From: "Tim Wong" I am new with using JNI and haven't found any code snippets for what I am trying to do....please bear with me. -I have a java method (in java class TestClass) returning an object: public Object getPublicKey(){ KeyPair kp; ... ... PublicKey thePubKey = kp.getPublic(); return ( (Object)thePubKey ); } -I have a C++ function trying to use JNI to run this like so: (assumptions...I have the JNI MethodID of getPublicKey.) bool CTestClass::getKey(){ ??? } Assuming I have the c++ pointers setup for an instance of "TestClass" and a methodID for "getPublicKey()", What would be the proper way to call getPublicKey() from C++? Once I get the Object returned from getPublicKey(), how do I access it's methods and public members? ============================================================================== TOPIC: Packing JRE http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d1a5c7579f5f09e2 ============================================================================== == 1 of 1 == Date: Wed, Dec 22 2004 11:55 am From: Steve Sobol Andrew Thompson wrote: > In what way did your statement correlate to what you quoted? Heh. I didn't express myself very well, now did I. Sorry. Let's try this again. "In that case, if you only require windows support, it makes more sense to develop [your application] in .NET" than it does to just bundle a JRE with your application? That was the comment I was referring to as "just silly." Even if you *are* developing only for Windows, to switch to another language/development platform *only* for the purpose of easily building an executable doesn't make a whole lot of sense. Furthermore, quoting another one of your replies in this thread, ".NET is Win oriented. The layouts could be simpler for the direct reason of not having to support a vast variety of fonts, font sizes and PLAF's." But you don't have to with Java, either. Either use the Windows L&F on Swing, or (IMHO a better choice) use the Standard Widget Toolkit. "I imagine the .NET IDE would also have a D'n'D GUI editor, which would also speed development over the general Java approach of hand coding the GUI." I use Eclipse and Jigloo and see the same benefits. People running NetBeans can also use DnD. "It would be much easier in .NET to display/edit common MS document formats such as .doc, .xls, to get the 'OS Component', and actively control it." I doubt it. Maybe a little easier. You can embed ActiveX objects in a Java app running on Windows, can't you? (I could be wrong about this; have never tried it) "Besides, you have to weigh that against the downside of making a Win .exe from a Java jar file, as detailed at the link I provided to creating an 'exe'." Or not - you can create a separate EXE and still package the JARs separately, and there is at least one Java install builder that'll do this. > How many Win users do you think *I think* have Java? You said "many". I'm saying "still relatively few", and I apologize, that should have been a completely separate statement as it was not directly relevant to my comment about your reply being silly. -- JustThe.net Internet & New Media Services, http://JustThe.net/ Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED] PGP Key available from your friendly local key server (0xE3AE35ED) Apple Valley, California Nothing scares me anymore. I have three kids. ============================================================================== 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
