Executing swing program

Hi...
I have a swing application, and I execute it with a call to java run time like this:
java PACKAGENAME.CLASSNAME in a .BAT file who open a console...
But I want to execute the program without open the console... �can I do it ?
Thaks a lot....
PS- > Another question. How can I do it a jar file and what is the syntax of call ??
java -jar PACKAGENAME.CLASSNAME ???
Really Thanks

When I try to execute my application (in a jar), the console window tell me
Exception in thread "main" java.util.zip.ZipException:
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
I�ve created the jar file with eclipse, and I�ve specified the main class.
What�s the problem now ??
Java is too dificult for me...

Similar Messages

  • I want to be able to execute a swing program from my  desktop

    i want to be able to execute a swing program from my desktop but i dont know how to go about it. Till now to run the programs i used command prompt. please can you guys help me cross this huddle. I need step by step solution to do this

    In Windows, you associate a .jar file with javaw. YOu can do this with a right-click on the system icon, if I recall correctly.
    Another option is to wrap the jar file in an executable wrapper so it looks like an .exe. I have used JSmooth to good effect for this.
    Good luck. It is only modestly tricky

  • Font problem when executing a swing program

    Hi! I'm learning to write a simple swing program. The program compiled successfully. When I excuted it, everything worked fine except that I got the following error message:
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    It's somewhat annoying. Do you have any solution?
    Thank you,
    Liheng

    Thank you. I tried to run Font2DTest. But it didn't work, "Exception in thread "main" java.util.zip.ZipException: No such file or directory"
    I'll keep trying.......
    In JDK under the directory demo/jfc/Font2DTest, there
    is a demo program that shows all available fonts on
    your system. You can find the available font names.
    Then in the font.properties file in jre/lib, search
    for the font name in your error message and replace it
    with an available name from Font2DTest.
    Are you using Unix? What OS, Solaris, Linux?

  • Error while running Swing program on FreeBSD

    Hi,
    I am trying to run simple swing program "helloworld"
    but while executing it gives following error on FreeBSD
    Exception in thread "main" java.lang.UnsatisfiedLinkError:
    /usr/local/linux-sun-jdk1.4.2/jre/lib/i386/libawt.so: libXp.so.6:
    cannot open shared object file: No such file or directory
            at java.lang.ClassLoader$NativeLibrary.load(Native Method)
            at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
            at java.lang.Runtime.loadLibrary0(Runtime.java:788)
            at java.lang.System.loadLibrary(System.java:834)
            at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
            at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
            at java.awt.EventQueue.<clinit>(EventQueue.java:80)
            at javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1170)
            at JPanels.main(JPanels.java:29)
    Should i install XFree86-libs package on FreeBsd
    configuration
    FreeBSD 4.10-BETA (GENERIC)
    I am using following packages
    linux-sun-jdk-1.4.2.04 Sun Java Development Kit 1.4 for Linux
    linux_base-8-8.0_4 Base set of packages needed in Linux mode (only for i386)
    linux_devtools-8.0_1 Packages needed for doing development in Linux mode
    libtool-1.3.5_1 Generic shared library support script
    gmake-3.80_1 GNU version of 'make' utility
    automake-1.4.5_9 GNU Standards-compliant Makefile generator (legacy version
    GCC 2.95.4
    gdb 4.18
    ld 2.12.1 supported emulation elf_i386
    regards
    Man479

    This is not really a Swing question. You should install the library which satisfies the lookup of libXp.so.6 .
    I quess the jre for this platform is compiled against this version. Looks to me like some X related library, maybe google can resolve a solution/package to install?
    Greetz

  • I can't execute java program.

    when we execute our java application,
    we met this fatal error.
    my environment of execution are
    - used jnlp(webstart)
    - swing program
    - JRE (1.6.0_22-b04)
    when it happened error, it created hs_err_pidxxxx.log file.(xxxx means sequence).
    of caurse, we try to execute again, we can do it successfully.
    this is file contents
    # A fatal error has been detected by the Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000091, pid=11360, tid=11164
    # JRE version: 6.0_22-b04
    # Java VM: Java HotSpot(TM) Client VM (17.1-b03 mixed mode windows-x86 )
    # Problematic frame:
    # C 0x00000091
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x47f80800): JavaThread "Thread-3" [_thread_in_native, id=11164, stack(0x47d10000,0x47d50000)]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000091
    Registers:
    EAX=0x47d4f824, EBX=0x47f80918, ECX=0x47d4f7d4, EDX=0x47d4f820
    ESP=0x47d4f77c, EBP=0x00000001, ESI=0x47f98cc8, EDI=0x47f80800
    EIP=0x00000091, EFLAGS=0x00010202
    Top of Stack: (sp=0x47d4f77c)
    0x47d4f77c: 6d114c04 47f80918 47f98cc8 00000004
    0x47d4f78c: 47d4f7d4 47d4f824 47d4f820 ffa0a0b4
    0x47d4f79c: 47f80800 431fe380 431fe380 47d4f7fc
    0x47d4f7ac: 0095e772 47f80918 47d4f82c 47d4f828
    0x47d4f7bc: 47d4f824 47d4f820 ffa0a0b4 00000070
    0x47d4f7cc: 0000005b 00000092 00000001 0000001e
    0x47d4f7dc: 47d4f7dc 431fe380 47d4f82c 431ff1a8
    0x47d4f7ec: 00000000 431fe380 00000000 47d4f80c
    Instructions: (pc=0x00000091)
    0x00000081:
    [error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xc0000005]
    Stack: [0x47d10000,0x47d50000], sp=0x47d4f77c, free space=fd47d4ec3ck
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C 0x00000091
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j sun.java2d.windows.GDIRenderer.doFillRect(Lsun/java2d/SurfaceData;Lsun/java2d/pipe/Region;Ljava/awt/Composite;IIIII)V+0
    j sun.java2d.windows.GDIRenderer.doFillSpans(Lsun/java2d/SunGraphics2D;Lsun/java2d/pipe/SpanIterator;)V+67
    j sun.java2d.windows.GDIRenderer.draw(Lsun/java2d/SunGraphics2D;Ljava/awt/Shape;)V+39
    j sun.java2d.pipe.PixelToShapeConverter.drawLine(Lsun/java2d/SunGraphics2D;IIII)V+22
    j sun.java2d.pipe.ValidatePipe.drawLine(Lsun/java2d/SunGraphics2D;IIII)V+19
    j sun.java2d.SunGraphics2D.drawLine(IIII)V+10
    j javax.swing.plaf.basic.BasicProgressBarUI.paintDeterminate(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+218
    j javax.swing.plaf.basic.BasicProgressBarUI.paint(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+22
    j com.incors.plaf.kunststoff.KunststoffProgressBarUI.paint(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+3
    j javax.swing.plaf.ComponentUI.update(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+32
    j javax.swing.JComponent.paintComponent(Ljava/awt/Graphics;)V+26
    j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+290
    j kosmos.basex.util.KosmosUtils.paintImmediately(Ljava/awt/Component;)V+7
    j kosmos.basex.ui.dialog.ProgressDialog.setProgress(I)V+36
    j kosmos.KosmosApp.Progress(Ljava/lang/String;)V+47
    j kosmos.KosmosApp.createUI()Z+823
    j kosmos.KosmosApp$1uitask.run()V+520
    j java.lang.Thread.run()V+11
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x47fa8800 JavaThread "Image Fetcher 0" daemon [_thread_blocked, id=11120, stack(0x48830000,0x48870000)]
    0x48017800 JavaThread "TimerQueue" daemon [_thread_blocked, id=4844, stack(0x486f0000,0x48730000)]
    0x47fda800 JavaThread "Thread-5" [_thread_blocked, id=8656, stack(0x486b0000,0x486f0000)]
    0x47fd6c00 JavaThread "Thread-4" [_thread_blocked, id=9784, stack(0x48660000,0x486a0000)]
    0x47f86800 JavaThread "D3D Screen Updater" daemon [_thread_blocked, id=8336, stack(0x483c0000,0x48400000)]
    =>0x47f80800 JavaThread "Thread-3" [_thread_in_native, id=11164, stack(0x47d10000,0x47d50000)]
    0x47364c00 JavaThread "Image Animator 0" daemon [_thread_blocked, id=9872, stack(0x47cb0000,0x47cf0000)]
    0x4735a400 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=11200, stack(0x47c70000,0x47cb0000)]
    0x47352400 JavaThread "APP THREAD" [_thread_blocked, id=10268, stack(0x47c30000,0x47c70000)]
    0x4731c000 JavaThread "AWT-Windows" daemon [_thread_in_native, id=10296, stack(0x47540000,0x47580000)]
    0x4731ac00 JavaThread "AWT-Shutdown" [_thread_blocked, id=8412, stack(0x47500000,0x47540000)]
    0x47317400 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=12040, stack(0x474c0000,0x47500000)]
    0x46e47c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=10972, stack(0x471b0000,0x471f0000)]
    0x46e3d400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=8952, stack(0x47160000,0x471b0000)]
    0x46e33800 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=6884, stack(0x47120000,0x47160000)]
    0x46e2cc00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=12020, stack(0x470e0000,0x47120000)]
    0x46e2a800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=10376, stack(0x470a0000,0x470e0000)]
    0x46e1b000 JavaThread "Attach Listener" daemon [_thread_blocked, id=10472, stack(0x46fa0000,0x46fe0000)]
    0x46e37800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=12052, stack(0x46f60000,0x46fa0000)]
    0x46e09000 JavaThread "Finalizer" daemon [_thread_blocked, id=10348, stack(0x46f20000,0x46f60000)]
    0x46e04400 JavaThread "Reference Handler" daemon [_thread_blocked, id=6568, stack(0x46ee0000,0x46f20000)]
    0x00847800 JavaThread "main" [_thread_blocked, id=11564, stack(0x008e0000,0x00920000)]
    Other Threads:
    0x46e01800 VMThread [stack: 0x46e90000,0x46ee0000] [id=9788]
    0x46e49c00 WatcherThread [stack: 0x471f0000,0x47240000] [id=8676]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 314560K, used 117447K [0x029d0000, 0x17f20000, 0x17f20000)
    eden space 279616K, 42% used [0x029d0000, 0x09c81c48, 0x13ae0000)
    from space 34944K, 0% used [0x13ae0000, 0x13ae0000, 0x15d00000)
    to space 34944K, 0% used [0x15d00000, 0x15d00000, 0x17f20000)
    tenured generation total 699072K, used 0K [0x17f20000, 0x429d0000, 0x429d0000)
    the space 699072K, 0% used [0x17f20000, 0x17f20000, 0x17f20200, 0x429d0000)
    compacting perm gen total 12288K, used 10980K [0x429d0000, 0x435d0000, 0x469d0000)
    the space 12288K, 89% used [0x429d0000, 0x43489060, 0x43489200, 0x435d0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00424000      C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe
    0x7c930000 - 0x7c9ce000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c92f000      C:\WINDOWS\system32\kernel32.dll
    0x77f50000 - 0x77ff8000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77d80000 - 0x77e12000      C:\WINDOWS\system32\RPCRT4.dll
    0x77ef0000 - 0x77f01000      C:\WINDOWS\system32\Secur32.dll
    0x77cf0000 - 0x77d7f000      C:\WINDOWS\system32\USER32.dll
    0x77e20000 - 0x77e68000      C:\WINDOWS\system32\GDI32.dll
    0x762e0000 - 0x762fd000      C:\WINDOWS\system32\IMM32.DLL
    0x62340000 - 0x62349000      C:\WINDOWS\system32\LPK.DLL
    0x73f80000 - 0x73feb000      C:\WINDOWS\system32\USP10.dll
    0x77bc0000 - 0x77c18000      C:\WINDOWS\system32\msvcrt.dll
    0x7c340000 - 0x7c396000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\msvcr71.dll
    0x6d8a0000 - 0x6db47000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\client\jvm.dll
    0x76af0000 - 0x76b1b000      C:\WINDOWS\system32\WINMM.dll
    0x6d850000 - 0x6d85c000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\verify.dll
    0x6d3d0000 - 0x6d3ef000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\java.dll
    0x6d330000 - 0x6d338000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\hpi.dll
    0x76ba0000 - 0x76bab000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d420000 - 0x6d449000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\jdwp.dll
    0x6d740000 - 0x6d746000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\npt.dll
    0x6d890000 - 0x6d89f000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\zip.dll
    0x6d2b0000 - 0x6d2b7000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\dt_socket.dll
    0x719e0000 - 0x719f7000      C:\WINDOWS\system32\WS2_32.dll
    0x719d0000 - 0x719d8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71980000 - 0x719bf000      C:\WINDOWS\System32\mswsock.dll
    0x76ed0000 - 0x76ef7000      C:\WINDOWS\system32\DNSAPI.dll
    0x76f60000 - 0x76f68000      C:\WINDOWS\System32\winrnr.dll
    0x76f10000 - 0x76f3c000      C:\WINDOWS\system32\WLDAP32.dll
    0x64000000 - 0x64025000      C:\Program Files\Bonjour\mdnsNSP.dll
    0x76d10000 - 0x76d29000      C:\WINDOWS\system32\Iphlpapi.dll
    0x76f70000 - 0x76f76000      C:\WINDOWS\system32\rasadhlp.dll
    0x65cb0000 - 0x65d06000      C:\WINDOWS\system32\hnetcfg.dll
    0x719c0000 - 0x719c8000      C:\WINDOWS\System32\wshtcpip.dll
    0x6d0b0000 - 0x6d1fa000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\awt.dll
    0x72f50000 - 0x72f76000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x76970000 - 0x76aad000      C:\WINDOWS\system32\ole32.dll
    0x77160000 - 0x77263000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\COMCTL32.dll
    0x77e70000 - 0x77ee6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x5a480000 - 0x5a4b8000      C:\WINDOWS\system32\uxtheme.dll
    0x6d2e0000 - 0x6d32f000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\fontmanager.dll
    0x47580000 - 0x4759e000      C:\WINDOWS\SoftCamp\SDS\DSEDCon.dll
    0x7d5a0000 - 0x7dd9c000      C:\WINDOWS\system32\SHELL32.dll
    0x77bb0000 - 0x77bb8000      C:\WINDOWS\system32\VERSION.dll
    0x47450000 - 0x4745e000      C:\WINDOWS\DSIpcAg.dll
    0x475a0000 - 0x475a8000      C:\WINDOWS\system32\SXTracer.dll
    0x73d10000 - 0x73e0e000      C:\WINDOWS\system32\MFC42.DLL
    0x61300000 - 0x6130d000      C:\WINDOWS\system32\MFC42LOC.DLL
    0x477d0000 - 0x477f6000      C:\WINDOWS\WRMK.dll
    0x74660000 - 0x746ab000      C:\WINDOWS\system32\MSCTF.dll
    0x75110000 - 0x7513e000      C:\WINDOWS\system32\msctfime.ime
    0x47960000 - 0x479c9000      C:\WINDOWS\system32\IMKR12.IME
    0x770d0000 - 0x7715b000      C:\WINDOWS\system32\OLEAUT32.dll
    0x78130000 - 0x781cb000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll
    0x7c420000 - 0x7c4a7000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCP80.dll
    0x4b9e0000 - 0x4bb86000      C:\WINDOWS\system32\d3d9.dll
    0x6de50000 - 0x6de56000      C:\WINDOWS\system32\d3d8thk.dll
    0x6d6b0000 - 0x6d6c3000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\net.dll
    0x6d4f0000 - 0x6d515000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\jpeg.dll
    0x47cf0000 - 0x47d00000      C:\Program Files\NATEON\BIN\NateOnHook40u.dll
    0x6d6d0000 - 0x6d6d9000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\nio.dll
    0x6c000000 - 0x6c02a000      C:\WINDOWS\SoftCamp\SDS\ASCore.dll
    0x6d250000 - 0x6d273000      C:\Program Files\Java\jdk1.6.0_22\jre\bin\dcpr.dll
    VM Arguments:
    jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:9607 -Xms1G -Xmx1G -Xss256K -Dlog4j.configuration=file:D:/Project_Work/etc/log4j.xml -Dfile.encoding=MS949
    java_command: kosmos.KosmosApp yslee bnp
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_22
    CLASSPATH=.;C:\Program Files\Java\j2re1.4.2_11\lib\ext\QTJava.zip
    PATH=C:\Program Files\Java\jdk1.6.0_22\jre\bin;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ESTsoft\ALZip;C:\Program Files\Java\jdk1.6.0_22\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ESTsoft\ALZip;C:\Program Files\IDM Computer Solutions\UltraEdit\
    USERNAME=20964
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
    Memory: 4k page, physical 2062180k(626912k free), swap 4004456k(1282796k free)
    vm_info: Java HotSpot(TM) Client VM (17.1-b03) for windows-x86 JRE (1.6.0_22-b04), built on Sep 15 2010 00:56:36 by "java_re" with MS VC++ 7.1 (VS2003)
    time: Tue Jan 11 16:39:14 2011
    elapsed time: 43 seconds

    thank you for your reply.
    I tried to update my video driver, but also happened this.
    my client told me to update registry authorization of javaSoft to Administrator's authorization.
    so I will try to do this.
    I will update this to you.

  • How to start Swing programs without console

    Hi, I'm working on Swing program, which can be started in the MS-DOS console by typing:
    java myProgram
    This works great, but for the end-users, I don't want them to see the ugly console that shows up and occasionally display exception code. How do I get the Swing program to start up without having the accompanying console?
    Any help is appreciated. Thanks! :-)

    you can also package it in a jar and make it executable. There's a good discussion in the Jar Forum about how to do that.

  • Keyboard-lock of swing program on Linux box

    We are developing swing program on Linux, and we often meet keyboard-lock issues.
    I try to simplify some of them to small programs, and still meet keyboard-lock.
    Here I post two programs to show the error:
    //---first ----------------------------------------------
    package test;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class KeyLock extends JFrame {
      JPanel contentPanel = new JPanel();
      JPanel wizardToolPan = new JPanel();
      JButton btnBack = new JButton("Back");
      JButton btnNext = new JButton("Next");
      JButton btnAbout = new JButton("About");
      public static final String aboutMsg =
              "<html>  This program will help to find keyboard lock problems, two way to reproduce:<br><br>" +
              "1 - press Alt+N to navigate next, and don't release keys untill there are no more next page, <br>" +
              "then try Alt+B to navigate back and also don't release keys untill page 0,<br>" +
              "repeat Alt+N and Alt+B again and again, keyboard will be locked during navigating. <br><br>" +
              "2 - press Alt+A in main window, it will popup an about dialog,<br>" +
              "then press down space key and don't release, <br>" +
              "the about dialog will be closed and opened again and again,<br>" +
              "keyboard will be locked sooner or later." +
              "</html>";
      public KeyLock() {
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setTitle("Keyboard lock test");
        getContentPane().setLayout(new BorderLayout());
        btnBack.setMnemonic('B');
        btnBack.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            KeyLock.this.goBack(e);
        btnNext.setMnemonic('N');
        btnNext.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            KeyLock.this.goNext(e);
        btnAbout.setMnemonic('A');
        btnAbout.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(KeyLock.this, aboutMsg, "About", JOptionPane.INFORMATION_MESSAGE);
        contentPanel.setLayout(new BorderLayout());
        contentPanel.setPreferredSize(new Dimension(400, 250));
        contentPanel.setMinimumSize(new Dimension(400, 250));
        wizardToolPan.setLayout(new FlowLayout());
        wizardToolPan.add(btnBack);
        wizardToolPan.add(btnNext);
        wizardToolPan.add(btnAbout);
        this.getContentPane().add(contentPanel, java.awt.BorderLayout.CENTER);
        this.getContentPane().add(wizardToolPan, java.awt.BorderLayout.SOUTH);
        this.setSize(400, 300);
        this.createContentPanels();
        this.showCurrent();
      private Vector<JPanel> slides = new Vector<JPanel>();
      private int current = 0;
      private void createContentPanels() {
        for (int j = 0; j < 20; ++j) {
          JPanel p = new JPanel(new FlowLayout());
          p.add(new JLabel("Page: " + j));
          p.add(new JTextField("Page: " + j + ", input something here", 20));
          p.add(new JTextField("Page: " + j + ", input something here", 20));
          p.add(new JTextField("Page: " + j + ", input something here", 20));
          p.add(new JLabel("Input something in password box:"));
          p.add(new JPasswordField(20));
          p.add(new JCheckBox("Try click here, focus will be here."));
          p.add(new JRadioButton("Try click here, focus will be here."));
          slides.add(p);
      public void showCurrent() {
        if (current < 0 || current >= slides.size())
          return;
        JPanel p = slides.get(current);
        this.contentPanel.add(p, java.awt.BorderLayout.CENTER);
        this.pack();
        Component[] comps = p.getComponents();
        if (comps.length > 0) {
          comps[0].requestFocus(); // try delete this line
        this.repaint();
      public void goNext(ActionEvent e) {
        if (current + 1 >= slides.size())
          return;
        this.contentPanel.remove(slides.get(current));
        current++;
        sleep(100);
        this.showCurrent();
      public void goBack(ActionEvent e) {
        if (current <= 0)
          return;
        this.contentPanel.remove(slides.get(current));
        current--;
        sleep(100);
        this.showCurrent();
      public static void sleep(int millis) {
        try {
          Thread.sleep(millis);
        } catch (Exception e) {
          e.printStackTrace();
      public static void main(String[] args) {
        KeyLock wizard = new KeyLock();
        wizard.setVisible(true);
    }The first program will lead to keyboard-lock in RHEL 4 and red flag 5, both J2SE 5 and 6.
    //---second -----------------------------------------
    package test;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class KeyFocusLost extends JFrame {
      private JButton btnPopup = new JButton();
      private JTextField jTextField1 = new JTextField();
      private JPasswordField jPasswordField1 = new JPasswordField();
      private JPanel jPanel1 = new JPanel();
      private JScrollPane jScrollPane3 = new JScrollPane();
      private JTree jTree1 = new JTree();
      private JButton btnAbout = new JButton("About");
      public static final String aboutMsg =
              "<html>  This program is used to find keyboard focus lost problem.<br>" +
              "Click 'popup' button in main window, or select any node in the tree and press F6,<br>" +
              "a dialog popup, and click ok button in the dialog,<br>" +
              "keyboard focus will lost in main window." +
              "</html>";
      public KeyFocusLost() {
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        this.setTitle("Keyboard focus test");
        getContentPane().setLayout(null);
        btnPopup.setBounds(new Rectangle(33, 482, 200, 35));
        btnPopup.setMnemonic('P');
        btnPopup.setText("Popup and lost focus");
        btnPopup.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            PopupDialog dlg = new PopupDialog(KeyFocusLost.this);
            dlg.setVisible(true);
        btnAbout.setBounds(new Rectangle(250, 482, 100, 35));
        btnAbout.setMnemonic('A');
        btnAbout.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(KeyFocusLost.this, aboutMsg, "About", JOptionPane.INFORMATION_MESSAGE);
        jTextField1.setText("Try input here, and try input in password box below");
        jTextField1.setBounds(new Rectangle(14, 44, 319, 29));
        jPasswordField1.setBounds(new Rectangle(14, 96, 319, 29));
        jPanel1.setBounds(new Rectangle(14, 158, 287, 291));
        jPanel1.setLayout(new BorderLayout());
        jPanel1.add(new JLabel("Select any node in the tree and press F6."), java.awt.BorderLayout.NORTH);
        jPanel1.add(jScrollPane3, java.awt.BorderLayout.CENTER);
        jScrollPane3.getViewport().add(jTree1);
        Object actionKey = "popup";
        jTree1.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), actionKey);
        jTree1.getActionMap().put(actionKey, new AbstractAction() {
          public void actionPerformed(ActionEvent e) {
            PopupDialog dlg = new PopupDialog(KeyFocusLost.this);
            dlg.setVisible(true);
        this.getContentPane().add(jTextField1);
        this.getContentPane().add(jPasswordField1);
        this.getContentPane().add(jPanel1);
        this.getContentPane().add(btnPopup);
        this.getContentPane().add(btnAbout);
      public static void main(String[] args) {
        KeyFocusLost keytest = new KeyFocusLost();
        keytest.setSize(400, 600);
        keytest.setVisible(true);
      static class PopupDialog extends JDialog {
        private JButton btnOk = new JButton();
        public PopupDialog(Frame owner) {
          super(owner, "popup dialog", true);
          setDefaultCloseOperation(DISPOSE_ON_CLOSE);
          this.getContentPane().setLayout(null);
          btnOk.setBounds(new Rectangle(100, 100, 200, 25));
          btnOk.setMnemonic('O');
          btnOk.setText("OK, then focus lost");
          btnOk.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              PopupDialog.this.getOwner().toFront();
              try {
                Thread.sleep(100); // try delete this line !!!
              } catch (Exception ex) {
                ex.printStackTrace();
              PopupDialog.this.dispose();
          this.getContentPane().add(btnOk);
          this.getRootPane().setDefaultButton(btnOk);
          this.setSize(400, 300);
    }The second program will lead to keyboard-focus-lost in RHEL 3/4 and red flag 4/5, J2SE 5, not in J2SE 6.
    And I also tried java demo program "SwingSet2" in red flag 5, met keyboard-lock too.
    I guess it should be some kind of incompatibleness of J2SE with some Linux platform. Isn't it?
    Please help, thanks.

    Hi.
    I have same problems on Ubuntu with Java 6 (all versions). I would like to use NetBeans or IntelliJ IDEA but it is not possible due to keyboard locks.
    I posted this bug
    https://bugs.launchpad.net/ubuntu/+bug/174281
    before I found some info about it:
    http://forums.java.net/jive/thread.jspa?messageID=189281
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6568693
    I don't know from which part this bug comes, but I wonder why it isn't fixed yet. Does anybody else use NetBeans or IntelliJ IDEA on linux with Java 6 ?
    (I cannot insert link :\ )

  • Getting errors when trying to execute CRUD programs

    Hi All
    I am trying to execute one of the CRUD programs for creating , updatying or deleting data in MDM server and a m getting a few errors .Could anybody advise.
    Created on Jun 6, 2007
    package com.sap.nw.mdm.rig;
    import com.sap.nw.mdm.rig.programs.data.blobs.BLOBDataProgram;
    import com.sap.nw.mdm.rig.programs.data.checkout_checkin_rollback.CheckOutCheckInRecordsProgram;
    import com.sap.nw.mdm.rig.programs.data.crud.CRUDDataProgram;
    import com.sap.nw.mdm.rig.programs.data.crud.bulk.BulkCRUDDataProgram;
    import com.sap.nw.mdm.rig.programs.data.keymapping.KeyMappingProgram;
    import com.sap.nw.mdm.rig.programs.data.search.SearchProgram;
    import com.sap.nw.mdm.rig.programs.data.search.attribute.AttributeSearchProgram;
    import com.sap.nw.mdm.rig.programs.data.search.field.FieldSearchProgram;
    import com.sap.nw.mdm.rig.programs.data.syndication.SyndicationProgram;
    import com.sap.nw.mdm.rig.programs.data.workflow.WorkflowProgram;
    import com.sap.mdm.data.RegionProperties;
    import com.sap.nw.mdm.rig.repository.Repository;
    import com.sap.nw.mdm.rig.server.Server;
    This class is the starting point to execute all sample programs.
    To see a description of the various programs you can execute, please have a look at the
    documentation for the following classes.  There are static variables in each of these
    classes that point to the various programs that can be executed with a description of
    what the program does.
    <ul>
    <li>{@link com.sap.nw.mdm.rig.programs.data.blobs.BLOBDataProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.checkout_checkin_rollback.CheckOutCheckInRecordsProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.crud.CRUDDataProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.crud.bulk.BulkCRUDDataProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.keymapping.KeyMappingProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.search.SearchProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.search.attribute.AttributeSearchProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.search.field.FieldSearchProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.syndication.SyndicationProgram}
    <li>{@link com.sap.nw.mdm.rig.programs.data.workflow.WorkflowProgram}
    </ul>
    @author Richard LeBlanc
    public class Application {
         private Application() {
    Starts the application and executes a program
    @param args - not required
         static public void main(String[] args) {
              System.out.println("876876");
              Application app = new Application();
              System.out.println("11111");
              Program program = null;
              System.out.println("22222");
    Simply uncomment the line that contains the program you wish to execute and run this class.
    Blob Programs
    //          program = BLOBDataProgram.RETRIEVE_AND_WRITE_IMAGE_TO_FILE;
    //          program = BLOBDataProgram.RETRIEVE_AND_WRITE_PDF_TO_FILE;
    Checkout/Checkin Data Programs
    //          program = CheckOutCheckInRecordsProgram.CHECK_OUT_NEW_CHECK_IN;
    //          program = CheckOutCheckInRecordsProgram.CHECK_OUT_NEW_ROLLBACK;
    //          program = CheckOutCheckInRecordsProgram.CHECK_OUT_EXISTING_CHECK_IN;
    //          program = CheckOutCheckInRecordsProgram.CHECK_OUT_EXISTING_ROLLBACK;
    Create Read Update Delete (CRUD) Data Programs
    //          program = CRUDDataProgram.CRUD_HIERARCHY_TABLE;
              program = CRUDDataProgram.CRUD_MAIN_TABLE;
    //          program = CRUDDataProgram.CRUD_MAIN_TABLE_WITH_FLAT_AND_HIERARCHY_LOOKUP_FIELDS;
    //          program = CRUDDataProgram.CRUD_MAIN_TABLE_WITH_QUALIFIED_LOOKUP_FIELD;
    //          program = CRUDDataProgram.CRUD_MAIN_TABLE_WITH_TAXONOMY_LOOKUP_FIELD;
    //          program = CRUDDataProgram.CRUD_TAXONOMY_TABLE_WITH_ATTRIBUTES;
              System.out.println("333333");
    Bulk Create Read Update Delete (CRUD) data programs
    (many records at once)
    //          program = BulkCRUDDataProgram.BULK_CRUD_MAIN_TABLE;
    KeyMapping Programs
    //          program = KeyMappingProgram.RETRIEVE;
    Search Programs
    //          program = SearchProgram.DRILL_DOWN_SEARCH;
    //          program = SearchProgram.KEYWORD;
    //          program = SearchProgram.MASK;
    //          program = SearchProgram.NAMED_SEARCH;
    //          program = SearchProgram.QUALIFIER;
    Attribute Search Programs
    //          program = AttributeSearchProgram.COUPLED_NUMERIC;
    //          program = AttributeSearchProgram.NUMERIC;
    //          program = AttributeSearchProgram.TEXT;
    Field Search Programs
    //          program = FieldSearchProgram.BOOLEAN;
    //          program = FieldSearchProgram.CURRENCY;
    //          program = FieldSearchProgram.LITERAL_DATE;
    //          program = FieldSearchProgram.LOOKUP;
    //          program = FieldSearchProgram.TEXT;
    Syndication Programs
    //          program = SyndicationProgram.SYNDICATE_PORT;
    Workflow Programs
    //          program = WorkflowProgram.EXECUTE;
              //TODO enter MDS name
              String mdsName = "172.18.139.200"; //the name of the Master Data Server
              String repositoryName = "GDS_1"; //make sure this is the name you use when unarchiving
                                                           //the repository otherwise change it to reflect the name
                                                           //of your repository
              String regionName = "English [US]";
              String userName = "Admin"; //there is an admin user with no password in the provided repository
              String password = ""; //there is an admin user with no password in the provided repository
              System.out.println("67r86587");
              app.start(mdsName, repositoryName, regionName, userName, password, program);
    Establishes a connection to the given server and logs in to the given repository
    with the given logon information and executes the given program
         private void start(String serverName, String repositoryName, String regionName,
                                  String user, String password, Program program) {
              //Create an instance of the MDS
              Server server = Server.getInstance(serverName);
              System.out.println("444444");
              //Get the list of running repositories from the server
              Repository[] repositories = server.getRepositories();
              System.out.println("5555");
              Repository repository = null;
              //Go through the list of repositories and see if any match the
              //given repository name
              for(int i=0, j=repositories.length; i<j; i++){
                   System.out.println("666666bbye");
                   if(repositories<i>.getIdentifier().getName().equals(repositoryName)) {
                        System.out.println(" hello" +repositoryName);
                        repository = repositories<i>;
                        System.out.println(" hi"   + repository);          
              //Get the list of regions for the repository
              RegionProperties[] regions = repository.getRegions();
              RegionProperties region = null;
              //Go through the list of regions and see if any match the given
              //repository name
              for(int i=0, j=regions.length; i<j; i++){
                   System.out.println(" hello");
                   if(regions<i>.getName().equals(regionName)) {
                        region = regions<i>;
                        System.out.println(" 99999" +region);
              //Login to the repository as you would using the Data Manager
              //This creates a user and repository session that are available using
              //repository.getSession()
              repository.login(region, user, password);
              //execute the program from the list above
              program.execute(repository);
              System.out.println(" finally");
              //destroy the session (destroys the repository and user sessions)
              repository.getSession().destroy();
              //close the connection to the MDS
              repository.getServer().closeConnection();
    I am getting the following errors:
    Exception in thread "main" java.lang.IllegalArgumentException: Table with Code 'Products' does not exist in the repository 'GDS_1'
         at com.sap.mdm.internal.schema.RepositorySchemaImpl.getTableSchema(RepositorySchemaImpl.java:136)
         at com.sap.nw.mdm.rig.programs.data.crud.CRUDMainTableRecordProgram.execute(CRUDMainTableRecordProgram.java:33)
         at com.sap.nw.mdm.rig.Application.start(Application.java:211)
         at com.sap.nw.mdm.rig.Application.main(Application.java:157)

    Hi Stephen,
    I assume that a super admin user does not get these error messages, right? If so, this behaviour might come due to missing permissions on PCD objects for the user rubinmd. Please apply note 792370 which explains how to set end user permission on the pcd folder com.sap.ip.collaboration/Rooms
    Kind regards,
    Roland

  • How can i execute java program in JSP ?

    att
    thanks

    try to use:
    Runtime.getRuntime().exec("command line");
    where "command line" is your command to execute your program.

  • Error in executing ABAP program. Error occurred when creating dataset

    hi,
    when I use LKM SAP ERP to Oracle (SQLLDR) to extract data from SAP ERP server. I execute my interface, and it's stop at extract data step.
    This is message:
    java.lang.RuntimeException: Error occured in open tool execute method...Error in executing ABAP program...Error in executing ABAP program...Error occurred when creating dataset/abc/ZODI_13001_6001_GLOBAL.txt
    I tried others path name, tried slash or backslash. This is content in code tab
    OdiSAPAbapExecute "-UPLOAD=1" "-EXECUTE=1" "-EXECUTEBASE_RKM=0" "-ZRFC_RUN_INSTALL=1" "-ABAP_PROGRAM_NAME=ZODI_13001_6001" "-HOST=10.86.87.24" "-USER=sv_hoa" "-PASSWORD=<@=snpRef.getInfo("SRC_PASS") @>" "-SAP_CLIENT=800" "-SAP_LANGUAGE=EN" "-SAP_SYSTEM_NUMBER=02" "-SAP_FUNCTION_GROUP_NAME=ZODI_FGR_13001" "-CONNECTION_POOL_NAME=SAP_ODI_ERP_POOL_10.86.87.24" "-CONNECTION_POOL_SIZE=10" "-FILE_DELIMITER=<@=""+(char)8@>" "-FILE_NAME=ZODI_13001_6001_GLOBAL.txt" "-FTP_HOST=10.86.82.108" "-FTP_USER=anh" "-FTP_PASSWORD=<@=sFtpPassword@>" "-FTP_PASSIVE_MODE=1" "-FTP_TRANSFER_TIMEOUT=100000" "-ODI_VARIABLE_NAMES=" "-ODI_VARIABLE_VALUES=" "-USER_ABAP_PARAMETER_NAMES=IV_DELIMITER,CHAR3;IV_FILENAME,CHAR255;IV_USER,CHAR35;IV_PWD,CHAR35;IV_HOST,CHAR35;IV_HASHVALUE,CHAR35;IV_PATH,CHAR35;IV_MAX_ROW_CNT,SYTABIX;IV_FETCH_BATCH_SIZE,SYTABIX;" "-USER_ABAP_PARAMETER_VALUES=<Value>" "-USER_ABAP_PARAMETER_SEPARATOR=<Value>" "-ABAP_TABLE_PARAMETERS=RETURN,BAPIRETURN;ET_FILE_RETURN,BAPIRET2" "-ABAP_EXPORT_PARAMETERS=ERRORMESSAGE;SY-MSGV1" "-LOG_FILE_NAME=C:\Users\anh\AppData\Local\Temp\SapAbapExecuteOpenTool_13001.log" "-FTP_PATH=/abc/" "-DEV_CLASS=ZODI_DEVCLASS" "-MAX_ROW_COUNT=" "-FETCH_BATCH_SIZE=100000" "-HASH_VALUE_MARKER=HVM" "-ABAP_PROGRAM_BODY=
    *Final Type declarations
    TYPES : BEGIN OF ty_final,
    Y03HOCSINH_HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID,
    Y03HOCSINH_MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH,
    Y03HOCSINH_TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH,
    Y03HOCSINH_GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH,
    Y03HOCSINH_DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI,
    Y03HOCSINH_GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU,
    END OF ty_final.
    *Final Temp Type Declarations
    TYPES : BEGIN OF ty_final_tmp,
    Y03HOCSINH_HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID ,
    Y03HOCSINH_MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH ,
    Y03HOCSINH_TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH ,
    Y03HOCSINH_GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH ,
    Y03HOCSINH_DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI ,
    Y03HOCSINH_GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU ,
    END OF ty_final_tmp.
    *Final Target Type Declarations
    TYPES : BEGIN OF ty_final_target,
    C0_Y03HOCSINH_HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID,
    C1_Y03HOCSINH_MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH,
    C2_Y03HOCSINH_TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH,
    C3_Y03HOCSINH_GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH,
    C4_Y03HOCSINH_DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI,
    C5_Y03HOCSINH_GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU,
    END OF ty_final_target.
    * Table type for Y03HOCSINH
    TYPES : BEGIN OF ty_Y03HOCSINH,
    HOCSINH_ID TYPE
    Y03HOCSINH-HOCSINH_ID,
    MA_HOC_SINH TYPE
    Y03HOCSINH-MA_HOC_SINH,
    TEN_HOC_SINH TYPE
    Y03HOCSINH-TEN_HOC_SINH,
    GIOI_TINH TYPE
    Y03HOCSINH-GIOI_TINH,
    DIA_CHI TYPE
    Y03HOCSINH-DIA_CHI,
    GHI_CHU TYPE
    Y03HOCSINH-GHI_CHU,
    END OF ty_Y03HOCSINH.
    TYPES: BEGIN OF gs_text,
    line(843) TYPE c,
    END OF gs_text.
    *Structure Declarations
    DATA: wa_final_string TYPE string,
    wa_final TYPE ty_final,
    wa_final_target TYPE ty_final_target,
    wa_Y03HOCSINH TYPE ty_Y03HOCSINH,
    *Table Declarations
    tt_final TYPE STANDARD TABLE OF ty_final,
    tt_Y03HOCSINH TYPE STANDARD TABLE OF ty_Y03HOCSINH,
    tt_final_target TYPE STANDARD TABLE
    OF ty_final_target,
    tt_final_tmp TYPE STANDARD TABLE OF ty_final_tmp,
    tt_final_tmp1 TYPE STANDARD TABLE OF ty_final,
    gt_result TYPE STANDARD TABLE OF gs_text,
    *Variable Declarations
    lv_path TYPE string,
    lv_flag TYPE char1,
    C0_Y03HOCSINH_HOCSINH_ID TYPE
    STRING,
    C1_Y03HOCSINH_MA_HOC_SINH TYPE
    STRING,
    C2_Y03HOCSINH_TEN_HOC_SINH TYPE
    STRING,
    C3_Y03HOCSINH_GIOI_TINH TYPE
    STRING,
    C4_Y03HOCSINH_DIA_CHI TYPE
    STRING,
    C5_Y03HOCSINH_GHI_CHU TYPE
    STRING,
    wa_final_tmp TYPE ty_final_tmp,
    lv_file TYPE string,
    lv_datum TYPE sy-datum,
    lv_date TYPE char10,
    wa_result TYPE string,
    lv_delimiter type string,
    lv_cnt TYPE sytabix,
    *-Cursor Declaration
    lv_Y03HOCSINH_dbcur TYPE cursor,
    lv_tabix_frm TYPE sy-tabix.
    lv_delimiter = iv_delimiter.
    IF iv_hashvalue = 'HVM'.
    *Open/delete output file
    CONCATENATE iv_path iv_filename INTO lv_path.
    *Check for file existence, if found, delete it
    OPEN DATASET lv_path FOR INPUT
    IN TEXT MODE
    ENCODING DEFAULT.
    IF sy-subrc EQ 0.
    DELETE DATASET lv_path.
    ENDIF.
    *Open/create output file
    OPEN DATASET lv_path FOR APPENDING
    IN TEXT MODE
    ENCODING DEFAULT.
    IF sy-subrc EQ 0.
    *Batch Processing
    OPEN CURSOR WITH HOLD lv_Y03HOCSINH_dbcur FOR
    SELECT HOCSINH_ID
    MA_HOC_SINH
    TEN_HOC_SINH
    GIOI_TINH
    DIA_CHI
    GHI_CHU
    FROM Y03HOCSINH.
    DO.
    *Check for the counter, only for first batch
    *process new line is required...
    lv_cnt = lv_cnt + 1.
    REFRESH tt_Y03HOCSINH.
    FETCH NEXT CURSOR lv_Y03HOCSINH_dbcur
    APPENDING TABLE tt_Y03HOCSINH
    PACKAGE SIZE IV_FETCH_BATCH_SIZE.
    IF NOT tt_Y03HOCSINH IS INITIAL.
    ELSE.
    EXIT.
    ENDIF.
    LOOP AT tt_Y03HOCSINH INTO wa_Y03HOCSINH.
    MOVE wa_Y03HOCSINH-HOCSINH_ID
    TO wa_final_tmp-Y03HOCSINH_HOCSINH_ID.
    MOVE wa_Y03HOCSINH-MA_HOC_SINH
    TO wa_final_tmp-Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_Y03HOCSINH-TEN_HOC_SINH
    TO wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_Y03HOCSINH-GIOI_TINH
    TO wa_final_tmp-Y03HOCSINH_GIOI_TINH.
    MOVE wa_Y03HOCSINH-DIA_CHI
    TO wa_final_tmp-Y03HOCSINH_DIA_CHI.
    MOVE wa_Y03HOCSINH-GHI_CHU
    TO wa_final_tmp-Y03HOCSINH_GHI_CHU.
    APPEND wa_final_tmp TO tt_final_tmp.
    ENDLOOP.
    free : tt_Y03HOCSINH.
    LOOP AT tt_final_tmp INTO wa_final_tmp.
    MOVE wa_final_tmp-Y03HOCSINH_HOCSINH_ID
    TO wa_final_target-C0_Y03HOCSINH_HOCSINH_ID.
    MOVE wa_final_tmp-Y03HOCSINH_MA_HOC_SINH
    TO wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_final_tmp-Y03HOCSINH_TEN_HOC_SINH
    TO wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_final_tmp-Y03HOCSINH_GIOI_TINH
    TO wa_final_target-C3_Y03HOCSINH_GIOI_TINH.
    MOVE wa_final_tmp-Y03HOCSINH_DIA_CHI
    TO wa_final_target-C4_Y03HOCSINH_DIA_CHI.
    MOVE wa_final_tmp-Y03HOCSINH_GHI_CHU
    TO wa_final_target-C5_Y03HOCSINH_GHI_CHU.
    Append wa_final_target to tt_final_target.
    ENDLOOP.
    free : tt_final_tmp.
    Clear wa_final_target.
    IF NOT iv_max_row_cnt IS INITIAL.
    Loop at tt_final_target into
    wa_final_target TO iv_max_row_cnt.
    MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
    TO C0_Y03HOCSINH_HOCSINH_ID.
    MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
    TO C1_Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
    TO C2_Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
    TO C3_Y03HOCSINH_GIOI_TINH.
    MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
    TO C4_Y03HOCSINH_DIA_CHI.
    MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
    TO C5_Y03HOCSINH_GHI_CHU.
    CONCATENATE
    C0_Y03HOCSINH_HOCSINH_ID
    C1_Y03HOCSINH_MA_HOC_SINH
    C2_Y03HOCSINH_TEN_HOC_SINH
    C3_Y03HOCSINH_GIOI_TINH
    C4_Y03HOCSINH_DIA_CHI
    C5_Y03HOCSINH_GHI_CHU
    INTO wa_final_string
    SEPARATED BY lv_delimiter.
    IF sy-tabix EQ 1 AND lv_cnt EQ 1.
    CONCATENATE wa_final_string
    lv_delimiter INTO wa_final_string.
    ELSE.
    CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
    lv_delimiter INTO wa_final_string.
    ENDIF.
    APPEND wa_final_string TO gt_result.
    CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
    C1_Y03HOCSINH_MA_HOC_SINH,
    C2_Y03HOCSINH_TEN_HOC_SINH,
    C3_Y03HOCSINH_GIOI_TINH,
    C4_Y03HOCSINH_DIA_CHI,
    C5_Y03HOCSINH_GHI_CHU.
    ENDLOOP.
    ELSE.
    Loop at tt_final_target into wa_final_target.
    MOVE wa_final_target-C0_Y03HOCSINH_HOCSINH_ID
    TO C0_Y03HOCSINH_HOCSINH_ID.
    MOVE wa_final_target-C1_Y03HOCSINH_MA_HOC_SINH
    TO C1_Y03HOCSINH_MA_HOC_SINH.
    MOVE wa_final_target-C2_Y03HOCSINH_TEN_HOC_SINH
    TO C2_Y03HOCSINH_TEN_HOC_SINH.
    MOVE wa_final_target-C3_Y03HOCSINH_GIOI_TINH
    TO C3_Y03HOCSINH_GIOI_TINH.
    MOVE wa_final_target-C4_Y03HOCSINH_DIA_CHI
    TO C4_Y03HOCSINH_DIA_CHI.
    MOVE wa_final_target-C5_Y03HOCSINH_GHI_CHU
    TO C5_Y03HOCSINH_GHI_CHU.
    CONCATENATE
    C0_Y03HOCSINH_HOCSINH_ID
    C1_Y03HOCSINH_MA_HOC_SINH
    C2_Y03HOCSINH_TEN_HOC_SINH
    C3_Y03HOCSINH_GIOI_TINH
    C4_Y03HOCSINH_DIA_CHI
    C5_Y03HOCSINH_GHI_CHU
    INTO wa_final_string
    SEPARATED BY lv_delimiter.
    IF sy-tabix EQ 1 AND lv_cnt EQ 1.
    CONCATENATE wa_final_string
    lv_delimiter INTO wa_final_string.
    ELSE.
    CONCATENATE '<@=""+(char)8@>' lv_delimiter wa_final_string
    lv_delimiter INTO wa_final_string.
    ENDIF.
    APPEND wa_final_string TO gt_result.
    CLEAR : C0_Y03HOCSINH_HOCSINH_ID,
    C1_Y03HOCSINH_MA_HOC_SINH,
    C2_Y03HOCSINH_TEN_HOC_SINH,
    C3_Y03HOCSINH_GIOI_TINH,
    C4_Y03HOCSINH_DIA_CHI,
    C5_Y03HOCSINH_GHI_CHU.
    ENDLOOP.
    ENDIF.
    free : tt_final_target.
    IF NOT gt_result IS INITIAL.
    CLEAR wa_result.
    LOOP AT gt_result INTO wa_result.
    TRANSFER wa_result TO lv_path.
    ENDLOOP.
    ENDIF.
    REFRESH gt_result.
    *End of main loop for batching
    ENDDO.
    *Close dataset
    CLOSE DATASET lv_path.
    CLOSE CURSOR lv_Y03HOCSINH_dbcur.
    ELSE.
    DATA: lv_mesg TYPE string.
    CLEAR et_file_return.
    et_file_return-type = 'E'.
    CONCATENATE
    'Error occurred when creating dataset' lv_path
    INTO lv_mesg.
    et_file_return-message = lv_mesg.
    Append et_file_return.
    ENDIF.
    ELSE.
    CLEAR et_file_return.
    et_file_return-type = 'E'.
    et_file_return-message =
    'Installed ABAP program does not match interface definition'.
    APPEND et_file_return.
    ENDIF.
    Thanks for help

    r u able to figure it out..........i got the same error .......can someone help me fix this issue

  • Error while executing the program RIMODAC2.

    I am not sure of this program's functionality.
            While i execute this program it displays a error message which is displaying a very old Sales Order in the message.
    this is the message
    Function: /SAPAPO/CIF_SL_DOC_INBOUND
    Text: Customer requirement N BM 0100005129 000003 0001:
    the number 0100005129 is a Sales order.
    Regards,
    Kevin.

    Hi,
    It seems that the line raising the exception is:
    pstselect=con.prepareStatement(selectQuery,ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    I don't know the odbc bridge so I'm just guessing, but you cant try with:
    pstselect=con.prepareStatement(selectQuery);
    and see what happens.
    I recommend you to use the thin driver, with a single jar you can connect to Oracle without having to configure anything on your machine, just supply a database url, a username and a password.
    ciao,
    Giovanni
    P.S. the code you posted is prone to NullPointerException, if you got an exception you catch it in the the first cathc block, bat after printing the stack trace you are going on even if the variables are null.

  • Error while executing the program  'RBDMIDOC'

    Hi Experts,
    While executing the program  RBDMIDOC
    I am getting the following errors
    One error in Communication data  :
    1)    No data distributed because of conversion errors
    Two errors in Data selection and formatting :
    1)    No ISO code found for the country key NT in the field NATIO
    2)    Conversion error: infotype 0002, object 01,P,00000033
    I am having change pointer entries in BDCP table.
    Can anyone please tell me how to resolve these errors....
    Thanks in advance...

    us the program
    RHALEINI

  • Authorization Error while executing a program

    Hi All,
               I have developed a program which calls VF02 transaction in background. But while executing it, the program fails with message'No authorization for sales organization XXXX'.
    The users who are executing the program does not have access to VF02 and for security reasons the access can not be given to the users.
    So my question is whether this error is due to no access to 'VF02' or with the sales organization?
    Can we give access to the users according to sales organization rather than giving authorization for VF02 ?
    If not then whats the solution to rectify this error without giving VF02 access to users?
    Please help.
    Thanks,
    Sanujit Acharya

    Hi Sandeep
    The OP's question appears to be 'If I give a custom transaction to a user it seems to then call an object unexpectedly that has a sales organisation value because I'm using it to call VF02".
    Due to SU24 not being updated for the custom transaction I'm guessing.
    A trace would probably assist when working with the functional team to decide what is really needed but I'm a little lost as to what is being asked of either the OP or the security/ABAP teams as this is pretty basic stuff...
    @Sanujit
    I have developed a program which calls VF02 transaction in background. But while executing it
    Have you had this program associated with a custom transaction yet?
    Regards
    David
    Edited by: David Berry on May 28, 2011 5:41 PM (got my sales orders mixed up)
    Edited by: David Berry on May 28, 2011 5:47 PM

  • Command not found error while executing shell programs in terminal

    I have written one sample shell program.
    while executing shell program in terminal,it shows COMMAND NOT FOUND error.
    How to slove this.

    Post the "Actual" error.  It says more than command not found.
    Post your script.
    Post the output from:
    echo $PATH
    Post the output from:
    which name_of_command_not_found

  • Error while executing FP_TEST_00 program

    Hi,
    I configured ADS, it was working fine,i'am able to take all the PDF documents from SAP.
    But now when i execute FP_TEST_00 program i got an error message that
    "ADS: SOAP Runtime Exception: CSoapExceptionFault : SOAP(100102)
        Message no. FPRUNX001"
    But when i run FP_PDF_TEST_00 program it is giving me the Version information.
    I'am unable to find a solution.Please guide me
    With Regards,
    Pradeep.

    checkout #944221 in particular:
    4.  Check the settings for the destination service
                  To use the destination service on AS Java, settings are required on AS ABAP and AS Java. Therefore, this test contains several steps.
                  4. 1 In your ABAP system (transaction SA38), call the FP_CHECK_DESTINATION_SERVICE program (available as of NW2004s SPS 08).
                           a) First of all, execute the program without selecting the option "With Destination Service".
                           The system processes a test form in the background and displays the size of the generated PDF. It does not use the destination service in the process.
                           b) Now select the option "With Destination Service" and execute the program again. The system processes the test form, using the destination service.
    If the system displays the same message (file size of generated PDF) as it does in a), the configuration of the destination service is correct.
                        -> Proceed to the next point (5).
    If the system issues an error message, the configuration of the destination service is incorrect.
                        -> Carry out tests 4.2 to 4.4.
                  4. 2 Check whether the /default_host/sap/bc/fp and /default_host/sap/bc/fpads ICF services are active. (transaction SICF). If this service is not active, activate it. Note: As of NW2004s Support Package Stack 12, when you bundle in distributed systems (in other words, for "non-double-stack installations"), it is optional to use the fpads ICF service
                  4.3 Check the settings for the ICF service.
                           a) Enter the following URL in your Web browser:
                        http://<server>:<port>/sap/bc/fp/form/layout/fp_test_00.xdp
                        < server> is the AS ABAP, <port> is the HTTP port of the AS ABAP. (you can determine this information using transaction SICF).
                           b) In the dialog box for the user, enter ADS_AGENT and the relevant password.
    If the ICF service settings are correct, the browser displays the layout information of the FP_TEST_00 form in XML format.
                        -> Proceed with point 4.4.
    If the browser displays an error message instead of the XML file, a configuration error occurred.
                        -> Check whether the user ADS_AGENT exists on the AS ABAP, and if the user has the required authorizations and roles (SAP_BC_FP_ICF).
                  4.4. Check the settings for the destination service on AS Java
                           a) Call Visual Administrator and navigate to Services -> Destinations
                           (detailed instructions are available on the Help Portal at: http://help.sap.com/saphelp_nw2004s/helpdata/en/37/504b8cbc2848a494facfdc09a359b1/frameset.htm ->Adobe Document Services Configuration Guide -> Configuring the Web Service -> Securing Access to the Web Service -> Creating or Changing the Destination Service)
                           b) Extend the setting in field URLunder Connection Settings to:
                           http://<server>:<port>/sap/bc/fp/form/layout/fp_test_00.xdp
                           (The <server> and <port> that are already available refer to the AS ABAP.)
                           c) Choose 'Save and Test'
                           d) The system calls the ABAP system that stores the form templates.
    If the settings are correct, the system issues the message: "HTTP GET response code 200 Content Type/xml."
                        -> Proceed with point 5.
    If the system issues an error message, the configuration of the destination service is incorrect.
                        -> Contact your system administrator and ask them to correct the settings for the destination service.
                           e) Do not forget to change the URL back to http://<server>:<port>.

Maybe you are looking for

  • Error in Sender AS2 adapter

    Hi Expert, I have configured sender AS2 adapter as per the sap guide.  and share our url and AS2 name.Now when the partner is trying to send the file from their side they are gettting the following error message and in SAP PO we have not received any

  • XI--- R/3 scenario: directly access and query a Y-table in R/3

    Hi forum, I need to make a XI--->R/3 scenario, i want to access and query a table in R/3 (a Y transparent table), i have been suggested to use a Sysnchronous call to BAPI/Function module, but i want to know whether there's a way i can access/query a

  • Best Practices Data Extract from Essbase

    Hi there, I have been looking for information on Best Practices to extract data from Essbase (E). Using MDX I initially wanted to bulk extract data from E but apparently the process was never ending. As a 2d choice, I went for a simulation of an inte

  • Using trusted certificates to avoid

    I have a certain presumption I wish to confirm. Presumption: When an SSL client attempts to make a connection to a remote host, once that connection is made, the client says (i.e, behaves as if he says), "I know what site I want to connect to. I have

  • Agent ok but host not available

    Hello All, I've reconfigured my agent by following article 413228.1, i.e. clearstate agent, and cleaning up the files before restarting. My agent is now up and running but i do not see the host on which the agent is running. I've tried everything and