Automaic ENTER in java

Hi
After entering some text in the JTextField i pressed ENTER key and ActionPerformed event is triggered. Is there any way to triger this event without pressing ENTER key from keyboard ...

Muhammad Umer wrote:
i do not think so it will work. Let suppose if a user typed 10 words then my program will wait for its further input and keep waiting ...Typing? I thought this was for a cardswipe.
And if the requirement is to read a fixed length 50-character field, then if somebody types in 10 characters (which is what I assume you meant when you said "10 words"), then they haven't provided full input, so, by your own definition, you should not fire the event.
It still sounds to me like you have a requirements problem, NOT a Java problem. Until you can clearly define and express your requirements, there's no point in even thinking about Java.

Similar Messages

  • ... how can i use 'enter' in java (text) -.-

    Hi all,
    first the simple version;
    How can i use 'enter' in java. Like turn HELLO into
    H
    E
    L
    L
    O
    The not so simpler version IF needed;
    I have the following piece of code;'
    if (line.startsWith("Monday")) {
         String subjectsMonday = " math and philosophy";
         Calendar c = Calendar.getInstance();
              System.out.format("School begins at" +" 08:10", c, c, c);
              System.out.format(" school ends at " +" 15:55", c, c, c);
         System.out.println("We have the following subjects;" + subjectsMonday);the thing is ... i want the text "we have the following subject; math and philosophy" to start at a new line.
    HOW am i supposed to do that.

    %n may work for you:
            String subjectsMonday = " math and philosophy";
            Calendar c = Calendar.getInstance();
            System.out.format("School begins at" + " 08:10%n", c, c, c);
            System.out.format(" school ends at " + " 15:55", c, c, c);
            System.out.println("We have the following subjects;" + subjectsMonday);

  • Problem with JDK 6 update 5 - Error Message says cant find java compiler

    Hi i am a complete beginner to programming and i am having trouble with the latest java development kit. jdk 6 update 5.
    The problem is i have set the path and the program cant find my compiler.
    I have installed the latest java development kit 6 update 5 on my windows xp machine.
    I have created a simple program as shown below:
    class Hello
         public static void main(String[] args)
                   System.out.println("Hello from java");
    saved the file to my desktop as Hello.java
    I have set the path variable like so:
    Go to control panel then click system icon then click advanced tab then click environmental variables.
    Now in system variables the path is shown as this - %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_05\bin;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
    I then add this to the end;C:\Program Files\Java\jdk1.6.0_05\bin
    This is the location to the things like compiler, applet viewer etc.
    No in the command prompt i type javac Hello.java and i get this error message:
    C:\> javac Hello.java
    javac: file not found: Hello.java
    Usage: javac <options> <source files>
    use -help for a list of possible options
    The jdk is installed properly im sure but it can find my compiler.
    What mistake have i made in setting the path because im guessing that is related to the problem?
    Could someone out there please help me?
    Thank You
    Rafeeq

    saved the file to my desktop as Hello.java
    C:\> javac Hello.javaC:\ is not the desktop!
    The jdk is installed properly im sure but it can find my compiler.Of course it can! It just can't find the file you are trying to compile, because that's not in the root directory.
    I suggest you make a directory C:\java and save your source file there rather than on the desktop. In the command prompt, enter cd \java to make it the current working directory and then enter javac Hello.java.
    @Pravin: The question is about compiling, not running. CLASSPATH has nothing to do with this problem.
    db

  • Sales order information to be captured from a java based website

    Sales order information entered in java nabled website needs to be retrieved into SAP system and a sales order needs to be created in this system.
    And as soon as a sales order is created an bdoc needs to be triggered and sent to the CRM system...
    Middleware available for Java SAP interface.
    Do i need to call BAPI to retrieve the sales  info from middleware ??
    How does an idoc trigger as soon as a sales order created i SAP  system???
    Can any one help me out .Its urgent!!!
    Regards ,
    Lavanya

    Hi,
    You have to create a BAPI to read the data from java, the structure has to be the same as in the java system. once the data is read into the SAP system then you need the idoc to carry the data.
    regards
    Gokul
    <b>Reward Points if Useful</b>

  • Getting java.lang.NumberFormatException: For input string: "63420;https=127.0.0.1" Error while creating bpel service in oracle soa suite12c

    Hi ,
    I am getting below error when I try to create a bpel project in oracle soa suite 12C, can any one help on this issue why it is happing, earlier am able to create bpel service.
    java.lang.NumberFormatException: For input string: "63420;https=127.0.0.1"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:492)
    at java.lang.Integer.parseInt(Integer.java:527)
    at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.getNewReaderInstance(CachedWSDLReader.java:379)
    at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader$1.initialValue(CachedWSDLReader.java:299)
    at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader$1.initialValue(CachedWSDLReader.java:295)
    at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:160)
    at java.lang.ThreadLocal.get(ThreadLocal.java:150)
    at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.getReaderImpl(CachedWSDLReader.java:309)
    at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.getExtensionRegistry(CachedWSDLReader.java:425)
    at oracle.jdeveloper.webservices.wsdl.CachedWSDLReader.readWSDLWithExtensionRegistry(CachedWSDLReader.java:468)
    at oracle.tip.tools.ide.utils.xml.wsdl.WSDLUtil.parseWSDL(WSDLUtil.java:1398)
    at oracle.tip.tools.ide.bpel.v2.datamodels.util.TemplateUtil.createProcessWSDL(TemplateUtil.java:1208)
    at oracle.tip.tools.ide.bpel.v2.designer.builder.model.ProcessBuilderUtil.createWSDLFiles(ProcessBuilderUtil.java:198)
    at oracle.tip.tools.ide.bpel.v2.designer.builder.model.ProcessBuilder.createIDEProject(ProcessBuilder.java:73)
    at oracle.tip.tools.ide.bpel.v2.designer.builder.ui.CreationDialogPanel.doCreate(CreationDialogPanel.java:57)
    at oracle.tip.tools.ide.bpel.shared.designer.processbuilder.ui.BPELCreationDialog.handleOK(BPELCreationDialog.java:199)
    at oracle.tip.tools.ide.bpel.shared.designer.processbuilder.ui.BPELCreationDialog.actionPerformed(BPELCreationDialog.java:239)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6516)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
    at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1082)
    at java.awt.Component.show(Component.java:1655)
    at java.awt.Component.setVisible(Component.java:1607)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1005)
    at oracle.tip.tools.ide.bpel.shared.designer.processbuilder.ui.BPELCreationDialog.display(BPELCreationDialog.java:83)
    at oracle.tip.tools.ide.bpel.shared.designer.manager.BPELDesignerManager.launchCreationDialog(BPELDesignerManager.java:53)
    at oracle.tip.tools.ide.bpel.shared.designer.manager.BPELDesignerManager.launchCreationDialog(BPELDesignerManager.java:48)
    at oracle.tip.tools.ide.bpel.shared.plugins.soa.sca.BPELComponent.createImplementation(BPELComponent.java:46)
    at oracle.tip.tools.ide.fabric.gui.controller.ActionComponentEdit.add(ActionComponentEdit.java:118)
    at oracle.tip.tools.ide.fabric.gui.controller.ActionComponentEdit.process(ActionComponentEdit.java:95)
    at oracle.tip.tools.ide.fabric.gui.controller.DiagramController.processActionRequest(DiagramController.java:358)
    at oracle.tip.tools.ide.fabric.gui.controls.DiagramSOAPopupHandler.actionPerformed(DiagramSOAPopupHandler.java:117)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
    at java.awt.Component.processMouseEvent(Component.java:6516)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
    at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
    Thanks in advance.
    Cheers,
    bala

    Please paste composite.xml and bpel source file here. Looks like one of the endpoints is getting goofed up.

  • Simple java question, help please

    please help
    -i am just starting out in java and im havin an early problem. Im trying to run a small java script from a commant prompt but im getting the following error after i enter this command at my prompt
    c:\javatest>javac HelloARP.java
    javac is not as an internal or external command, operable program or batch file.
    when i enter
    c:\java -version
    i get the following message: registry key software\javasoft\java runtime enviornment\current version has value of 1.1 but 1.4 is requiured
    error: could not find java.dll
    error: could not find java 2 runtime enviornment
    -im sure this is a simple error on my part. all im trying to do is run my first lil program that i saved in notepad, its only 5 lines long. here is the lil test program im trying to execute
    class HelloARP {
    public static void main (String[] arguments) {
    System.out.println("What's good ARP?");
    - all responses and help are welcomed. Thank you ahead of time for anyone that can help me get started.

    Hi
    First of all uninstall your current JDK installation, if you can get to the registry delete the registry entries for the old version of java which was there on your machine.
    Now do a fresh install of your j2sdk1.4.1, make sure that you will install the JRE with the J2SDK1.4.1.
    Once you are done, set your classpath in autoexec.bat if you are using Windows 95/98
    or set your environment variables if you are using Win NT/2000/XP.
    If using solaris or other unix flavors see the included installation instructions provided.
    Let me if you face the same problem.
    Thanks
    Swaraj

  • Java causes BLUE SCREEN OF DEATH

    I am currently running the newest version of the JRE
    v. 1.4 update 5
    Every time Java runs on my system Windows XP Professional crashes and I get the Blue Screen of Death. I attempted to uninstall Java but that would also crash my system. So I reformated my computer and reinstalled everything again. Still the same thing occurs. Java crashes my system. If I open a webpage with Java, the java plugin in the control pannel, or any app which is java based my system crashes.
    I read elsewhere on the internet that setting Hardware acceleration to None will fix the problem. This works, but is not a viable soltution. I need my video hardware to run at full acceleration. What's the deal with JAVA?
    System Specs:
    OS: Windows XP Professional SP2
    System:
    - Motherboard ASUS A8N-Deluxe SLI (bios v1013.003)
    - AMD 64 FX55 (2.86ghz, 2ghz FSB, 1MB L2 Cache, 1.60volts)
    - Corsair XMS XPERT Dual Channel (2)512MB PC 3200 DDR 400mhz, 2.70 volts, memory timings 2, 2, 2, 5, 1T
    - Dual eVGA Nvidia 7800GTX PCIe cards 2x(Core 463mhz, Memory 1.29ghz) 1.4volts
    - Creative Audigy Gamer 2 ZS Sound Card
    - Dual 74gig Raptor Hard Drives SATA150, 10k RPM, 4.5ms seek time, 8MB buf.
    - Dual 80gig Maxtor Drives, IDE ATA133, 8MB Buffer, 7200 RPM (storage only)
    - 600 Watt Enermax SLI Ready Power Supply
    Drivers:
    Mobo/Chipset: Nvidia Nforce4 v6.66 release July 15th, 2005
    Video: Nvidia Detonator 78.01 release Sept 2, 2005
    All device and system drivers are the most up-to-date.

    Maybe you should take some reading lessons. That was harsh.
    video cards are top-of-the-line
    Nvidia 7800GTX KO PCIe. I have two of them in SLISorry I would be so harsh except I am jealous of your system. Maybe you could make another and give it to me.
    mode. My Antialiasing and Anisotropic Filtering
    settings are as follows:
    AA: 8X
    AF: 16XBut I already answered your question. I stated in reply 3 with "I bet you have Anti-aliasing and/or Anisoptric Filtering set to something other than application preference".
    Would this really cause problems with the JRE? Again if you would read the links I provided. The first one: http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=6267861 will give you the answer. And it is really, really, really, really easy for you to test. Just set your Anti-aliasing and/or Anisoptric Filtering to application preference and see if it works.
    The other options is to turn off direct3d by setting an enviromental variable. Start->Control Panel->System->Advanced->Environment Variables->New and then add the approperiate value
    Would I enter those Java commands under the Java
    Console in the Java Runtime Parameters Field?That might work for Applets and Java Web Start. Try it and see.
    I reformated my computer twice.Sorry you had to do that.

  • Acrobat 9 - how do you create a dynamic stamp to include the current date (java script)

    I have seen my question multiple places and times but the resolutions provided have not worked for me.
    I am running Acrobat 9 Pro, cannot run X or XI due to the use of ProSystem fx Engagement.
    I want to create what I thought would be a simple stamp. My initials and the current date. i.e. "crm 01/10/13".
    Simple right? I created a PDF of my initials. Now I just need the text field with the proper Java Script to insert the date, correct?
    I have tried opening "Dynamic.pdf" and copying and pasting the text field that includes the Java Script:
    " event.value = (new Date()).toString(); AFDate_FormatEx("h:MM tt, mmm dd, yyyy"); "
    The date does not update, it stays static.
    I have manually entered the Java Script.
    I have edited the Java Script to remove the "Ex".
    I have edited the Java Script to revise the "yyyy" to "yy".
    I have edited the Java Script to remove the " h:MM tt, " trying different formats to get "dd/mm/yy".
    I have selected "Use single-key accelerators to access tools" in Preferences/General.
    I have tried PDF files, PNG files. I have created the image files from Word and Excel.
    I am at my wits' end. Can someone PLEASE assist me to resolve what should be a simple issue (I hope).
    Thank you in advance.

    Thank you for your response.
    Your script works well, but I still have the same issue.  The date is remaining static to the system date when the stamp is created.  My initial idea was to create a pdf of my initials "crm" and then add the text field with the java script for the date behind my initials.  "crm" + (TEXT FIELD with JS).  I wanted 3 stamps, red, blue and green.  The colors correspond to specific processes in our workflow.
    Your script adds my initials as well as the date.
    My machine is running Windows 7.
    My stamps are located:
    C://Documents/Acrobat Stamps/...
    Acrobat templates:
    C://Program Files (x86)/Adobe/Acrobat 9.0/Acrobat/plug_ins/Annotations/Stamps/ENU/...
    I have no problem creating stamps, just a stamp that will use the current system date.  I HATE using the typewriter for my initials and the date.  I guess I can stamp my initials and then type the date...but what is the point?
    Do you have any further thoughts or suggestions?
    Thank you very much.
    crm 01/11/13 

  • Java JRE not working on any PC

    Hello!
    I have a customer, where none of the PC's og the servers can use Java JRE applications on the internet.
    I have checked and double checked all settings in the Java Control Panel and Checked it is enabled for IE. I have tried Firefox and Opera too. I have uninstalled and installed several older versions, without any luck...
    Now im running on the latest 1.6.0.02.
    Im running behind a SBS 2003, without the ISA enabled. All PC's are using the router directly as default gateway (so not running through the SBS server). Im not using any Proxy, but i have tried that as well.
    Java control Panel is set to use Default browser settings.
    I have no idea what can cause this, and maybe im not filling in enough information for you, so please ask questions and ill answer as good as i can.
    Here is the log when i try to test the Java on internet Java applications.
    ======================================
    Java Plug-in 1.6.0_02
    Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\ivar
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class JavaVersionDisplayApplet.class not found.
    java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    load: class JavaVersionDisplayApplet.class not found.
    java.lang.ClassNotFoundException: JavaVersionDisplayApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    =============================================
    I have the feeling this has something to do with java not finding the java application it is trying to run? Does this make any sense? BTW. The Java Control Panel is showing in the taskbar next to the clock when i enter a Java site so its launching Java, but nothing happens.
    Is there any simple java application i can use to test locally? From my C: drive or something.
    I do not know much about Java functionality so i appreciate any help.
    Thanks
    Espen Zaal, Norway

    Hey, thanks for the answer.
    I didnt have the JDK installed, just JRE so i installed JDK and could run the local applets.
    The same online applet fails. I really do not know why this happens. There is nothing fancy about this customers network. They have 5 users, and a single Cisco Router for router/firewall for connecting/protecting against the internet.
    There is also no outgoing firewall. Does anyone have experience with firewalls or routers blocking some part of the traffic? I just had a problem with the MTU at a nother customer.
    Last time i investigated this i also concluded that there was no connection to the remote computer as you suggest, but i can not see what is blocking it.
    The customer of mine is realying on Java to run for one of their applications so i can not "quit" like i did last time when the managing director couldnt play his online games hehe.
    Anyone else got some tips?
    Thanks

  • Java Update 5 (1.0) breaks Java for Volano based chats

    I installed the Java Update 5 (1.0) for Leopard on my Intel based Mac mini and then was unable to enter Volano (Java applet) based chat rooms. I was forced to reinstall my system to revert to my prior version of System 10.5.8 in oder to be able to continue use the Java based Volano chats. The update that will NOT work states: "This release updates Java SE 6 to to version 1.6.0_1.5, J2SE 5.0 to version 1.5.0_20, and J2SE 1.4.2 to 1.4.2_22."
    According to Volano developers -
    Note that Apple calls Java 5 (version 1.5) "J2SE 5.0", while it calls Java 6 (version 1.6) "Java SE 6". I think I finally have the following chart correct:
    J2SE 5.0 = Java 5 (version 1.5)
    - Available as 32-bit and 64-bit packages in Leopard
    - Removed in Snow Leopard
    Java SE 6 = Java 6 (version 1.6)
    - Available only as 64-bit packages in Leopard
    - Available as 32-bit & 64-bit packages in Snow Leopard
    In Leopard, the 32-bit Safari can run Java applets only with the 32-bit
    J2SE 5.0 support. To run applets using Java SE 6, you need to bypass
    Safari using the "appletviewer" Terminal command in Leopard, or upgrade
    to Snow Leopard where Safari can run Java SE 6.
    Volano says the possible work arounds for Leopard users (10.5.8( are:
    According to what I've read, if you have a 64-bit capable Intel processor (i.e., an Intel Core 2 Duo), the software update that you removed should have given you 64-bit Java SE 6 even on Mac OS X Leopard (10.5). Java SE 6 works fine with the VOLANO applets, but unfortunately the Safari browser that runs the applets is only 32-bit on Leopard, so applets in Safari still run with the 32-bit Java SE 5 instead of the 64-bit Java SE 6.
    So you have three options to solve the problem -- two free options (one rather easy, one more difficult), and one easy non-free option.
    (1) The Free and Relatively Easy Option
    If you have an Intel Core 2 Duo processor (not a Core Solo or Core Duo), you can install all the software updates from Apple so that you'll have the 64-bit Java SE 6.
    About Java for Mac OS X 10.5 Update 2 http://support.apple.com/kb/HT2733 "Java SE 6 is available on 64-bit, Intel-based Macs only."
    You would then modify your Java Preferences so that Java SE 6 is chosen first for the Java Application Runtime settings. You can verify the modified setting by running the following "java -version" command from the Terminal application (Finder > Applications > Utilities > Terminal):
    $ java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
    There are some more detailed instructions here:
    Install Java 6 on Mac OS X Leopard
    http://gephi.org/users/install-java-6-mac-os-x-leopard/
    Then you can bypass Safari and run the applet directly in the 64-bit Java SE 6 using the "appletviewer" command in Terminal. For example:
    $ appletviewer http://www.actionchat.com/chat/english.shtml
    You just put the URL of the page containing the VOLANO chat applet you want to load. I just tried it on my system, and it works fine. You bypass Java SE 5, which is broken for the VOLANO applets, and you bypass Safari, which cannot run the 64-bit Java SE 6. Instead, you run the VOLANO applet using your Java SE 6 directly!
    (2) The Free and Not-So-Easy Option
    You can download and install SoyLatte as an alternative to the Apple Java VM for your Mac OS X Leopard system.
    SoyLatte: Java 6 Port for Mac OS X 10.4 and 10.5 (Intel)
    http://landonf.bikemonkey.org/static/soylatte/
    I have not tried SoyLatte on my iMac, though.
    (3) The Best but Non-Free Option
    For only $29, you can upgrade your system to the latest Snow Leopard and get both the 32-bit and 64-bit Java SE 6 along with a Safari Web browser that works with Java SE 6 for running applets!
    Mac OS X 10.6 Snow Leopard
    http://store.apple.com/us/product/MACOS_XSNGL
    I hope this information is of help to any Leopard users having trouble with the latest Java update.

    Thanks for the suggestion.
    Please bear in mind that this issue, presumably introduced by Apple's own update, affects not only the command line java interpreter but any other app that depends on Java (including some GUI apps). So it perhaps fits the larger scope of Leopard instead of the Unix area.
    Message was edited by: bhapca

  • MySQL Varchar not matching Java String

    I am using MySQL 4.0.16 with jdk1.3.1_01 and I have a strange occurance going on with comparing Strings from the mysql database with Strings entered from java, coming from a JTextField. The mysql field in question was created like this:-
    CREATE TABLE hardware (
    serialnumber VARCHAR(20) UNIQUE NOT NULL,
    .....The line in arrows on the proceeding code is where I am having problems. I changed the method from .getString() to getInt() to test the IF statement and matches were produced as expected but with getString(), no matches are made from this line even though 'System.out' shows the variable from mysql and the variable from java (a JTextField) are both the same at the point of the IF statement, (as tested by the line below the arrows.
    rs = stmt.executeQuery("select count(*)from hardware;");
    rs.next();for (int x=0;x < rowSize; x++) {
       rs.next();
      if (rs.getString(1) == newSerialNumber) {    // <<<<<<<<
              nonUniqueSerialNumber=true;
      System.out.println("loop on "+x+"rs.getString(1) is "+rs.getString(1)+" java textfield is "+newSerialNumber);
    rs.close();
    // If reached this stage - the Serial Number is OK.
    int rowSize = rs.getInt(1);
    rs = stmt.executeQuery(getAllSerialNumbers_QRY);Any known reasons or thoughts greatly appreciated? I've looked through the mysql manual with no mention of VARCHAR or CHAR incompatibilites. Also I am using the Connector/J 3.0.9 JDBC driver..
    Pat Rivet

    Nothing to do with the database, just a common newbie-to-Java error. Don't use == to compare the contents of two String objects, use the equals() method instead. Like this:if (rs.getString(1).equals(newSerialNumber))...

  • Dynamic IO throws java.io.FileNotFound exception

    Hi, I have the following class ( a prototype) which I want to use to display the contents of any file. I plan to work on this more so it puts it onto a Panel in a different section to the input, but bear with me.
    When I enter a file name (even with a full path), it generates the following:
    Enter source file to list :
    Watch.java
    You entered : Watch.java
    Error -- java.io.FileNotFoundException: Watch.java
    (The filename, directory name, or volume label syntax is incorrect)
    Here is the source code. What am I doing wrong ? If I change the FileReader object and hard code a file name, it works fine. Please help. Thanks.
    import java.io.*;
    public class ReadSource2
    public static String inline()
    StringBuffer response = new StringBuffer();
    try
    {     BufferedInputStream buff = new BufferedInputStream(System.in);
    int in = 0;
    char inChar;
    do {
    in = buff.read();
         inChar = (char) in;
         if (in != -1) response.append(inChar);
         } while ((in != -1) && (inChar != '\n'));
         buff.close();
         return response.toString();
    catch (IOException e)
         { System.out.println("Exception: " + e.getMessage());
         return null;
    public static void main(String[] args)
    System.out.println("\nEnter source file to list : ");
    String input = ReadSource2.inline();
    System.out.println("You entered : " + input);
    try
    {      FileReader file = new FileReader("" + input);
         BufferedReader buff = new BufferedReader(file);
         boolean eof = false;
         while (!eof)
              String line = buff.readLine();
              if (line == null) eof = true;
              else System.out.println(line);
         buff.close();
    catch (IOException e) { System.out.println("Error -- " + e.toString()); }
    }

    I solved this by trial and error (more error than trial). What was happening was that I was capturing the carriage return as part of the file name, so I had to truncate it from the file name and it now works fine. I made the followingf modification to the main() method:
    input = input.substring(0, input.length() - 2) ;
    and it works like a charm.
    Of course if I hit a Tab before carriage return, it blows up just as it did before, so it is not completely idiot-proof yet, but should be OK for 99% of the time. This now also works for windows files (just HAD to test), where a space in the file name is legitimate.
    Case closed. Lesson learned.

  • Error: could not open `C:\Program Files\Java\j2re1.4.0_01\lib\i386\jvm.cfg'

    I am geting this error when I enter the "java" command:
    "Error: could not open `C:\Program Files\Java\j2re1.4.0_01\lib\i386\jvm.cfg'"
    I have configured the PATH variable (Windows 2000) and "javac" works. I cannot, however, get my programs to run because of the error every time I type "java". Also, I did not install my JDK / SDK to the directory in which the computer is looking for the "java" cammand (ie. it is not in 'Program Files'...). If anyone can help, it would be greatly appreciated. Thank you.

    Try using the -cp switch on the command line. For example:java -cp . MyProgramIf this corrects the problem, you need to set the classpath variable
    as well as the path.
    Mark

  • Java.util.zipException in linux

    Using Linux (Mandrake 8.2) when I enter:
    /usr/java/j2sdk1.4.0/bin/java -jar jedit40install.jar
    I get an error:
    Exception in thread "main" java.util.zip.Exception: No such file or directory
    at java.util.zip.zipFile.open (native method)
    at java.util.zip.zipFile.(ZipFile.java:112)
    at java.util.zip.zipFile.(ZipFile.java:117)
    at java.util.zip.zipFile.(ZipFile.java:55)
    Any ideas how to resolve this? I'd greatly appreciate any assistance
    fyi -this is crossposted at http://community.jedit.org but, as of yet, nobody has even read it.

    thanks. your suggestions made it work. For other users with a similar problem, here is what I did to make it work.
    to find my install working directory, in the console I entered:
    locate jeditinstall40.jar
    It listed the path as /usr/bin/java/j2sdk1.4.0/bin/jedit40install.jar
    I then entered:
    /usr/java/j2sdk1.4.0/bin/java -jar /usr/java/j2sdk1.4.0/bin/jedit40install.jar

  • Argh! "java.lang.NoClassDefFoundError"! help!

    I am a student and only just started programming in Java. When I installed the SDK on my home computer i discovered that everytime i try and run a program i have written, no matter how basic, i get a "java.lang.NoClassDefFoundError". I did a search on the forum and found lots of stuff about something called classpath, but i have no idea what it is or how to do it, despite the explanations ive read. If someone could please take me through it step by step id be VERY greatful.
    I'm running it on Windows XP home edition.
    Thanks alot
    Jon

    I tried the tutorial you showed me, thanks. However, it doesnt seem to have worked, when i did the "set CLASSTEST=" in the directory i was in then it worked, but only temporarily. But when I tried changing the Path variable in Environment Variables (Control Panel\System --> Advanced --> Environment Variables, it didnt seems to work. I added "C:\j2sdk1.4.2_02\bin" to both the user variables and system variables.
    Anyway, this is what I tried, from the beginning...
    I wrote the code in TextPad, the code is as follows -
    public class HelloWorld {
    public static void main( String[] args ) {
    System.out.println( "hello world" );
    (as i understand, it couldnt be any simpler!)
    I then compiled this in TextPad and got no errors.
    I then tried then run it, also through TextPad (Tools --> Run Java Application) and got this error (word for word) -
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
    Press any key to continue . . .
    I also tried running it from the command prompt and just got the same error, even when i switched to the right directory (C:\Documents and Settings\Jon\Desktop\Uni_stuff). The commands i entered were "java HelloWorld".
    If anyone can help me with this, id be greatful as its getting pretty urgent.
    Thanks
    Jon Britton

Maybe you are looking for

  • Icloud music storage

    Forgive my stupidity, but if store all my music in the Cloud does that mean i don't have to have it taking up gb's on my computer.  I have over 850 albums which take up a lot of space so if i could free this up by storing elsewhere that would be fant

  • Create supplier, automatically create the same supplier as a customer

    Dear all, i'm using EBS R12.1.1, when i create any supplier, it shows the same supplier as a customer. how can i disable it? from which responsibility this option is? thank you regards Yaser

  • Query regarding delayed block cleanout

    Hi, I have a question regarding delayed block clean-out in Oracle. I have read below from meta link note: 40689.1 Consider a transaction that updates a million row table. This obviously visits a large number of database blocks to make the change to t

  • Nikon D810 NEF's Open in ACR But Not PS CS6

    I just installed ACR 8.7.1 and can view and adjust Nikon D810 NEF files but when I press "OPEN" (from ACR) to begin work in PS CS6 they will not open. CS6 does launch but I dont see the NEF file. My Canon CR2 and Fuji RAF files open fine in in CS6. A

  • XDODTEXE not working for me

    I am trying to create an iExpense report which has to give EXCEL output. Here are the steps i am following. 1. with Report builder 10g, i created an RDF with output XML. 2. By using that XML, i am creating a layout (RTF) using the Template builder. 3