comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Packing JRE - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d1a5c7579f5f09e2 * please I need help on my java Applet - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9a589a8cfda9bef * Linking to data in MySQL - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ecf932d72f6e791e * Mouse in a applet - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/53a19cc14a2ed042 * help on threads/monitor needed - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cefb56e3aa05046e * JNDI Security issue; Please help!!! - 3 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5bf7e26778f8d734 * converting an existing Swing application to client server - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/31d2080f8f3e59a4 * Splitting a full-duplex socket - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51615aee9a18c299 * looking for high-level web development tools - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b726dc72d5129bda * Tomcat Help - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa88f8cee5426f60 * finalize() question - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fee9f666cf363dd0 ============================================================================== TOPIC: Packing JRE http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d1a5c7579f5f09e2 ============================================================================== == 1 of 4 == Date: Thurs, Dec 23 2004 4:31 pm From: Chas Douglass "IINET" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > re: > Eclipse and JBuilder both, from my personal experience, support > "D'n'D" GUI designers using a full range of java layouts. > > Not sure what personal expereinces you've had here, but DnD gui > development is most definitely not a strength of eclipse - in fact, it > is infamous for its poor support here. Are you sure thats what you > meant to say? Netbeans is the one with the support here, not eclipse - > not by a long shot! > > > [snip] GUI building isn't, perhaps, Eclipse's greatest strength, but it is possible, both with 3rd party add-on's and the new VE (Visual Editor) plugin that is now a formal Eclipse project. Chas Douglass == 2 of 4 == Date: Thurs, Dec 23 2004 4:51 pm From: Bill Tschumy On Wed, 22 Dec 2004 00:21:55 -0600, Robert kebernet Cooper wrote (in article <[EMAIL PROTECTED]>): > Honestly, I would recommend skipping the unified installer and use Java > WebStart. It gives you all the advantages of a windows installer plus > automatic updates. > > Plus, once a person has one JRE with WebStart installed, it will > automatically update their JRE if you shift forward with your app too. I wonder how well WebStart apps are perceived by most Windows users. WebStart requires them to do things very differently from how they run most of their apps. Most users don't like variations in their routine. On Mac OS X, WebStart will automatically offer to create a double-clickable executable after the app has been run a couple of times. This seems like an ideal solution to me and I wish the windows version would implement it. I have thought of making WebStart verisons of my apps, but many download sites will lower your rating if you don't follow the established Windows conventions. -- Bill Tschumy Otherwise -- Austin, TX http://www.otherwise.com == 3 of 4 == Date: Thurs, Dec 23 2004 6:07 pm From: ByteCoder Bill Tschumy wrote: > On Wed, 22 Dec 2004 00:21:55 -0600, Robert kebernet Cooper wrote > (in article <[EMAIL PROTECTED]>): > > >>Honestly, I would recommend skipping the unified installer and use Java >>WebStart. It gives you all the advantages of a windows installer plus >>automatic updates. >> >>Plus, once a person has one JRE with WebStart installed, it will >>automatically update their JRE if you shift forward with your app too. > > > I wonder how well WebStart apps are perceived by most Windows users. > WebStart requires them to do things very differently from how they run most > of their apps. Most users don't like variations in their routine. > > On Mac OS X, WebStart will automatically offer to create a double-clickable > executable after the app has been run a couple of times. This seems like an > ideal solution to me and I wish the windows version would implement it. [...] It does ask you to create a link on the windows desktop when you execute a webstart app for the second time. -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat == 4 of 4 == Date: Thurs, Dec 23 2004 6:07 pm From: Bill Tschumy On Thu, 23 Dec 2004 11:07:03 -0600, ByteCoder wrote (in article <[EMAIL PROTECTED]>): > Bill Tschumy wrote: >> On Wed, 22 Dec 2004 00:21:55 -0600, Robert kebernet Cooper wrote >> (in article <[EMAIL PROTECTED]>): >> >> >>> Honestly, I would recommend skipping the unified installer and use Java >>> WebStart. It gives you all the advantages of a windows installer plus >>> automatic updates. >>> >>> Plus, once a person has one JRE with WebStart installed, it will >>> automatically update their JRE if you shift forward with your app too. >> >> >> I wonder how well WebStart apps are perceived by most Windows users. >> WebStart requires them to do things very differently from how they run most >> of their apps. Most users don't like variations in their routine. >> >> On Mac OS X, WebStart will automatically offer to create a double-clickable >> executable after the app has been run a couple of times. This seems like >> an >> ideal solution to me and I wish the windows version would implement it. > [...] > > It does ask you to create a link on the windows desktop when you execute > a webstart app for the second time. I've never seen it do that for any Webstart app I've run. Interesting. I guess I'll have to explore further. -- Bill Tschumy Otherwise -- Austin, TX http://www.otherwise.com ============================================================================== TOPIC: please I need help on my java Applet http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9a589a8cfda9bef ============================================================================== == 1 of 4 == Date: Thurs, Dec 23 2004 11:33 am From: "java10" Hi Andrew , i am very new to java that was the reason the whole code was in mess but i don't understand what you meant by sscce. dragonmen == 2 of 4 == Date: Thurs, Dec 23 2004 11:54 am From: "java10" //i have stream line the code too some extent, when i compiled it there was no error but what i want it to do is when it say "pay this amount" the user can input an amount to pay then it will display the remaining change. import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.*; import java.applet.Applet; //<APPLET code = Noname0.class width=400 height=250> </APPLET> public class Noname0 extends Applet implements ActionListener { private Choice food = new Choice(); private Choice number = new Choice(); private Button AddItem =new Button("Add"); private Button Show = new Button ("show cost"); private double [] price ={0.35, 1.00, 0.50, 1.15, 2.50, 0.50, 1.30, 0.75, 0.65, 1.00}; private static DecimalFormat twoDP = new DecimalFormat("0.00"); private double bill=0; private List list; private String[] s; public void init () { add(food); food.addItem("Select Item"); food.addItem("Beans"); food.addItem("cornflakes"); food.addItem("sugar"); food.addItem("Tea bag"); food.addItem("coffee"); food.addItem("Bread"); food.addItem("Sausage"); food.addItem("Eggs"); food.addItem("Milk"); food.addItem("Potatoes"); add(number); number.addItem("----"); number.addItem("1"); number.addItem("2"); number.addItem("3"); number.addItem("4"); number.addItem("5"); number.addItem("6"); number.addItem("7"); number.addItem("8"); number.addItem("9"); number.addItem("10"); number.addItem("11"); number.addItem("12"); number.addItem("13"); number.addItem("14"); number.addItem("15"); number.addItem("16"); number.addItem("17"); number.addItem("18"); number.addItem("19"); number.addItem("20"); add(Show); Show.addActionListener(this); add(AddItem); AddItem.addActionListener(this); list= new List (10,true); list.add("Beans"); list.add("cornflakes"); list.add("sugar"); list.add("Tea bag"); list.add("coffee"); list.add("Bread"); list.add("Sausage"); list.add("Eggs"); list.add("Milk"); list.add("Potatoes"); add(list); list.addActionListener(this); s = list.getSelectedItems(); } public void actionPerformed (ActionEvent e) { s = list.getSelectedItems(); repaint(); if (e.getSource()== AddItem) { int index = food.getSelectedIndex(); int num = number.getSelectedIndex()+1; bill +=price[index]*num; } else { JOptionPane.showMessageDialog(this, "please pay this amount £" + twoDP.format(bill)); JOptionPane.showMessageDialog(this, "thank you for shopping and visit us again"); JOptionPane.showMessageDialog(this, "I am "); } }; } == 3 of 4 == Date: Thurs, Dec 23 2004 11:42 am From: "J. F. Cornwall" java10 wrote: > Hi Andrew , i am very new to java that was the reason the whole code was in > mess but i don't understand what you meant by sscce. > > dragonmen > That's his terse way of saying you should create a "Small Self-Contained Compilable Code Example" to demonstrate the problem. Go check out his web page, he does explain these things there. :-) Jim C (also still quite new in Java coding) == 4 of 4 == Date: Thurs, Dec 23 2004 6:49 pm From: Joona I Palaste java10 <[EMAIL PROTECTED]> scribbled the following: > Hi Andrew , i am very new to java that was the reason the whole code was in > mess but i don't understand what you meant by sscce. It means something like "short simple complete compilable example". It's an absolutely brilliant concept Andrew invented. It's a piece of Java code that: * Constitutes an entire Java program you can copy&paste into your own computer, * Compiles cleanly without any errors and does not depend on additional libraries (other than any that are the cause of your entire problem, and even then you should make them available), * Demonstrates your problem, * Is as short and simple as possible. This is the important bit. Do not bother posting your entire 200 thousand line program if all you're having problems with is one Exception in a very simple method. Isolate the part that is at fault and encapsulate it with a complete, compilable example Java program. -- /-- Joona Palaste ([EMAIL PROTECTED]) ------------- Finland --------\ \-------------------------------------------------------- rules! --------/ "Immanuel Kant but Genghis Khan." - The Official Graffitist's Handbook ============================================================================== TOPIC: Linking to data in MySQL http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ecf932d72f6e791e ============================================================================== == 1 of 2 == Date: Thurs, Dec 23 2004 5:50 pm From: "Paul Wagener" Hi all, I have a working database connection to a MySQL database which is located t my webhosting provider. I'd like now to display the retrieved information in a JTable, JField or whatever. Could anyone give me a hint how to proceed? I don't find a way round, already spent hours on it :-) Thaaaaanks!!! Paul == 2 of 2 == Date: Thurs, Dec 23 2004 6:03 pm From: ByteCoder Paul Wagener wrote: > Hi all, > > I have a working database connection to a MySQL database which is located t > my webhosting provider. I'd like now to display the retrieved information in > a JTable, JField or whatever. Could anyone give me a hint how to proceed? I > don't find a way round, already spent hours on it :-) Thaaaaanks!!! The best way would be to read this: <http://java.sun.com/docs/books/tutorial/jdbc/index.html> Good luck! :) -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat ============================================================================== TOPIC: Mouse in a applet http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/53a19cc14a2ed042 ============================================================================== == 1 of 3 == Date: Thurs, Dec 23 2004 9:19 am From: [EMAIL PROTECTED] (Mark) I am trying to make an applet so that when my mouse enters the applet box, the text will hover around it until it leaves the applet box. I have tried using loops to attain this but I have had no luck. Can someone please explain how I can do this? import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class ClickName extends Applet implements MouseListener { //variable named "square" with data type from Square.class private Square square = null; private static final int WIDH = 7; public void init() { addMouseListener(this); } public void paint(Graphics g) { //draw a black border and a white background g.setColor(Color.black); g.fillRect(0, 0, getSize().width - 1, getSize().height - 1); g.setColor(Color.black); g.drawRect(0, 0, getSize().width - 1, getSize().height - 1); //draw the spot g.setColor(Color.orange); if (square != null) { //draw a rectangle and send to graphics program g.drawString("Mark Waddoups", square.x - WIDH, square.y - WIDH); } } public void mouseEntered(MouseEvent event) { int x = 1; if (square == null) { square = new Square(WIDH); } square.x = event.getX(); square.y = event.getY(); repaint(); } public void mousePressed(MouseEvent event) {} public void mouseReleased(MouseEvent event) {} public void mouseClicked(MouseEvent event) {} public void mouseExited(MouseEvent event) {} } == 2 of 3 == Date: Thurs, Dec 23 2004 1:18 pm From: IchBin Mark wrote: > I am trying to make an applet so that when my mouse enters the applet > box, the text will hover around it until it leaves the applet box. I > have tried using loops to attain this but I have had no luck. Can > someone please explain how I can do this? > > > import java.applet.Applet; > import java.awt.*; > import java.awt.event.*; > > public class ClickName extends Applet implements MouseListener > { > //variable named "square" with data type from Square.class > private Square square = null; > private static final int WIDH = 7; > > public void init() > { > addMouseListener(this); > } > > public void paint(Graphics g) > { > //draw a black border and a white background > g.setColor(Color.black); > g.fillRect(0, 0, getSize().width - 1, getSize().height - 1); > g.setColor(Color.black); > g.drawRect(0, 0, getSize().width - 1, getSize().height - 1); > > //draw the spot > g.setColor(Color.orange); > if (square != null) > { > //draw a rectangle and send to graphics program > g.drawString("Mark Waddoups", square.x - WIDH, square.y > - WIDH); > } > } > > public void mouseEntered(MouseEvent event) > { > int x = 1; > if (square == null) > { > square = new Square(WIDH); > } > square.x = event.getX(); > square.y = event.getY(); > repaint(); > } > > public void mousePressed(MouseEvent event) {} > public void mouseReleased(MouseEvent event) {} > public void mouseClicked(MouseEvent event) {} > public void mouseExited(MouseEvent event) {} > } Be nice to see your Square.java to complete a compilation. -- Thanks in Advance... IchBin __________________________________________________________________________ 'The meeting of two personalities is like the contact of two chemical substances: if there is any reaction, both are transformed.' - Carl Gustav Jung, (1875-1961), psychiatrist and psychologist == 3 of 3 == Date: Thurs, Dec 23 2004 1:05 pm From: Andrew Thompson On Thu, 23 Dec 2004 13:18:18 -0500, IchBin wrote: > Be nice to see your Square.java to complete a compilation. To the OP. I agree, check here for tips on examples. <http://www.physci.org/codes/sscce.jsp> It would also be nice if you (IchBin) trimmed some of the 55 lines of the message to which you are responding. <http://www.physci.org/codes/javafaq.jsp#netiquette> -- 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: help on threads/monitor needed http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cefb56e3aa05046e ============================================================================== == 1 of 3 == Date: Thurs, Dec 23 2004 9:30 am From: [EMAIL PROTECTED] (Frank J?ger) Hi all, I am using the javax communication API to talk to RS232. Now this works fine by using the serialPortEventListener but I always wait for 500 ms to read/write new data. I have made my classes Runnable to put them into threads and use synchronized to let one thread finish reading and writing. To control the synchronized methods I use one attribute (public boolean) which is set true when initializing the eventListener and set to false if the string I expect was captured. If I start several threads (and don't wait 500 ms in between) only one thread is processed and all others are waiting for ever. Looks like a deadlock. How can I resolve this. Is it o.k. to use just one parameter for controlling all synchronized methods? Frank == 2 of 3 == Date: Thurs, Dec 23 2004 6:33 pm From: ByteCoder Frank J?ger wrote: > Hi all, > I am using the javax communication API to talk to RS232. Now this > works fine by using the serialPortEventListener but I always wait for > 500 ms to read/write new data. I have made my classes Runnable to put > them into threads and use synchronized to let one thread finish > reading and writing. > To control the synchronized methods I use one attribute (public > boolean) which is set true when initializing the eventListener and set > to false if the string I expect was captured. > If I start several threads (and don't wait 500 ms in between) only one > thread is processed and all others are waiting for ever. Looks like a > deadlock. > How can I resolve this. Is it o.k. to use just one parameter for > controlling all synchronized methods? > > Frank I'd make a synchronized method in the Class that starts the threads and give 'this' (= the Class that starts the threads) to the thread so that it can access the method in the starter thread. That's all you need. :) Don't forget to create a private object of your Class in the Thread Class and assign (or was it declare) it in the constructor of the Thread Class. -- ------------- - ByteCoder - ...I see stupid people ------------- Curiosity *Skilled* the cat == 3 of 3 == Date: Thurs, Dec 23 2004 2:09 pm From: "John C. Bollinger" Frank J?ger wrote: > Hi all, > I am using the javax communication API to talk to RS232. Now this > works fine by using the serialPortEventListener but I always wait for > 500 ms to read/write new data. I have made my classes Runnable to put > them into threads and use synchronized to let one thread finish > reading and writing. > To control the synchronized methods I use one attribute (public > boolean) which is set true when initializing the eventListener and set > to false if the string I expect was captured. > If I start several threads (and don't wait 500 ms in between) only one > thread is processed and all others are waiting for ever. Looks like a > deadlock. > How can I resolve this. Is it o.k. to use just one parameter for > controlling all synchronized methods? I don't understand how you are controlling synchronized methods via a boolean variable. I suspect Java synchronization may not work the way you think it works. I also don't understand your communication protocol. Why do you need multithreaded access to a serial port? Is the serial line multiplexed or something? Even if it is, it doesn't make sense to me to have multiple threads listening directly for serial events. Create a class for a shared object that has the responsibility for managing a single serial port. A single instance of this class will be the only listener for serial events on any particular port, and the only object that reads or writes directly to the port. The threads will be expected to synchronize on this shared object in order to use the port. John Bollinger [EMAIL PROTECTED] ============================================================================== TOPIC: JNDI Security issue; Please help!!! http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5bf7e26778f8d734 ============================================================================== == 1 of 3 == Date: Thurs, Dec 23 2004 9:48 am From: [EMAIL PROTECTED] Hi, We have a web application running on ServletExec application server. In our code we're trying to get the home interface of an EJB deployed on a pramati server. This used to worked fine. But for some unknown reason, this is throwing now a Security exception. The weird this is it'll work when the application runs in windows (we're using tomcat in windows to debug). But will not work when deployed to unix. This is the complete stack trace : ----------- Stack trace begins ------------ java.lang.ExceptionInInitializerError at com.pramati.naming.client.PramatiClientContextFactory.getInitialContext(PramatiClientContextFactory.java:223) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243) at javax.naming.InitialContext.init(InitialContext.java:219) at javax.naming.InitialContext.(InitialContext.java:195) at org.grnds.facility.factory.GrndsJndiProducer.produce(GrndsJndiProducer.java:91) at com.msdw.refdata.o2.integration.savvion.O2SavvionEJBProducer.getEjbHome(O2SavvionEJBProducer.java:152) at com.msdw.refdata.o2.integration.savvion.O2SavvionEJBProducer.produce(O2SavvionEJBProducer.java:105) at com.msdw.refdata.o2.integration.savvion.O2SavvionEJBProducer.produce(O2SavvionEJBProducer.java:91) at org.grnds.facility.factory.GrndsFactory$ProducerContainer.produce(GrndsFactory.java:607) at org.grnds.facility.factory.GrndsFactory.produce(GrndsFactory.java:202) at org.grnds.facility.factory.GrndsFactory.produce(GrndsFactory.java:133) at com.msdw.refdata.o2.integration.savvion.O2SavvionAccessorBLManagerImpl.getWorkflowRequestStatus(O2SavvionAccessorBLManagerImpl.java:54) at com.msdw.refdata.o2.ui.createWorkflow.WorkflowRequestStatusAction.execute(WorkflowRequestStatusAction.java:113) at org.grnds.structural.ic.http.ActionHttpAdapterCore.perform(ActionHttpAdapterCore.java:332) at org.grnds.structural.ic.struts.IcStrutsAction.perform(IcStrutsAction.java:346) at org.grnds.structural.ic.struts.IcStrutsAction.execute(IcStrutsAction.java:310) at org.apache.struts.action.RequestProcessor.processActionPerform(Unknown Source) at org.apache.struts.action.RequestProcessor.process(Unknown Source) at org.apache.struts.action.ActionServlet.process(Unknown Source) at org.apache.struts.action.ActionServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.newatlanta.servletexec.ServletExec.CallServletService(ServletExec.java:1717) at com.newatlanta.servletexec.SERequestDispatcher.forwardServlet(SERequestDispatcher.java:274) at com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatcher.java:191) at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:74) at com.msdw.refdata.o2.ui.auth.O2AuthFilter.doFilter(O2AuthFilter.java:166) at com.newatlanta.servletexec.SEFilterChain.doFilter(SEFilterChain.java:50) at com.newatlanta.servletexec.ApplicationInfo.filterApplRequest(ApplicationInfo.java:1454) at com.newatlanta.servletexec.ApplicationInfo.processApplRequest(ApplicationInfo.java:1299) at com.newatlanta.servletexec.ServerHostInfo.processApplRequest(ServerHostInfo.java:958) at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java:1267) at com.newatlanta.servletexec.ServletExec.ProcessRequest(ServletExec.java:1115) at com.newatlanta.servletexec.ServletExecService.processServletRequest(ServletExecService.java:165) at com.newatlanta.servletexec.ServletExecService.Run(ServletExecService.java:197) at com.newatlanta.servletexec.HttpServerRequest.run(HttpServerRequest.java:106) Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission jmx.serial.form write) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269) at java.security.AccessController.checkPermission(AccessController.java:401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at java.lang.System.setProperty(System.java:654) at com.pramati.naming.client.PramatiClientContext.(PramatiClientContext.java:70) ... 37 more ----------- Stack trace ends -------------- Any help will be greatly appreciated. Thanks, - Jonathan == 2 of 3 == Date: Thurs, Dec 23 2004 2:19 pm From: "John C. Bollinger" [EMAIL PROTECTED] wrote: > We have a web application running on ServletExec application server. In > our code we're trying to get the home interface of an EJB deployed on a > pramati server. This used to worked fine. But for some unknown reason, > this is throwing now a Security exception. The weird this is it'll work > when the application runs in windows (we're using tomcat in windows to > debug). But will not work when deployed to unix. This is the complete > stack trace : > > ----------- Stack trace begins ------------ > java.lang.ExceptionInInitializerError > at > com.pramati.naming.client.PramatiClientContextFactory.getInitialContext(PramatiClientContextFactory.java:223) > at [...] > Caused by: java.security.AccessControlException: access denied > (java.util.PropertyPermission jmx.serial.form write) > at > java.security.AccessControlContext.checkPermission(AccessControlContext.java:269) > at > java.security.AccessController.checkPermission(AccessController.java:401) > at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) > at java.lang.System.setProperty(System.java:654) > at > com.pramati.naming.client.PramatiClientContext.(PramatiClientContext.java:70) > ... 37 more > > ----------- Stack trace ends -------------- The SecurityManager on your unix server is configured differently from the one on your debug system. If ServletExec installs its own SecurityManager then you'll have to consult its documentation. If it's using the standard Java SecurityManager then you'll need to make appropriate modifications to the SecurityManager's configuration file, which might be $JAVA_HOME/jre/lib/security/java.policy. Consult your Java docs for information on the config file. John Bollinger [EMAIL PROTECTED] == 3 of 3 == Date: Thurs, Dec 23 2004 2:36 pm From: "John C. Bollinger" Jonathan, Note also that the PramatiClientContext seems to be attempting to set a system property when it is denied access. This is a somewhat strange thing for it to do, albeit not necessarily unreasonable. You may get some help from Pramati tech support. John Bollinger [EMAIL PROTECTED] ============================================================================== TOPIC: converting an existing Swing application to client server http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/31d2080f8f3e59a4 ============================================================================== == 1 of 1 == Date: Thurs, Dec 23 2004 10:22 am From: "Zeev Halevi" I'm looking at WebCream, what I was hoping for is something like WebCream but with a SWING client. ============================================================================== TOPIC: Splitting a full-duplex socket http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51615aee9a18c299 ============================================================================== == 1 of 1 == Date: Thurs, Dec 23 2004 1:53 pm From: "John C. Bollinger" cyberco wrote: > Hi Steve and Gordon, > > Sorry for not being more specific. A full-duplex socket means that you > can simultaneously read and write over the socket. In my case the > client is a mobile phone running J2ME and not all implementations of > the J2ME Virtual Machine (JVM) support full-duplex sockets. For > instance the Nokia 6600 does while the SonyEricsson P900 doesn't. This > is a 'feature' not well documented by phone manufacturers which can > lead to a lot of problems. In my case I'm porting a J2SE application to > J2ME that relies on full-duplex sockets. To make it work on a > SonyEricsson P900 I have change the code to use seperate sockets for > reading and writing to the server. Unfortunately the serverside > application does not support seperate sockets for reading and writing, > so I'm building a proxy that talks to my phoneclient using 2 sockets > and to the server using one socket. In other words the proxy splits a > full-duplex socket. My question is what the easiest (and best) way is > to do this. Are you actually telling us that some of the phones in question support simultaneous (in some sense) reading and writing on different sockets, but not on the same one? That sounds awfully strange. Before you go to much effort, you should make certain that your proposed solution will actually work. My bet would be that this is a hardware / OS issue, not a J2ME issue. Some phones may have radios or electronics that cannot simultaneously send and receive, for instance. That would mean that you cannot assume full-duplex communication, period. If you go ahead: Does J2ME have ServerSockets? I'm guessing not. In that case, the J2ME side must make two separate connections to the proxy, and somehow tell the proxy which is the reading side and which the writing side, and possibly what server to connect to (but that last could be implicit in the choice of proxy). The proxy connects to the server, then commences forwarding both sides of the conversation. It would probably be easiest to code it in the form of one thread for forwarding each direction, but there may be advantages to coding for selectable I/O within a single thread in the proxy. John Bollinger [EMAIL PROTECTED] ============================================================================== TOPIC: looking for high-level web development tools http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b726dc72d5129bda ============================================================================== == 1 of 1 == Date: Thurs, Dec 23 2004 11:09 am From: [EMAIL PROTECTED] Hi, We have simial suitation at our office. so we started using websphere application studio. It's a quite comperhensive tool. Development like Java, JSP, Portlets, servlet, struts, JSF and J2ee and many more developement perpective. Its available in Eclispe version. "Java is not simple... So using java tools not simple" ============================================================================== TOPIC: Tomcat Help http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fa88f8cee5426f60 ============================================================================== == 1 of 2 == Date: Thurs, Dec 23 2004 11:19 am From: "Paul W" I'm new to Java and this isn't my idea, so don't beat me up on this... Due to a poorly written application that my company is thinking about buying, I have to setup a server to run 3 (or more!) instances of Tomcat at the same time. The server is running Windows 2003 and each instance must run as a service on the server under a different Windows User Account. Also, the server is already running IIS and Lotus (stripped down) as a web server. Tomcat version is 4.1.8 and I don't think the vendor has tested their product against a newer version of Tomcat. Questions: 1) Can I expect any resources problems running 3 or more instances of Tomcat on the same server? Clearly each has to be using a different port and running them with IIS and Lotus is just another extra twist. 2) Anyone try to run multiple instances of Tomcat as a service on the same box? 3) Do I have to change anything on the Tomcat side to get it to run under a different Windows User? Yes, I'm going to test this, but I wanted to see if any of you more experienced Java guys out there sees anything that raises a red flag. Thanks for any advice (outside that I'm insane) that you can provide, Paul W == 2 of 2 == Date: Thurs, Dec 23 2004 12:55 pm From: "Robert kebernet Cooper" Paul W wrote: > 1) Can I expect any resources problems running 3 or more instances of > Tomcat on the same server? Clearly each has to be using a different > port and running them with IIS and Lotus is just another extra twist. If you have the resources, not. Each instance will start with about 30mb of memory utilization and it will rise depending on the app and the number of users. > 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. > 3) Do I have to change anything on the Tomcat side to get it to run > under a different Windows User? > Nope. Tocat really doesn't care what user it is as long as it has permissions to its directories and permission to bind its ports. > Yes, I'm going to test this, but I wanted to see if any of you more > experienced Java guys out there sees anything that raises a red flag. > > Thanks for any advice (outside that I'm insane) that you can provide, > Paul W ============================================================================== TOPIC: finalize() question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fee9f666cf363dd0 ============================================================================== == 1 of 1 == Date: Thurs, Dec 23 2004 8:18 pm From: "Grant Wagner" "Joona I Palaste" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The recent messages about finalize() got me thinking about this... > I got the impression that when the GC sweeps up an object, it calls its > finalize() method. Now if this is true, what happens if the finalize() > method of an object adds a reference to that object to some other live > object? I find three possible outcomes: > (1) The original object won't be swept up after all, > (2) The reference will end up being a zombie, accessing which will > either throw an exception or cause an error in the whole VM, or > (3) Such a thing is forbidden entirely. > Which is it? Or am I wrong altogether about the GC calling finalize()? <url: developer.java.sun.com/developer/ Books/performance/performance2/appendixa.pdf /> A.3.5 Collected An object is in the collected state when the garbage collector has recognized an object as unreachable and readies it for final processing as a precursor to deallocation. If the object has a finalize method, then it is marked for finalization. If it does not have a finalizer then it moves straight to the finalized state. If a class defines a finalizer, then any instance of that class must have the finalizer called prior to deallocation. This means that deallocation is delayed by the inclusion of a finalizer. A.3.6 Finalized An object is in the finalized state if it is still unreachable after its finalize method, if any, has been run. A finalized object is awaiting deallocation. A.3.7 Deallocated The deallocated state is the final step in garbage collection. If an object is still unreachable after all the above work has occurred, then it is a candidate for deallocation. So the answer is (1) The original object won't be swept up after all -- Grant Wagner <[EMAIL PROTECTED]> ============================================================================== 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
