Dynamic Java Code?

Is there a way to compose dynamic java code?
For example in PL/SQL I can compose valid statement dynamicly on runtime on base of string variables, execute it and get the result:
execute immediate ' SELET * FROM dual'Let's say, in Java I accept simple arithmetic statement from console 4+2. If I will pass it to System.out.print, then I get echo of this statement:
System.out.print(arg[0]);but result is different if I do following:
System.out.print(4+2);So I would like to see the way to compose the System.out.print(4+2) dynamicly within the code on base of string variables and execute it.
Any opinions?

For that, it is easy to use the scripting engine. Demo:
import javax.script.*;
public class ScriptTest {
    public static void main(String[] args) throws ScriptException {
            ScriptEngineManager man = new ScriptEngineManager();
            ScriptEngine engine = man.getEngineByExtension("groovy");
            if (engine == null) {
                System.out.println("no groovy engine");
            } else {
                System.out.println("engine found");
                String s = "x=[1, 4, 9, 16]; x.collect {it-1}";
                Object result = engine.eval(s);
                System.out.println("result : " + result);
}This assumes the groovy jar is on classpath.

Similar Messages

  • Using Textbox strings in Java code

    Hi,
    I wonder if anyone can help me with a problem I'm
    having with a JSP.
    I've got several text boxes on my JSP which are static and would like to access their contents from within some dynamic Java code contained within the same JSP. I.e If I have a text box whose name is my_text I
    would like to use my_text as a string within my Java code.
    Does anyone know how to do this?
    Thanks,
    Peter

    actually u can user java variable values in a html form/javacript but not vice versa.

  • How to dynamically configure JPA setting at runtime using java code?

    Hi,
    I am new to EJB 3.0 and JPA. I am trying to help my company to deploy the use of JPA in EJB3.0. Currently, i am trying out with OpenJPA in IBM Webshpere Application Server 7.0. We have four different WAS servers running for testing, system integration testing, user testing and production respectively, and in each region, the configurations for data source, JDBC username and password, schema, etc are different. So i think i would need to configure the JPA setting during runtime using Java code that determines which is the environment. And apparently i am stuck with the limited knowledge i have.
    1) I understand that i could override the JDBC in the persistence xml by creating entity manager using entity manager factory. But is it possible that i do similar thing by using inejction of persistence context on entity manager to obtain a container managed entity manager?
    2) Alternatively, it is possible to create multiple persistence unit in the XML and inject different PU to the entity manager, am i right? But how to inject dynamically since @PersistenceContext(unitName="xxx") only accepts constant declaration.
    3) Is it possible that the JDBC username and password are read from properties file?
    Thanks for your help in advance!

    Hi
    Thanks for the reply.
    Are you saying that i have to configure the data source authentication to the backend DB2 using the JAAS-J2C? Correct me if i am mistaken. I guess i am unable to do so as the application server setup only contains one data source, and the server hosted a number of applications. Every applications has their own JDBC username and password supply to the data source (the ID supplied at the DB2 side will decide which resource can access) and thus, i have to supply the username and password at runtime. Talked to the server guy and seems that it is not feasible to have seperate datasource for each applications as considered to the volume of applications hosted inside the server.
    Any suggestion?

  • Help:create tree node dynamically from java code...

    hi there...can anyone give me solution how to create or add tree node dynamically from java code???
    currently i am using tree node to handle my menu...i try to create tree and add treenode dynamically from .java page, but it failed...can anyone give solution how to create tree ui from java code, so i can create a dynamic menu...thanz before...

    Hi:
    Just put the statements you would normally put on a sqlplus command line in jdbc statements and execute them?
    http://www-db.stanford.edu/~ullman/fcdb/oracle/or-jdbc.html#0.1_executeUpdate
    MJG

  • Read SSH (Unix) dynamic file through Java code

    Hi,
    I am trying to create a java code which should read the dynamically changing content in the unix(SSH) system.
    Could you please tell me which is the best way to create the above requirement.
    Thanks in advance...

    corlettk wrote:
    but there are perl libraries... and (I was dumbfounded) a java-embedded-in-perl compiler. I feel a mashup delegate layer coming on.JCraft's JSch is, however, IMHO, a very good, flexible, and reliable implementation of SSH2 protocol (OpenSSH key formats). It allows your program to become an SSH client.
    Edit: And to tell you the truth, the Perl Net::SSH module is simply a wrapper around OpenSSH's libraries, and the Net::SSH::Perl Module (which is complete Perl although many of the Encryption modules need to be compiled, at least on Unix) are much more complicated to get installed, if not necessarily used, than JSch is.
    Edit Again: Although knowing the OP's history, I very much doubt his ability to implement either solution. ;-)

  • How can i add more statements in java code dynamically...

    I have a (business works) BW process in TIBCO which has many activities including �java code�. In java code activity I have some if statements like
    if (Country.equals("USA�))
    Country code = 1
    else if(Country.equals("GERMANY�))
    Country code = 49
    the above information is coming from database. now my project is deployed and running. In future, if they add more countries in database how I can include them dynamically without changing my BW process java code activity and redeploying again. Is there any solution?
    Please advice.

    You won't reconfigure the Java application without redeploying. This is one of the reasons that including data in the code is bad.
    If you created a file which contained data like this:
    Canada <tab> 1
    USA <tab> 12
    Germany <tab> 6
    Then your program could read the file into a map. The map could be used to lookup the country code based on the name.
    In the future, you could change the file to:
    Canada <tab> 1
    USA <tab> 12
    Germany <tab> 6
    France <tab> 17
    China <tab> 2
    And the program wouldn't need to be changed. You would just need to send out the new country file.

  • EXCEPTION_ACCESS_VIOLATION (0xc0000005) on compiled Java code

    I'm confronted with the following error of this code.
    http://db-www.naist.jp/~makoto-y/tmp/Int2LongHash.java
    The exception appears only when the system gets high-load.
    Is there work-arounds?
    I've tried also with jdk1.5.0_06, but the same error occurred.
    Converting the inner class to a top-level class has no effects.
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00a2cd75, pid=1540, tid=2968
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-b86 mixed mode)
    # Problematic frame:
    # J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x003f6800): JavaThread "main" [_thread_in_Java, id=2968]
    siginfo: ExceptionCode=0xc0000005, writing address 0xfc2cee54
    Registers:
    EAX=0x42d43500, EBX=0x03d3ee00, ECX=0x03d3ee00, EDX=0x07911838
    ESP=0x0091f760, EBP=0x0091f778, ESI=0x0790f9f8, EDI=0xfc2cee38
    EIP=0x00a2cd75, EFLAGS=0x00010203
    Top of Stack: (sp=0x0091f760)
    0x0091f760: 0790ac30 079220b0 00000200 03d917f8
    0x0091f770: 00000000 6d955aa7 0091f7a8 00a2c9dc
    0x0091f780: 00000200 00000000 0091f7e8 00a12d50
    0x0091f790: 5ab674cf 00000000 07911838 03d3ee00
    0x0091f7a0: 03d8b700 00000010 0091f7f8 00a2c000
    0x0091f7b0: 03d8b700 078e4af4 00000010 00a2ab04
    0x0091f7c0: 078e4af4 03d8b700 00000010 00000001
    0x0091f7d0: 00000000 6d955ae7 5ab674d0 00000000
    Instructions: (pc=0x00a2cd75)
    0x00a2cd65: 20 8b fe c1 ef 09 c6 87 80 b1 5b 48 00 8b 79 20
    0x00a2cd75: 89 77 1c c1 ef 09 c6 87 80 b1 5b 48 00 8b e5 5d
    Stack: [0x008d0000,0x00920000), sp=0x0091f760, free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.remove(I)J
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap.addEntry(IIJLorg/metabrick/xbird/util/collections/Int2LongHash$BucketEntry;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.put(IJ)J
    J org.metabrick.xbird.xquery.util.StringChunk.storeCharChunk([CII)J
    J org.metabrick.xbird.xquery.util.StringChunk.store([CII)J
    J org.metabrick.xbird.xquery.dm.dtm.BigDocumentTable.setTextAt(J[CII)J
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.createTextNode()V
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    J org.apache.xerces.parsers.AbstractSAXParser.endElement(Lorg/apache/xerces/xni/QName;Lorg/apache/xerces/xni/Augmentations;)V
    J org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement()I
    J org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z
    j org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z+24
    j org.apache.xerces.parsers.XML11Configuration.parse(Z)Z+132
    j org.apache.xerces.parsers.XML11Configuration.parse(Lorg/apache/xerces/xni/parser/XMLInputSource;)V+29
    j org.apache.xerces.parsers.XMLParser.parse(Lorg/apache/xerces/xni/parser/XMLInputSource;)V+9
    j org.apache.xerces.parsers.AbstractSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.metabrick.xbird.xquery.dm.instance.DocumentTableModel.loadDocument(Ljava/io/InputStream;)V+35
    j org.metabrick.xbird.client.tools.command.ImportDocument.process([Ljava/lang/String;)Z+99
    j org.metabrick.xbird.client.tools.CommandInvoker.executeCommand([Ljava/lang/String;)Z+8
    j org.metabrick.xbird.client.tools.CommandInvoker.run([Ljava/lang/String;)V+66
    j org.metabrick.xbird.client.tools.CommandInvoker.main([Ljava/lang/String;)V+19
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x48aa5000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3636]
    0x48aa0800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4076]
    0x48a9e400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3144]
    0x48aac400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2248]
    0x48a86c00 JavaThread "Finalizer" daemon [_thread_blocked, id=2664]
    0x48a82800 JavaThread "Reference Handler" daemon [_thread_blocked, id=2700]
    =>0x003f6800 JavaThread "main" [_thread_in_Java, id=2968]
    Other Threads:
    0x48a7f400 VMThread [id=4028]
    0x48aa6800 WatcherThread [id=3704]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 72576K, used 28616K [0x029d0000, 0x07890000, 0x07890000)
    eden space 64512K, 32% used [0x029d0000, 0x03e6fdd0, 0x068d0000)
    from space 8064K, 92% used [0x068d0000, 0x07022230, 0x070b0000)
    to space 8064K, 0% used [0x070b0000, 0x070b0000, 0x07890000)
    tenured generation total 967936K, used 253073K [0x07890000, 0x429d0000, 0x429d0000)
    the space 967936K, 26% used [0x07890000, 0x16fb4788, 0x16fb4800, 0x429d0000)
    compacting perm gen total 12288K, used 5879K [0x429d0000, 0x435d0000, 0x469d0000)
    the space 12288K, 47% used [0x429d0000, 0x42f8dd08, 0x42f8de00, 0x435d0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files\Java\jdk1.6.0\bin\javaw.exe
    0x7c940000 - 0x7c9dd000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c931000      C:\WINDOWS\system32\kernel32.dll
    0x77d80000 - 0x77e29000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e30000 - 0x77ec1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77cf0000 - 0x77d7f000      C:\WINDOWS\system32\USER32.dll
    0x77ed0000 - 0x77f17000      C:\WINDOWS\system32\GDI32.dll
    0x762e0000 - 0x762fd000      C:\WINDOWS\system32\IMM32.DLL
    0x60740000 - 0x60749000      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\jre\bin\msvcr71.dll
    0x6d7f0000 - 0x6da2f000      C:\Program Files\Java\jdk1.6.0\jre\bin\client\jvm.dll
    0x76af0000 - 0x76b1b000      C:\WINDOWS\system32\WINMM.dll
    0x6d310000 - 0x6d318000      C:\Program Files\Java\jdk1.6.0\jre\bin\hpi.dll
    0x76ba0000 - 0x76bab000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d7a0000 - 0x6d7ac000      C:\Program Files\Java\jdk1.6.0\jre\bin\verify.dll
    0x6d3a0000 - 0x6d3bf000      C:\Program Files\Java\jdk1.6.0\jre\bin\java.dll
    0x6d7e0000 - 0x6d7ef000      C:\Program Files\Java\jdk1.6.0\jre\bin\zip.dll
    0x6d560000 - 0x6d573000      C:\Program Files\Java\jdk1.6.0\jre\bin\net.dll
    0x719e0000 - 0x719f7000      C:\WINDOWS\system32\WS2_32.dll
    0x719d0000 - 0x719d8000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d580000 - 0x6d589000      C:\Program Files\Java\jdk1.6.0\jre\bin\nio.dll
    VM Arguments:
    jvm_args: -Xmx1024m -Xms1024m
    java_command: org.metabrick.xbird.client.tools.CommandInvoker -col /xmark import document C:\Software\xmark\xmark100.xml
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0
    PATH=C:\Program Files\Java\jdk1.6.0\bin;D:\Software\maven-1.0.2\bin;D:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Software\apache-ant-1.6.5\bin;C:\ghc\ghc-6.4.2\bin;C:\Program Files\QuickTime\QTSystem\
    USERNAME=yui
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 4, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 2096404k(108924k free), swap 3511144k(1471688k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0-beta2-b86) for windows-x86, built on Jun 2 2006 00:36:31 by "java_re" with unknown MS VC++:1310

    The following is the error that I got with using JDK 1.5.
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00b8c9f8, pid=4024, tid=1608
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode)
    # Problematic frame:
    # J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    --------------- T H R E A D ---------------
    Current thread (0x00036190): JavaThread "main" [_thread_in_Java, id=1608]
    siginfo: ExceptionCode=0xc0000005, writing address 0xfa424094
    Registers:
    EAX=0x00040e40, EBX=0xfa424078, ECX=0x05bd3fc0, EDX=0x05bd3fc0
    ESP=0x0007f578, EBP=0x0007f590, ESI=0xfa424078, EDI=0x081c8168
    EIP=0x00b8c9f8, EFLAGS=0x00010203
    Top of Stack: (sp=0x0007f578)
    0x0007f578: 081c1fa8 6d7d1061 022dd1c8 00000000
    0x0007f588: 00000200 00000200 0007f5c8 00b8c598
    0x0007f598: 0899f428 05bd3fc0 00000200 00000000
    0x0007f5a8: 0007f5c8 00b41018 00000200 000001cb
    0x0007f5b8: 05c50338 05c19448 05bd3fc0 000001a8
    0x0007f5c8: 0007f648 00b8b880 07dd565c 0899f428
    0x0007f5d8: 022dd1cb 00000000 08976190 00b8054c
    0x0007f5e8: 00001000 0000af89 00001000 6d7d1061
    Instructions: (pc=0x00b8c9f8)
    0x00b8c9e8: 89 5f 20 c1 e8 09 c6 80 00 a9 6c 48 00 8b 72 20
    0x00b8c9f8: 89 7e 1c c1 ee 09 c6 86 00 a9 6c 48 00 8b e5 5d
    Stack: [0x00040000,0x00080000), sp=0x0007f578, free space=253k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap$ChainedEntry.recordRemoval(Lorg/metabrick/xbird/util/collections/Int2LongHash;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.remove(I)J
    J org.metabrick.xbird.util.collections.Int2LongHash$Int2LongLRUMap.addEntry(IIJLorg/metabrick/xbird/util/collections/Int2LongHash$BucketEntry;)V
    J org.metabrick.xbird.util.collections.Int2LongHash.put(IJ)J
    J org.metabrick.xbird.xquery.util.StringChunk.storeCharChunk([CII)J
    J org.metabrick.xbird.xquery.util.StringChunk.store([CII)J
    J org.metabrick.xbird.xquery.dm.dtm.BigDocumentTable.setTextAt(J[CII)J
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.createTextNode()V
    J org.metabrick.xbird.xquery.dm.dtm.DocumentTableBuilder.endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    J com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Lcom/sun/org/apache/xerces/internal/xni/QName;Lcom/sun/org/apache/xerces/internal/xni/Augmentations;)V
    J com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement()I
    J com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Z)Z
    v ~OSRAdapter
    j com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Z)Z+24
    j com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Z)Z+118
    j com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Lcom/sun/org/apache/xerces/internal/xni/parser/XMLInputSource;)V+29
    j com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Lcom/sun/org/apache/xerces/internal/xni/parser/XMLInputSource;)V+9
    j com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Lorg/xml/sax/InputSource;)V+43
    j org.metabrick.xbird.xquery.dm.instance.DocumentTableModel.loadDocument(Ljava/io/InputStream;)V+35
    j org.metabrick.xbird.client.tools.command.ImportDocument.process([Ljava/lang/String;)Z+102
    j org.metabrick.xbird.client.tools.CommandInvoker.executeCommand([Ljava/lang/String;)Z+8
    j org.metabrick.xbird.client.tools.CommandInvoker.run([Ljava/lang/String;)V+66
    j org.metabrick.xbird.client.tools.CommandInvoker.main([Ljava/lang/String;)V+19
    v ~StubRoutines::call_stub
    V [jvm.dll+0x845a9]
    V [jvm.dll+0xd9317]
    V [jvm.dll+0x8447a]
    V [jvm.dll+0x8b44a]
    C [java.exe+0x14c5]
    C [java.exe+0x64dd]
    C [kernel32.dll+0x16fd7]
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00aa7490 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1780]
    0x00aa60f0 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3456]
    0x00aa53f8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2544]
    0x00a96c80 JavaThread "Finalizer" daemon [_thread_blocked, id=856]
    0x00a957e8 JavaThread "Reference Handler" daemon [_thread_blocked, id=816]
    =>0x00036190 JavaThread "main" [_thread_in_Java, id=1608]
    Other Threads:
    0x0003fbd0 VMThread [id=3592]
    0x00ab0e20 WatcherThread [id=3108]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 72576K, used 59965K [0x02ae0000, 0x079a0000, 0x079a0000)
    eden space 64512K, 80% used [0x02ae0000, 0x05d8f7b0, 0x069e0000)
    from space 8064K, 99% used [0x069e0000, 0x071bfff8, 0x071c0000)
    to space 8064K, 0% used [0x071c0000, 0x071c0000, 0x079a0000)
    tenured generation total 967936K, used 451270K [0x079a0000, 0x42ae0000, 0x42ae0000)
    the space 967936K, 46% used [0x079a0000, 0x23251ab0, 0x23251c00, 0x42ae0000)
    compacting perm gen total 8192K, used 5367K [0x42ae0000, 0x432e0000, 0x46ae0000)
    the space 8192K, 65% used [0x42ae0000, 0x4301dfb0, 0x4301e000, 0x432e0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040c000      C:\Program Files\Java\jdk1.5.0_06\bin\java.exe
    0x7c940000 - 0x7c9dd000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c931000      C:\WINDOWS\system32\kernel32.dll
    0x77d80000 - 0x77e29000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e30000 - 0x77ec1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77bc0000 - 0x77c18000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d6e0000 - 0x6d874000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\client\jvm.dll
    0x77cf0000 - 0x77d7f000      C:\WINDOWS\system32\USER32.dll
    0x77ed0000 - 0x77f17000      C:\WINDOWS\system32\GDI32.dll
    0x76af0000 - 0x76b1b000      C:\WINDOWS\system32\WINMM.dll
    0x762e0000 - 0x762fd000      C:\WINDOWS\system32\IMM32.DLL
    0x60740000 - 0x60749000      C:\WINDOWS\system32\LPK.DLL
    0x73f80000 - 0x73feb000      C:\WINDOWS\system32\USP10.dll
    0x6d2f0000 - 0x6d2f8000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\hpi.dll
    0x76ba0000 - 0x76bab000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d6b0000 - 0x6d6bc000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\verify.dll
    0x6d370000 - 0x6d38d000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\java.dll
    0x6d6d0000 - 0x6d6df000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\zip.dll
    0x6d530000 - 0x6d543000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\net.dll
    0x719e0000 - 0x719f7000      C:\WINDOWS\system32\WS2_32.dll
    0x719d0000 - 0x719d8000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d550000 - 0x6d559000      C:\Program Files\Java\jdk1.5.0_06\jre\bin\nio.dll
    VM Arguments:
    jvm_args: -Xmx1024m -Xms1024m -ea
    java_command: org.metabrick.xbird.client.tools.CommandInvoker -col /xmark import document C:\Software\xmark\xmark100.xml
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0
    PATH=C:\Program Files\Java\jdk1.6.0\bin;D:\Software\maven-1.0.2\bin;D:\cygwin\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Software\apache-ant-1.6.5\bin;C:\ghc\ghc-6.4.2\bin;C:\Program Files\QuickTime\QTSystem\
    USERNAME=yui
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 4, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 2096404k(370660k free), swap 3511144k(1545452k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0

  • Java Code in a text file

    Hi,
    I need an information if whether anything like this can be done in java or not !!
    The requirement is to place the jave code statements into a text file and dynamically execute these statements which have been placed in the file. for eg: if a text file "test.txt" contains a statement
    System.out.println("Hello world"); without the class being defined or the main method being defined. I need to execute this statement and print out hello world on the console.
    is this possible ???
    I would be using JDK 1.2 or 1.3 for this but certainly not 1.4.x and above
    please do let me know if this problem can be tackled in anyway !!
    Thanks in advance !

    I'd suggest first checking to see if the code in question would also be valid code in an interpreted language like Javascript, Groovy, or BeanShell.
    If it is, then use an interpreter for the appropriate language, an interpreter written in Java and which you can plug into the Java program you're using.
    Otherwise, I suppose you could wrap a class and method around the code, and compile and run that.

  • Regarding use of java code inside javascript

    Hi ,
    I have doubt regarding how to use java code inside javascript,
    i am giving my application code here
    <%@page import="java.util.*"%>
    <%@ page import="com.suuny.sard.pmt.pat.*"%>
    <SCRIPT LANGUAGE="JavaScript">
    function fun(){
         var ac=document.login.Projectname.options[document.login.Projectname.selectedIndex].value;
         var c = document.login.task1.value;
         alert(ac);
         alert(c);
         return true;
    </SCRIPT>
    <form name="login" action="/pmt/jsp/Leavemanagement/Leave_Ems_HomePage.jsp" method="get" encType="x-www-form-encoded" >
    <table width="100%" Align="Center" cellspacing="0" cellpadding="0" border="0">
    <tr class="tablerow"><td colspan="6" align="center"><font class="pagehead" align="center">Create Tasks</font></td></tr>
         <tr class="tableheader">
              <th>Project
              <th>Task-Id
              <th>TaskName
              <th>Assigned To
              <th>description
              <th>Milestone
         </tr>
         <%
              for(int i=1;i<2;i++){%>
                   <tr class="tablerow"><td align="center">
                   <select class="SELECT" NAME="Projectname" VALUE=" " onchange="return fun();" >
                   <!--<option value=""> </option>-->
                   <%
                        ArrayList ar =null;
                        ArrayList projectids=null;
                        Hashtable ht = new Hashtable();
                        ProjectNames pnames=new ProjectNames();
                   ht = pnames.getProjectNames();
                        ar=(ArrayList)ht.get("projects");
                        projectids=(ArrayList)ht.get("projectIds");
                        for(int j=0;j<ar.size();j++){
                        out.println("<option value=\""+projectids.get(j)+"\">"+ar.get(j)+"</option>");
                   %>
    </select>
         <%
                   out.println("<td align=\"center\"><input type=\"text\" name=\"task"+i+"\"value=\"\" size=\"25\"></td>");
                   out.println("<td align=\"center\"><input type=\"text\" name=\"taskname"+i+"\"value=\"\" size=\"25\"></td>");
              %>
              <td align="center">
                             <select class="SELECT" NAME="Projectname1" VALUE=" ">
                             <!--<option value=""> </option>-->
                             <%
                                  ArrayList ar1 =null;
                             ar1 = pnames.getProjectResource("VXML02");
                                  for(int j=0;j<ar1.size();j++){
                                  out.println("<option value=\""+ar1.get(j)+"\">"+ar1.get(j)+"</option>");
                             %>
    </select>
              <%
                   out.println("<td align=\"center\"><input type=\"text\" name=\"description"+i+"\"value=\"\" size=\"25\"></td>");
                   out.println("<td align=\"center\"><input type=\"text\" name=\"milestone"+i+"\"value=\"\" size=\"25\"></td><tr>");
              out.println("<tr class=\"tablerow\"><td colspan=\"6\" align=\"center\"><input class=\"txtbuttonsmall\" type=\"submit\" value=\"save\"></td>");
         %>
    </Table>
    </form>
    My question is :
    I selected one project from first combo box ,i need project members corresponding to the project.
    In my code "pnames.getProjectResource("VXML02");" in this function iam passing one static projrct value,but i need dynamically selected project from first combo box(<select class="SELECT" NAME="Projectname" VALUE=" " onchange="return fun();" >),so please help me guys.

    Hi Marco,
    I "executed" some java code within XSLs file. I have quoted the word executed because I didn't really run java code, but I used a simply trick that I describe you below.
    Into your XSLs put an iframe which is hided (it has an height of 0 pixel). As src of the iframe put the address of a portal component which execute your code (in my case calculate some PCD URL of some pages into a defined role). As result of component execution, I use the response.write method in order to execute some jscript code, which is able to interact with the HTML generated by XSLs files, for example in my case response.write put the PCD URL into a drop down list placed into the "edit" form.
    This works fine. I don't know if is suitable also for your case, anyway could be a hint, but pay attention to Roland's recommendations.
    Ciao
    Roberto

  • JVM 1.4 seg faults with pure java code?

    Has anybody else seen JVM 1.4 seg fault when running pure java code? This seems like it shouldn't be possible, but I get the following at indeterminate times. Unfortunately, it is difficult to isolate since decreasing the size of the program avoids the problem. When the seg fault happens, the size in memory is ~1GB and there is plenty of real and virtual memory to spare.
    Unexpected Signal : 11 occurred at PC=0xDE88BC8E
    Function=[Unknown. Nearest: +0x100E]
    Library=/usr/j2se/jre/lib/i386/server/libjvm.so
    Dynamic libraries:
    0x8050000 java
    0xdfb60000 /usr/lib/libthread.so.1
    0xdfba0000 /usr/lib/libdl.so.1
    0xdfab0000 /usr/lib/libc.so.1
    0xde800000 /usr/j2se/jre/lib/i386/server/libjvm.so
    0xdfa40000 /usr/lib/libCrun.so.1
    0xdfa20000 /usr/lib/libsocket.so.1
    0xdf980000 /usr/lib/libnsl.so.1
    0xdf960000 /usr/lib/libm.so.1
    0xdfa70000 /usr/lib/libw.so.1
    0xdf920000 /usr/lib/libmp.so.2
    0xdf8f0000 /usr/j2se/jre/lib/i386/native_threads/libhpi
    .so
    0xdf8c0000 /usr/j2se/jre/lib/i386/libverify.so
    0xdf880000 /usr/j2se/jre/lib/i386/libjava.so
    0xdf860000 /usr/j2se/jre/lib/i386/libzip.so
    0xda890000 /usr/lib/nss_files.so.1
    Local Time = Tue May 14 16:03:38 2002
    Elapsed Time = 72
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002D3
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Server VM (1.4.0-rc-b91 mixed
    mode)
    # An error report file has been saved as hs_err_pid945.log.
    # Please refer to the file for further information.

    Hi sevenM,
    Did you figure out a workaround for this problem?. Did you get it solved with the SUN people?. Is it a known bug?.
    I've got exactly the same problem on the same function and VM library.
    Any info on this is very much welcome.
    Thx
    Krithiga
    I get the same error sometimes with tomcat-4.0.4 on a
    Slackware 8.0.0 and JDK 1.4.0. I don't user any JSPs,
    only servlets and the business calls a remote SLSB on
    a remote JBOSS server and afterwards select some data
    form a remote DB2 7.1 over JDBC.
    Here is the log:
    Unexpected Signal : 11 occurred at PC=0x40267D98
    Function=copy_to_survivor_space__16DefNewGenerationP7oo
    DescPP7oopDesc+0x28
    Library=/usr/local/j2sdk1.4.0/jre/lib/i386/client/libjv
    .so
    Current Java thread:
    at
    at java.net.PlainSocketImpl.socketAccept(Native
    tive Method)
    at
    at
    at
    t
    java.net.PlainSocketImpl.accept(PlainSocketImpl.java:34
    - locked <0x44ed3400> (a
    400> (a java.net.PlainSocketImpl)
    at
    at
    at
    t
    java.net.ServerSocket.implAccept(ServerSocket.java:438)
    at
    at
    at
    t java.net.ServerSocket.accept(ServerSocket.java:409)
    at
    at
    at
    t
    org.apache.catalina.core.StandardServer.await(StandardS
    rver.java:293)
    at
    at
    at
    t
    org.apache.catalina.startup.Catalina.start(Catalina.jav
    :794)
    at
    at
    at
    t
    org.apache.catalina.startup.Catalina.execute(Catalina.j
    va:681)
    at
    at
    at
    t
    org.apache.catalina.startup.Catalina.process(Catalina.j
    va:179)
    at
    at
    at
    t sun.reflect.NativeMethodAccessorImpl.invoke0(Native
    Method)
    at
    at
    at
    t
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMetho
    AccessorImpl.java:39)
    at
    at
    at
    t
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegat
    ngMethodAccessorImpl.java:25)
    at
    at
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    at
    at
    t
    org.apache.catalina.startup.Bootstrap.main(Bootstrap.ja
    a:243)
    Dynamic libraries:
    08048000-0804d000 r-xp 00000000 03:03 757599
    /usr/local/j2sdk1.4.0/bin/java
    0804d000-0804e000 rw-p 00004000 03:03 757599
    /usr/local/j2sdk1.4.0/bin/java
    40000000-40015000 r-xp 00000000 03:03 885142
    /lib/ld-2.2.3.so
    40015000-40016000 rw-p 00014000 03:03 885142
    /lib/ld-2.2.3.so
    40017000-40020000 r-xp 00000000 03:03 69536
    /usr/local/j2sdk1.4.0/jre/lib/i386/native_threads/libh
    i.so
    40020000-40021000 rw-p 00008000 03:03 69536
    /usr/local/j2sdk1.4.0/jre/lib/i386/native_threads/libh
    i.so
    40021000-40022000 r--p 00000000 03:03 33106
    /usr/lib/locale/en_US/LC_IDENTIFICATION
    40022000-40030000 r-xp 00000000 03:03 885133
    /lib/libpthread-0.9.so
    40030000-40038000 rw-p 0000d000 03:03 885133
    /lib/libpthread-0.9.so
    40038000-4003b000 r-xp 00000000 03:03 885149
    /lib/libdl-2.2.3.so
    4003b000-4003c000 rw-p 00002000 03:03 885149
    /lib/libdl-2.2.3.so
    4003c000-40143000 r-xp 00000000 03:03 885147
    /lib/libc-2.2.3.so
    40143000-40149000 rw-p 00106000 03:03 885147
    /lib/libc-2.2.3.so
    4014d000-40410000 r-xp 00000000 03:03 1150891
    /usr/local/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
    40410000-40558000 rw-p 002c2000 03:03 1150891
    /usr/local/j2sdk1.4.0/jre/lib/i386/client/libjvm.so
    4056c000-4057d000 r-xp 00000000 03:03 885152
    /lib/libnsl-2.2.3.so
    4057d000-4057f000 rw-p 00010000 03:03 885152
    /lib/libnsl-2.2.3.so
    40581000-405b5000 r-xp 00000000 03:03 950285
    /usr/i386-slackware-linux/lib/libstdc++-2-libc6.1-1-2.
    .0.so
    405b5000-405c1000 rw-p 00033000 03:03 950285
    /usr/i386-slackware-linux/lib/libstdc++-2-libc6.1-1-2.
    .0.so
    405c3000-405e4000 r-xp 00000000 03:03 885138
    /lib/libm-2.2.3.so
    405e4000-405e5000 rw-p 00020000 03:03 885138
    /lib/libm-2.2.3.so
    405e5000-405f6000 r-xp 00000000 03:03 69542
    /usr/local/j2sdk1.4.0/jre/lib/i386/libverify.so
    405f6000-405f8000 rw-p 00010000 03:03 69542
    /usr/local/j2sdk1.4.0/jre/lib/i386/libverify.so
    405f8000-40619000 r-xp 00000000 03:03 69543
    /usr/local/j2sdk1.4.0/jre/lib/i386/libjava.so
    40619000-4061b000 rw-p 00020000 03:03 69543
    /usr/local/j2sdk1.4.0/jre/lib/i386/libjava.so
    4061c000-40630000 r-xp 00000000 03:03 69545
    /usr/local/j2sdk1.4.0/jre/lib/i386/libzip.so
    40630000-40633000 rw-p 00013000 03:03 69545
    /usr/local/j2sdk1.4.0/jre/lib/i386/libzip.so
    40633000-4063a000 r--s 00000000 03:03 890455
    /usr/local/jakarta-tomcat-4.0.4/bin/bootstrap.jar
    4063a000-40641000 r--s 00000000 03:03 890436
    /usr/local/jakarta-tomcat-4.0.4/common/lib/naming-comm
    n.jar
    40641000-40655000 r--s 00000000 03:03 890437
    /usr/local/jakarta-tomcat-4.0.4/common/lib/servlet.jar
    40655000-4065e000 r--s 00000000 03:03 890438
    /usr/local/jakarta-tomcat-4.0.4/common/lib/naming-reso
    rces.jar
    4065e000-40660000 r--s 00000000 03:03 890439
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jdbc2_0-std
    xt.jar
    40660000-4066c000 r--s 00000000 03:03 890440
    /usr/local/jakarta-tomcat-4.0.4/common/lib/activation.
    ar
    4066c000-4066f000 r--s 00000000 03:03 890441
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jta-spec1_0
    1.jar
    4066f000-4082a000 r--s 00000000 03:03 890443
    /usr/local/jakarta-tomcat-4.0.4/common/lib/xerces.jar
    4082a000-40874000 r--s 00000000 03:03 890444
    /usr/local/jakarta-tomcat-4.0.4/common/lib/tyrex-0.9.7
    0.jar
    40874000-408b9000 r--s 00000000 03:03 890445
    /usr/local/jakarta-tomcat-4.0.4/common/lib/mail.jar
    408b9000-408d2000 r--s 00000000 03:03 890446
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jndi.jar
    408d2000-40958000 r--s 00000000 03:03 890482
    /usr/local/jakarta-tomcat-4.0.4/common/lib/db2java.jar
    40958000-4096e000 r--s 00000000 03:03 890483
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jboss-clien
    .jar
    4096e000-4097c000 r--s 00000000 03:03 890484
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jboss-j2ee.
    ar
    4097c000-40996000 r--s 00000000 03:03 890485
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jaas.jar
    40996000-409a0000 r--s 00000000 03:03 890486
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jbosssx-cli
    nt.jar
    409a0000-409a6000 r--s 00000000 03:03 890487
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jnp-client.
    ar
    409a6000-40d10000 r--s 00000000 03:03 890488
    /usr/local/jakarta-tomcat-4.0.4/common/lib/jt400_3.0.j
    r
    40d10000-40d37000 r--s 00000000 03:03 890489
    /usr/local/jakarta-tomcat-4.0.4/common/lib/log4j.jar
    40d37000-423af000 r--s 00000000 03:03 69634
    /usr/local/j2sdk1.4.0/jre/lib/rt.jar
    423f1000-42408000 r--s 00000000 03:03 69566
    /usr/local/j2sdk1.4.0/jre/lib/sunrsasign.jar
    42408000-42476000 r--s 00000000 03:03 69568
    /usr/local/j2sdk1.4.0/jre/lib/jsse.jar
    42476000-42489000 r--s 00000000 03:03 69567
    /usr/local/j2sdk1.4.0/jre/lib/jce.jar
    42489000-4270a000 r--s 00000000 03:03 69632
    /usr/local/j2sdk1.4.0/jre/lib/charsets.jar
    447b2000-447b3000 r--p 00000000 03:03 33104
    /usr/lib/locale/en_US/LC_MEASUREMENT
    447b3000-447b4000 r--p 00000000 03:03 33102
    /usr/lib/locale/en_US/LC_TELEPHONE
    447b4000-447b5000 r--p 00000000 03:03 33103
    /usr/lib/locale/en_US/LC_ADDRESS
    447b5000-447b6000 r--p 00000000 03:03 33100
    /usr/lib/locale/en_US/LC_NAME
    447b6000-447b7000 r--p 00000000 03:03 33109
    /usr/lib/locale/en_US/LC_PAPER
    447b7000-447b8000 r--p 00000000 03:03 459106
    /usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
    447b8000-447b9000 r--p 00000000 03:03 33110
    /usr/lib/locale/en_US/LC_MONETARY
    447b9000-447bf000 r--p 00000000 03:03 33107
    /usr/lib/locale/en_US/LC_COLLATE
    447bf000-447c0000 r--p 00000000 03:03 33101
    /usr/lib/locale/en_US/LC_TIME
    4c840000-4c841000 r--p 00000000 03:03 33105
    /usr/lib/locale/en_US/LC_NUMERIC
    4c841000-4c85c000 r--p 00000000 03:03 33108
    /usr/lib/locale/en_US/LC_CTYPE
    4c85c000-4c85e000 r--s 00000000 03:03 36766
    /usr/local/j2sdk1.4.0/jre/lib/ext/dnsns.jar
    4c85e000-4c866000 r--s 00000000 03:03 890421
    /usr/local/jakarta-tomcat-4.0.4/server/lib/jakarta-reg
    xp-1.2.jar
    4c866000-4c867000 r--s 00000000 03:03 890422
    /usr/local/jakarta-tomcat-4.0.4/server/lib/servlets-co
    mon.jar
    4c867000-4c871000 r-xp 00000000 03:03 885148
    /lib/libnss_compat-2.2.3.so
    4c871000-4c873000 rw-p 00009000 03:03 885148
    /lib/libnss_compat-2.2.3.so
    4c89e000-4c8bb000 r--s 00000000 03:03 36765
    /usr/local/j2sdk1.4.0/jre/lib/ext/sunjce_provider.jar
    4c8bb000-4c95e000 r--s 00000000 03:03 36767
    /usr/local/j2sdk1.4.0/jre/lib/ext/localedata.jar
    4c95e000-4c96c000 r--s 00000000 03:03 36768
    /usr/local/j2sdk1.4.0/jre/lib/ext/ldapsec.jar
    4c96c000-4ce06000 r--s 00000000 03:03 298906
    /usr/local/j2sdk1.4.0/lib/tools.jar
    4ce06000-4ce0c000 r--s 00000000 03:03 890423
    /usr/local/jakarta-tomcat-4.0.4/server/lib/commons-log
    ing.jar
    4ce0c000-4ce0e000 r--s 00000000 03:03 890424
    /usr/local/jakarta-tomcat-4.0.4/server/lib/servlets-in
    oker.jar
    4ce0e000-4ce11000 r--s 00000000 03:03 890425
    /usr/local/jakarta-tomcat-4.0.4/server/lib/servlets-ma
    ager.jar
    4ce11000-4ce19000 r--s 00000000 03:03 890426
    /usr/local/jakarta-tomcat-4.0.4/server/lib/warp.jar
    4ce19000-4ceab000 r--s 00000000 03:03 890427
    /usr/local/jakarta-tomcat-4.0.4/server/lib/catalina.ja
    4ceab000-4ceb4000 r--s 00000000 03:03 890428
    /usr/local/jakarta-tomcat-4.0.4/server/lib/tomcat-http
    1.jar
    4ceb4000-4ceb9000 r--s 00000000 03:03 890429
    /usr/local/jakarta-tomcat-4.0.4/server/lib/servlets-de
    ault.jar
    4ceb9000-4cec9000 r--s 00000000 03:03 890430
    /usr/local/jakarta-tomcat-4.0.4/server/lib/tomcat-ajp.
    ar
    4cec9000-4ceed000 r--s 00000000 03:03 890431
    /usr/local/jakarta-tomcat-4.0.4/server/lib/tomcat-util
    jar
    4ceed000-4cefb000 r--s 00000000 03:03 890432
    /usr/local/jakarta-tomcat-4.0.4/server/lib/tomcat-coyo
    e.jar
    4cefb000-4cf01000 r--s 00000000 03:03 890434
    /usr/local/jakarta-tomcat-4.0.4/server/lib/servlets-we
    dav.jar
    4cf01000-4cf13000 r-xp 00000000 03:03 69548
    /usr/local/j2sdk1.4.0/jre/lib/i386/libnet.so
    4cf13000-4cf14000 rw-p 00011000 03:03 69548
    /usr/local/j2sdk1.4.0/jre/lib/i386/libnet.so
    4cf14000-4cf25000 r--s 00000000 03:03 890458
    /usr/local/jakarta-tomcat-4.0.4/lib/jasper-runtime.jar
    4cf25000-4cf59000 r--s 00000000 03:03 890459
    /usr/local/jakarta-tomcat-4.0.4/lib/jasper-compiler.ja
    4cf59000-4cf5e000 r--s 00000000 03:03 890460
    /usr/local/jakarta-tomcat-4.0.4/lib/naming-factory.jar
    4cf5e000-4cf5f000 r--s 00000000 03:03 789670
    /usr/local/jakarta-tomcat-4.0.4/temp/jar_cache46958.tm
    (deleted)
    4cf5f000-4cf60000 r--s 00000000 03:03 789673
    /usr/local/jakarta-tomcat-4.0.4/temp/jar_cache46959.tm
    (deleted)
    4cf60000-4cf63000 r--s 00000000 03:03 430785
    /usr/local/jakarta-tomcat-4.0.4/webapps/reporter/WEB-I
    F/lib/arenajobs.jar
    4cf63000-4d067000 r--s 00000000 03:03 430786
    /usr/local/jakarta-tomcat-4.0.4/webapps/reporter/WEB-I
    F/lib/arenatrading.jar
    4d067000-4d08c000 r--s 00000000 03:03 430787
    /usr/local/jakarta-tomcat-4.0.4/webapps/reporter/WEB-I
    F/lib/quartz.jar
    4d08c000-4d08e000 r--s 00000000 03:03 430788
    /usr/local/jakarta-tomcat-4.0.4/webapps/reporter/WEB-I
    F/lib/scheduler.jar
    4d08e000-4d091000 r--s 00000000 03:03 790391
    /usr/local/jakarta-tomcat-4.0.4/temp/jar_cache46960.tm
    (deleted)
    4d091000-4d195000 r--s 00000000 03:03 790392
    /usr/local/jakarta-tomcat-4.0.4/temp/jar_cache46961.tm
    (deleted)
    4d195000-4d1ba000 r--s 00000000 03:03 790394
    /usr/local/jakarta-tomcat-4.0.4/temp/jar_cache46962.tm
    (deleted)
    4d1ba000-4d1bc000 r--s 00000000 03:03 790395
    /usr/local/jakarta-tomcat-4.0.4/temp/jar_cache46963.tm
    (deleted)
    4d1bc000-4d1bd000 r-xp 00000000 03:03 69559
    /usr/local/j2sdk1.4.0/jre/lib/i386/librmi.so
    4d1bd000-4d1be000 rw-p 00000000 03:03 69559
    /usr/local/j2sdk1.4.0/jre/lib/i386/librmi.so
    4d1be000-4d1c2000 r-xp 00000000 03:03 69558
    /usr/local/j2sdk1.4.0/jre/lib/i386/libioser12.so
    4d1c2000-4d1c3000 rw-p 00003000 03:03 69558
    /usr/local/j2sdk1.4.0/jre/lib/i386/libioser12.so
    4d1c9000-4d1d2000 r-xp 00000000 03:03 885155
    /lib/libnss_files-2.2.3.so
    4d1d2000-4d1d3000 rw-p 00008000 03:03 885155
    /lib/libnss_files-2.2.3.so
    Local Time = Tue Oct 8 18:57:29 2002
    Elapsed Time = 32640
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002D3
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed
    mode)
    # An error report file has been saved as
    hs_err_pid26505.log.
    # Please refer to the file for further information.

  • Proplem: Access HTMLB controls from java code

    Hi,
    I am new to iView development for EP6. So my problem should be easy to solve (for you ).
    I created in the NW Dev Studio a JSP DynPage.
    The following files were created or edited:
    1.     JSP file (created)
    2.     java file (created)
    3.     portalapp.xml (edited)
    In order to make the page running (proccessing) I changed the following things:
    1.     JSP file – Add taglib reference to HTMLB-class
    2.     portalapp.xml – Remove the „native“ property so the JSP file will not be accessed directly.
    Now I want to do the following:
    On the JSP page I placed severeal HTMLB controls (textViews).
    From the java code I try to access these controls in the „doProcessBeforeOutput“ method and change/set values.
    But I get all the time a null-Exception.
    Code (JSP)
    <%-- mcmsprovider.jsp --%>
    <%@ taglib uri= "tagLib" prefix="hbj" %>
    <hbj:content id="cntMcmsProvider" >
      <hbj:page title="MCMS Provider Dynpage">
       <hbj:form id="frmMcmsProvider" >
                 <hbj:textView id="tvwScript" encode="false"></hbj:textView>
                 <hbj:textView id="tvwStyle" encode="false"></hbj:textView>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    Code (JAVA):
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
           TextView tvw = (TextView) this.getComponentByName("tvwStyle");
           tvw.setText("Here the dynamic text");
    I also tried to add raw text to the form but also null excpetion:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
           Form frmCurrent = (Form) this.getForm();
           frmCurrent.addRawText("<h3>This comes from here</h3>");
    My goal is to dynamically add controls to the form, but until now I think it will be a dream:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
      Form form = (Form)this.getForm();
           TextView tvw  = new TextView("tvwDynamic");
           tvw.setText("Here the dynamic control");
           form.addComponent(tvw);
    The normal page processing runs:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
    Any help is greatly appreciated.

    Eike
    Here is the example straight from the PDK documentation. This should help you a little
    UsingAbstractPortalComponentWithHTMLB.java
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.DataType;
    import com.sapportals.htmlb.enum.GroupDesign;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.htmlb.rendering.PageContextFactory;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class UsingAbstractPortalComponentWithHTMLB extends AbstractPortalComponent {
        //Fill in your output for "normal" content creation mode here
        protected void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {
            IPageContext myContext = PageContextFactory.createPageContext(request, response);
            if (myContext == null) {
                System.out.println("htmlb service did not start up as expected.");
            Form myForm = myContext.createFormDocument("First Experiment");
            Event lastEvent = myContext.getCurrentEvent();
            Group myGroup = new Group();
            myGroup.setWidth("350");
            myGroup.setTitle("First Experiment");
            myGroup.setDesign(GroupDesign.SAPCOLOR);
            myForm.addComponent(myGroup);
            GridLayout gl = new GridLayout();
            myGroup.addComponent(gl);
            if ((lastEvent != null) && (lastEvent.getComponentName().equals("submit"))) {
                String name = myContext.getDataForComponentId("USER_NAME").toString();
                TextView label = new TextView("Hi, " + name);
                gl.addComponent(1, 1, label);
                Button myButton = new Button("goback", "Go back");
                myButton.setOnClick("goBack"); // ignored anyway
                gl.addComponent(2, 1, myButton);
            } else {
                TextView label = new TextView("What's your name?");
                gl.addComponent(1, 1, label);
                InputField inf = new InputField("USER_NAME");
                inf.setType(DataType.STRING);
                gl.addComponent(1, 2, inf);
                Button myButton = new Button("submit", "Tell");
                myButton.setOnClick("submit");
                gl.addComponent(2, 2, myButton);
            myContext.render();

  • ADF Faces: Making a selectOneChoice in java code?

    I need to make a selectOneChoice to reuse in my pages (country selection) but can't seem to find how to do it on the web?
    here is what i've attempted with the error output...
    -------------------- the java code:
    public void contextInitialized(ServletContextEvent event)
    ServletContext servletContext = event.getServletContext();
    Utils.log(servletContext, "Initializing Supply Chain Management System...");
    // intitilize selectOne component
    CoreSelectOneChoice countrySelectOne = new CoreSelectOneChoice();
    List countrySelectItems = new ArrayList();
    CountryCoordinator countryCoordinator = new CountryCoordinator();
    try
    List all = countryCoordinator.getAllCountries();
    Iterator i = all.iterator();
    for(;i.hasNext();)
    Object object = i.next();
    CoreSelectItem item = new CoreSelectItem();
    item.setValue((Country)object);
    item.setLabel(((Country)object).getCountry_name());
    countrySelectItems.add(item);
    // place the list of select items into the selectOne component
    countrySelectOne.setValue(countrySelectItems);
    servletContext.setAttribute("countrySelectOne", countrySelectOne);
    Utils.log(servletContext, "Initializing Countries [SUCCESS]");
    } catch(Exception e)
    Utils.log(servletContext, "Initializing Countries [FAILED]");
    Utils.log(servletContext, "Initialization complete...");
    ------------------------------ the JSP:
    <af:selectOneChoice label="#{bundle.ADDRESS_COUNTRY}:" required="#{region_entity_address.required_entity_address_country}" binding="#{applicationScope.countrySelectOne}"/>
    ------------------------------ the error:
    15:36:48,984 INFO [STDOUT] Sep 16, 2005 3:36:48 PM oracle.adfinternal.view.face
    s.renderkit.core.xhtml.SimpleSelectOneRenderer _getSelectedIndex
    WARNING: Could not find selected item matching value "CoreSelectItem[UINodeFaces
    Bean, id=null]" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=_id30]
    ....

    That's right. JSF produces such IDs. They are causing problems with JAAS login forms, so we should use plain JSPs for login, but for the rest of the tasks such IDs are okay.
    What I meant is that currenty the buttons are not rendered as
    <input type="button" ... />but as pictures embedded in hyperlinks (&lt;a>).
    It's possible, though not likely, that in some future version of ADF Faces some component will be rendered as an HTML element that doesn't support tab ordering (although I haven't really considered if there are such elements). Then the trick with manually setting the tabIndex of the parent HTML element won't work.
    Of course, I deeply appreciate the fact that you take the time to help us on this forum. In fact, I will go ahead and do just that -- I will dynamically set the tabIndex via JavaScript. I was simply wanting to make sure that I wasn't taking such a hack-like approach, if there was a better method.
    Thank you again.
    Best regards,
    Bisser

  • Add numberconverter to inputtext by java code

    my page is dynamically created by java code.
    how can i add a numberconverter to an inputtext by code?
    HtmlInputText intext = new HtmlInputText();
         NumberConverter ncnv =new NumberConverter();
                   ncnv.setCurrencyCode("€");
                   ncnv.setGroupingUsed(true);
                   ncnv.setMaxIntegerDigits(11);
                   ncnv.setType("currency");
    .

    Use setConverter().

  • Need JAVA code to create OIM ITresource-connection values are in a csv file

    Hi,
    Could any one plz help me with the java code used / tested before to create OIM IT resource dynamically, for the reference. IT resource parameter (connection) values in a .csv file, where in I've multiple environments.
    Thanks,
    Ramesh
    Edited by: user13267745 on Aug 19, 2010 12:37 AM

    Hi Gregg,
    You can create one transformation from the DataStore to itself.  In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse).  Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
    Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
    I hope this helps you.
    Regards,
    Maximiliano

  • Dynamic Java bean classes for XSD using JAVA (not any external batch or sh)

    Hi,
    How can we generate dynamic Java bean classes for XSD (dynamically support All XSD at runtime)?
    Note: - Through java code via only needs to generate this process. (Not using any xjc.bat or xjc.sh from JAXB).
    Thanks

    Muthu wrote:
    How can we generate dynamic Java bean classes for XSD (dynamically support All XSD at runtime)?
    Pretty sure you can't. Probably can do a lot of them with years of work.
    And can probably can do a resonable subset suitable for the business at hand with only a moderate effort.
    Note: - Through java code via only needs to generate this process. (Not using any xjc.bat or xjc.sh from JAXB).The Sun jdk, not jre, comes with the java compiler as part of it. You can create in memory class (I believe in memory) based on java code you create.
    I believe BCEL alllows the same thing (in memory) but you start with byte codes.
    You could just create a dynamic meta data solution as well, via maps and generic methods. Not as fast though.

Maybe you are looking for