Compile java

I am getting following error at first line of program, import.
Could anyone tell me what needs to do to import jar file? I have a jar file.
Error Description:
C:\Program Files\java\jdk1.2.2\bin>javac c:\temp\TSearch_NCC_CM.java
c:\temp\TSearch_NCC_CM.java:34: Package com.ibm.mm.beans not found in import.
import com.ibm.mm.beans.*;
^
1 error
Thanks,
Paresh

the jar must be listed in your classpath.

Similar Messages

  • 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

  • Error while running compiled java code

    Hi
    I have an evaluation license of the JDeveloper2.0 installed on my WindowsNT 4.0 workstation.
    I seem to have a problem running my compiled jave code. After compiling the source code(.java file) when I try to run the same I get a message saying
    "<FileName> not found in outpath classpath or sourcepath ".
    What does this mean and how can I rectify it?
    Regards
    Sree
    null

    Your classpath tells Java run time where to look for the class files it needs. In JDeveloper the class path is set in your project properties. Select Project->Properties and check that the source and output paths correspond to your myprojects and myclasses directories.

  • Error while compiling java file

    Hi, im newby in java,
    i was trying to compile java files, and after that i will use it in JSP as javabean.
    I have 2 files already, the first file is a connection code, and its compiled successfully, it looks like this
    i named this as ConnectionBean.java
    package my_package;
    import java.sql.*;
    public class ConnectionBean {
         private Connection con;
         private static final String driver = "org.postgresql.Driver";
         private static final String url = "jdbc:postgresql://localhost:5432/PSQLDS";
         private static final String username = "postgres";
         private static final String password = "mypassword";
         public ConnectionBean() {
         public Connection logOn() {
              try {
                   Class.forName(driver); con = DriverManager.getConnection(url, username, password); }
              catch(ClassNotFoundException e) {
                   System.err.println("ConnectionBean: driver unavailable..."); con = null; }
              catch (SQLException e) {
                   System.err.println("ConnectionBean: driver not loaded..."); con = null; }
              return con;
         public void logOff() {
              try {
                   con.close(); }
              catch (Exception e) {
                   e.printStackTrace(); }
    as you can see above im using "package", and yes i have manage to put all my java files within the correct path (ROOT\WEB-INF\classes\my_package)
    And also, i have test this class as javabean on JSP file and it works.
    There for i continue to create the second java file, as a purpose to create a back engine for JSP. I use the same package as ConnectionBean.java, it looks like this
    i named this as ListPageEngine.java
    package my_package;
    import java.beans.*;
    import java.sql.*;
    public class ListPageEngine {
         public static void main(String[] args) {
              ConnectionBean conBean = new ConnectionBean();}
    on compiling process using command "javac ListPageEngine.java", i get this error message
    ListPageEngine.java:11: cannot find symbol
    symbol : class ConnectionBean
    location: class my_package.ListPageEngine
    ConnectionBean conBean = new ConnectionBean();}
    ^
    ListPageEngine.java:11: cannot find symbol
    symbol : class ConnectionBean
    location: class my_package.ListPageEngine
    ConnectionBean conBean = new ConnectionBean();}
    ^
    2 errors
    I think, i am pretty much sure that all my configuration (wheater its Apache TomCat, Environment Variable or PostgreSQL server) was good, as a prove, i was able to use ConnectionBean.class in my JSP file.
    I susspect the problem is related with "package", seems i cannot use ConnectionBean class within ListPageEngine class when i use package.
    For another information, i didn't install such thing as J2EE, i only install JDK 1.5, i also guess this might be the cause.
    Right now im all stuck, i try to find thread which might be related with my problem but i failed to find it, most of them get the same answer by UncleSAM which are
    Try the following forum (about JSP technology)
    http://forum.java.sun.com/forum.jspa?forumID=45
    JavaBeans spec contains nothing about JSP, but JSP spec describes using of beans.
    i hope my question is clear so anyone who might have experience or clue with this problem might be able to help me.
    Thanks before

    finally folks, i found answer to my own problem hehehehe..
    the problem is on the compiling command (javac ... my_file.java), i found that i need to add some parameter on the command to make it works.
    This problem solved.

  • Using a Compiled Java Class --- Error

    Hi All,
    I am new to jsp tech. I am using 'Sun Java system application web server'.
    I am getting following error when running ch06_02.jsp :
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    [javac] /nfs/bxslnx/home/bxs/install/SUNWappserver/domains/domain1/generated/jsp/j2ee-modules/__default-web-module-server/org/apache/jsp/jsp/Examples/ch06/ch06_005f02_jsp.java:6: '.' expected
    [javac] import ch06_01;
    [javac] ^
    [javac] 1 error
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:88)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:337)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:429)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:489)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:468)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:516)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:307)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
    My two files are :
    ch06_01.java
    public class ch06_01
    public ch06_01()
    public String msg()
    return "Hello from JSP!";
    ch06_02.jsp
    <%@page import="ch06_01" %>
    <HTML>
    <HEAD>
    <TITLE>Using a JavaBean</TITLE>
    </HEAD>
    <BODY>
    <H1>Using a JavaBean</H1>
    <% ch06_01 messager = new ch06_01(); %>
    The message is: <%= messager.msg() %>
    </BODY>
    </HTML>
    Please help me ....... I don't know whats going wrong . I m using Suse OS.
    Thanks
    Basant

    Hi
    You have to place the xml parsing library inside the lib directory under the WTK.
    Mihai

  • Problem compiling java file to access web service! newbie troubles !

    I am new to web services and this is my first program...
    I am compiling java file which has import statement like:
    import org.apache.soap.util.xml.*;
    import org.apache.soap.*;
    import org.apache.soap.rpc.*;
    It says ----- package org.apache.soap.util.xml does not exist as one of errors..
    I have a folder that I named soap myself and I have activation.jar,serces.jar,mail.jar,soap.jar in it.
    I added c:\soap in my classpath and this was supposed to be the quickstart way to try an example out...
    but it gives me compilation errors... what should I do ?

    You'll need to specify each jar file in the classpath. c:\soap\xerces.jar;c:\soap\sax.jar;....

  • How to check the JDK version of a compiled java file

    can anybody tell me how to check the JDK version of a compiled java file ?
    Edited by: gbhatia8 on Sep 9, 2010 7:04 AM

    The major/minor version of the class file is the way to go.
    Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
    Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

  • Java6: How to compile java using JavaCompiler class

    Hi all,
    Using JavaCompiler, we can run the java program thru programmaticaly using run() method.
    Could anyone please tell me how to compile a java program using JavaCompailer class? Or calling run() itself will compile java file?
    Thanks
    Shagil

    import spoon.support.input.SpoonInputStream;
    import com.sun.tools.javac.code.Symbol.ClassSymbol;
    import com.sun.tools.javac.comp.Attr;
    import com.sun.tools.javac.comp.AttrContext;
    import com.sun.tools.javac.comp.Enter;
    import com.sun.tools.javac.comp.Env;
    import com.sun.tools.javac.comp.Todo;
    import com.sun.tools.javac.tree.Tree;
    import com.sun.tools.javac.tree.Tree.ClassDef;
    import com.sun.tools.javac.tree.Tree.TopLevel;
    import com.sun.tools.javac.util.Abort;
    import com.sun.tools.javac.util.Context;
    import com.sun.tools.javac.util.List;
    import com.sun.tools.javac.util.ListBuffer;
    import com.sun.tools.javac.util.Log;
    import com.sun.tools.javac.util.Name;
    * The Spoon compiler (uses javac).
    public class SpoonCompiler extends com.sun.tools.javac.main.JavaCompiler {
         Attr attr;
         Enter enter;
         boolean hasBeenUsed = false;
         Log log;
         Todo todo;
         public SpoonCompiler(Context arg0) {
              super(arg0);
              enter = Enter.instance(arg0);
              todo = Todo.instance(arg0);
              log = Log.instance(arg0);
              attr = Attr.instance(arg0);
              sourceOutput=true;
          * Main method: compile a list of files, return all compiled classes
          * @param filenames
          *            The names of all files to be compiled.
         @SuppressWarnings("unused")
         public List<Tree> parseAndAttribute(List<SpoonInputStream> filenames)
                   throws Throwable {
              // as a JavaCompiler can only be used once, throw an exception if
              // it has been used before.
              assert !hasBeenUsed : "attempt to reuse JavaCompiler";
              hasBeenUsed = true;
              long msec = System.currentTimeMillis();
              ListBuffer<ClassSymbol> classes = new ListBuffer<ClassSymbol>();
              try {
                   // parse all files
                   ListBuffer<Tree> trees = new ListBuffer<Tree>();
                   for (List<SpoonInputStream> l = filenames; l.nonEmpty(); l = l.tail) {
                        trees.append(parse(l.head.getFileName(),l.head.getStream()));
                   // enter symbols for all files
                   List<Tree> roots = trees.toList();
                   if (errorCount() == 0)
                        enter.main(roots);
                   // If generating source, remember the classes declared in
                   // the original compilation units listed on the command line.
                   List<ClassDef> rootClasses = null;
                   if (sourceOutput || stubOutput) {
                        ListBuffer<ClassDef> cdefs = new ListBuffer<ClassDef>();
                        for (List<Tree> l = roots; l.nonEmpty(); l = l.tail) {
                             for (List<Tree> defs = ((TopLevel) l.head).defs; defs
                                       .nonEmpty(); defs = defs.tail) {
                                  if (defs.head instanceof ClassDef)
                                       cdefs.append((ClassDef) defs.head);
                        rootClasses = cdefs.toList();
                   while (todo.nonEmpty()) {
                        Env<AttrContext> env = todo.next();
                        // save tree prior to rewriting
                        Tree untranslated = env.tree;
                        // attribution phase
                        if (verbose)
                             printVerbose("checking.attribution", env.enclClass.sym);
                        Name prev = log.useSource(env.enclClass.sym.sourcefile);
                        attr.attribClass(env.tree.pos, env.enclClass.sym);
                   return trees.toList();
              } catch (Abort ex) {
                   ex.printStackTrace();
              if (verbose)
                   printVerbose("total", Long.toString(System.currentTimeMillis()
                             - msec));
              int errCount = errorCount();
              if (errCount == 1)
                   printerCount("error", errCount);
              else
                   printerCount("error.plural", errCount);
              if (log.nwarnings == 1)
                   printerCount("warn", log.nwarnings);
              else
                   printerCount("warn.plural", log.nwarnings);
              return null;
         private void printerCount(String str, int val) {
              System.err.println(str + " - " + val);
         private void printVerbose(String arg0, Object obj) {
              System.out.println(arg0 + " - " + obj.toString());
    --- NEW FILE: CtBuilder.java ---
    package spoon.support.builder;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.Stack;
    import java.util.TreeSet;
    import spoon.query.Query;
    import spoon.query.TypeFilter;
    import spoon.reflect.CtFactory;
    import spoon.reflect.code.BinaryOperatorKind;
    import spoon.reflect.code.CtAbstractInvocation;
    import spoon.reflect.code.CtArrayAccess;
    import spoon.reflect.code.CtAssert;
    import spoon.reflect.code.CtAssignment;
    import spoon.reflect.code.CtBinaryOperator;
    [...1760 lines suppressed...]
                var.setSimpleName(tree.sym.name.toString());
                var.setModifiers(getModifiers(tree.mods.flags));
                enter(var, tree);
                scan(tree.init);
                exit(var, tree);
        @Override
        public void visitWhileLoop(WhileLoop tree) {
            CtWhile whileLoop = new CtWhileImpl();
            enter(whileLoop, tree);
            builderContext.loopParameter = 1;
            scan(tree.cond);
            builderContext.loopParameter = 0;
            scan(tree.body);
            exit(whileLoop, tree);
    }

  • I want to compile java for *.exe program?

    I want to compile java for *.exe program?
    Thanks

    I want to compile java for *.exe program?
    ThanksYou're welcome, but the correct answer was allready
    given in previous response.oops, late again, must edit.
    You're welcome, but the correct answer was allready given in the first response.

  • Compile java applications,servlets etc.

    I am a newbie to java...what do i need to compile java applications,servlets etc.

    first you need java developers kit(jdk)
    download it
    then r.click on my computer and take it's properties
    go to advance properties
    go to envirinment variable
    set variables
    JAVA_HOME set to directory where you installed jdk
    CLASS_PATH set to the bin in your jdk
    then write a java class and save somewhere as .java file
    go to command prompt
    change directory to where you save java class
    and use javac (yourjavafilename) .java command to compile it
    wish you all the best

  • How to compile java programs in j2EE 1.4 SDK

    hi,
    i HAVE JUST INSTALLED NEW J2EE 1.4 SDK , IT HAS BEED INSTALLED SUCCESFULLY BUT I AM UNABLE TO COMPILE JAVA PROGRAMS WHICH I USED TO RUN IN SDK 1.4 ,OR EVEN NEW WRITTEN EXAMPLES. CAN ANYONE PLZ HELP ME.

    J2EE by itself is not capable of compiling Java. It requires that a J2SDK be installed first - this is what compiles and runs Java programs. Did you install the combination J2SDK and J2EE, or just the J2EE?
    If both are installed, then you should be able to compile and run as you used to..

  • Compiling java files in DOS window

    Hi,
    I have been writin a small Client Server Application. I am attempting to use java packages in order to put certain class files into particular directories, and then import the packages when needed.
    So far, i have started my 1st attempt at a very small application just to send / receive messages. My problem is however, that i can compile all the java files into specific directories & packages no problem, but when i try to compile the java files which make use of these classes, i keep getting the same error.
    OK, i will try to simplify,
    My Server program (called MyServer.java) uses 2 classes (called ProcessTransaction, and NumberValidator), I have compiled the generated class files from ProcessTransaction.java and NumberValidator.java files into a DIR called C:\JavaForm\serverstuff. i.e. my server program imports the package "serverstuff,*;" The problem is that when i try to compile my server program i get the error message:
    "cannot access ProcessTransaction
    bad class file: c:\JavaForm\ProcessTransaction.java
    file does not contain class ProcessTransaction
    Please remove or make sure it appears in the correct subdirectory of classpath"
    I am using the command:
    javac -classpath c:\JavaForm c:\JavaForm\MyServer.java to compile the server file
    All the java and class files are stored in the C:\JavaForm folder
    I dont understand why the ProcessTransaction call cannot be accessed because it is most definitely in the compiled java file!!!
    Any help would be much appreciated!!!
    Cheers
    Iain

    it's OK, i figured out that to compile the Server program successfully, you have to remove all the other java files from the DIR which the Server.java files exists, or else there is a conflict!!!! I dont know why, but that's what you have to do!!!!

  • Suffering an complie error when trying to compile java class in EBS11i

    Hi,
    When I trying to compile java classes with which imported the HttpServletResponse class, will get the follow error message:
    package javax.servlet does not exist
    cannot resolve symbol
    symbol : class HttpServletResponse
    It seems the javax.servlet package is not included in the classpath. But I checked the $CLASSPATH, it seems no problem.
    echo $CLASSPATH
    /u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u02/applvis/viscomn/java/appsborg2.zip:/u02/applvis/visora/8.0.6/forms60/java:/u02/applvis/viscomn/java
    Does anyone know the reason?
    environment: ebs 11i
    Thanks&Regards,
    Xiaofeng

    resolved this issue.
    1. Edit $APPL_TOP/admin/adovars.env file -
    Add the following jar files to the AF_CLASSPATH line -
    Full path of /...../iAS/Apache/Jsdk/lib/jsdk.jar
    Full path of /...../iAS/Apache/Jserv/libexec/ApacheJServ.jar
    2. Bounce the concurrent manager in order to have the changes take effect.

  • Location of compiled java files

    Where are the compiled java files for jsps? Sometimes I get jsp errors in the log
    files like:
    D:\jsrv\my\WEB-INF\_tmp_war_myserver_myserver_my\jsp_servlet\_mypage\_cancelmembership.java:105:
    ')' expected
    However, the _cancelmembership.java file does not exist at that location. Only
    the _cancelmembership.class file exists at that location.

    You do NOT want to change the bundled CSS files. Create your own CSS and include it in the template after the built-in CSS include. Any classes you create in your own file of the same name and specificity as the built-in classes will override those classes. For example:<style type="text/css">
    td.myclass{color:red}
    td.myclass{color:blue}
    </style>The color of the text in a table cell with the class "myclass" will be blue, not red, since the same class was defined twice, it will use the one that came last on the page.
    If you change the classes in the built-in template CSS files, you'll change them for everyone using your APEX instance, which is not a particularly good thing to do.
    Tyler

  • Running/Compiling *.java file in Oracle Sql Developer

    I want to compile/run java 5.0 files in Oracle sql developer1.1.2.25 on Fedora 5 platform.
    I have added javac as an enternal tool to compile java programs. Tools-->External Tools-->New
    I have also added java: /usr/java/jre1.5.0_10/bin/java as an external tool to run the complied programs
    I am able to compile the java programs, but i am not able to run them.
    I am providing ${file.name.no.ext} as an argument to java.
    Java-Log Output is:
    /usr/java/jre1.5.0_10/bin/java Writer2
    Exception in thread "main" java.lang.NoClassDefFoundError: Writer2
    However, if i run the same program in Linux terminal, i get the correct output:
    [root@localhost java]# which java
    /usr/java/jre1.5.0_10/bin/java
    [root@localhost java]# /usr/java/jre1.5.0_10/bin/java Writer2
    12
    howdy
    folks
    How can i make Oracle Sql Developer run the java program?

    I will echo the use jdev comment..
    Regardless, you may want to check the execute in directory.. or add a -cp parameter.
    Eric

  • Compiling *.java for cfinvoke

    I'm trying to connect to a web service that uses
    complex-within-complex data types for its parameter.
    I am constantly getting errors trying to invoke the web
    service and it has been recommended by someone on this list (Mr.
    Andreyev) that I do the following:
    1. Use wsdl2java tool (CF_HOME/runtime/bin) supplying URL to
    webservice WSDL to create java code.
    2. Create java classes by compiling java code created in step
    1
    3. Create jar file(s) from classes in step 2
    4. Put jar file in CF classpath or just copy it to
    CF_HOME/lib directory
    5. Using <cfscript> create required objects, arrays and
    other arguments and supply them to web service method call.
    This is not as simple as it sounds (well, not to someone
    who's only interaction with java is in a cup).
    1. Use wsdl2java tool (CF_HOME/runtime/bin) tsupplying URL to
    webservice WSDL to create java code.
    This has been done. The tool created a series of subfolders
    under C:\CFusionMX7\runtime\bin which ends in a folder called
    schema
    Inside schema are six other folders that each contain 1 and
    111 .java files
    [EDIT] I think I have part of the problem worked out.
    2. Create java classes by compiling java code created in step
    1
    This has not been done.
    My command line in javac is: javac @filename -verbose -source
    1.4
    I get a total of 100 errors and 33 warnings
    All the errors are on this theme:
    C:\CFusionMX7\runtime\bin\...\AccommodationRoomT
    ype.java:10: package org.apache.axis.encoding does not exist
    public class AccommodationRoomType implements
    java.io.Serializable, org.apache.
    axis.encoding.SimpleType {
    The common theme in the error messages is:
    package org.apache.axis.something does not exist
    Am I not using javac correctly or is it just battling to
    compile the code generated by wsdl2java?
    Thanks
    Neal

    Hi there Mr. Andreyev
    [EDIT]. You are a prince amongst men, sir. All .class files
    have been created
    This version of your line worked
    javac -source 1.4 -deprecation -classpath
    C:/CFusionMX7/lib/axis.jar;C:/CFusionMX7/lib/xml-apis.jar;C:/CFusionMX7/lib/saaj.jar;C:/C FusionMX7//lib/jaxrpc.jar;.
    @C:/CFusionMX7/runtime/bin/au/com/qantas/www/schema/allfiles.txt
    It threw
    warnings, not
    errors. I was reading them as the same thing.
    Thank you for your kind assistance. On to step 3!
    [END EDIT]
    Using the command line as you suggested threw up a new set of
    errors but I think I know what is causing them.
    The first time I tried your script I modified it as follows:
    javac -deprecation -classpath
    C:/CFusionMX7/lib/axis.jar;C:/CFusionMX7/lib/xml-apis.jar;C:/CFusionMX7/lib/saaj.jar;C:/C FusionMX7//lib/jaxrpc.jar;.
    C:/CFusionMX7/runtime/bin/au/com/qantas/www/schema/aCalypsoV1/*.java
    Note that there is a space between the period (.) and the
    start of the path to the java files.
    On running this i received back many many error messages
    pointing out that
    "as of release 5, 'enum' is a keyword, and may not be used as
    an identifier (use -source 1.4 or lower to use 'enum' as an
    identifier)"
    I then modified your line as follows
    javac -source 1.4 -deprecation -classpath
    C:/CFusionMX7/lib/axis.jar;C:/CFusionMX7/lib/xml-apis.jar;C:/CFusionMX7/lib/saaj.jar;C:/C FusionMX7//lib/jaxrpc.jar;.
    C:/CFusionMX7/runtime/bin/au/com/qantas/www/schema/aCalypsoV1/*.java
    This also gave me a bunch of errors in the vein of:
    "C:\CFusionMX7\runtime\bin\au\com\qantas\www\schema\aCalypsoV1\ContactDetails.jav
    a:38: package au.com.qantas.www.schema.CustomersV1 does not
    exist
    public void
    setEmailAddress(au.com.qantas.www.schema.CustomersV1.EmailAddres
    s emailAddress) {"
    The .java files that were created by wsdl2java were grouped
    into six folders under /www/schema
    Every error message references one of these other folders. It
    looks like the compiler is trying to reference them.
    I have these folders:
    www/schema/aCalypsoV1
    www/schema/AmadeusBookingsV1
    www/schema/ChannelsV1
    www/schema/CustomersV1
    www/schema/FinancialsV1
    www/schema/ReferenceV1
    I tried creating a text file with an absolute path to every
    single .java file in those six files in it (naming it
    www/schema/allfiles.txt) and modifying your script as follows:
    javac -source 1.4 -deprecation -classpath
    C:/CFusionMX7/lib/axis.jar;C:/CFusionMX7/lib/xml-apis.jar;C:/CFusionMX7/lib/saaj.jar;C:/C FusionMX7//lib/jaxrpc.jar;.
    @C:/CFusionMX7/runtime/bin/au/com/qantas/www/schema/allfiles.txt
    This threw a set of errors in this theme
    C:\CFusionMX7\runtime\bin\au\com\qantas\www\schema\ChannelsV1\Channel.java:32:
    w
    arning: as of release 5, 'enum' is a keyword, and may not be
    used as an identifi
    er
    (use -source 5 or higher to use 'enum' as a keyword)
    Using -source 1.4 throws errors saying use source 5 or higher
    Using -source 5 or leaving it out altogether says use source
    1.4
    I am stuck.

Maybe you are looking for

  • Will only sync a few songs and then says unable to sync

    I have a very old ipod - no color, click wheel 20GB. Everytime I try to sync it gives me one of these 2 responses: Attempting to copy to the disk "Kimberly's iPod" failed. The disk could not be read from or written to. The iPod "Kimberly's iPod" cann

  • SharePoint 2013 Unable to open in Windows Explorer

    Hello, I have been working on this issue on and off for the past few weeks, with no success.  I have a Windows 2012 VM with SP 2013 installed, and using an SSL, and Windows 8 client using IE 11. I cannot get the Open with Explorer to work, whether us

  • Event handling in objects

    hello friends,                     i want to use the event RAISE_LINK_CLICK for single click. but i dont want 2 use this event for alv table.                    i am displaying vendor name in my top of page,if the user click of the vendor name a new

  • Calling1.4.1 signed applet from Javascript causes keyboard/focus problems

    Pretty sure there's a JRE bug here, but I'm posting to forums before I open one in case I'm missing something obvious :-) This issue may be specific to IE, I haven't tested elsewhere yet. Our web application is centered around a signed applet that is

  • Take up Oracle ERP database responsibilities.

    Hi all, How to take up oracle ERP database responsibilities from old DBA mean to say which aspect should i consider most important. Thanks.