How to test the simple .java file in cactus

dear friends,
i have use the junit first time .And i am working in weblogic8.1 so i have use cactus .But i face the problem to use it.
1. how to test the simple .java file in cactus.
2.how to run the cactus in weblogic 8.1.

Hi,
It is because the converter works on byte code and it only supports a subset of the Java language (see the JC specifications). It is kind of like compiling you code on Java 6 and trying to run it on Java 5. The JCDK outlines the required compiler version.
Cheers,
Shane

Similar Messages

  • How to run the deployed java file

    Hi friends
    please guide me hoe to run the deployed Java class file on the machine on which the java sdk is not installed please tell me also the it is necessary to change environment variables
    becoz i have created one small package & i want to deploy & capable to work it on machine on which there is no java SDK is installed

    Does your application have a GUI (e.g. Swing or AWT)? Can you distribute it from a web site?

  • How to run the simple java card program in eclipse?

    I am trying to run a simple HelloWorld program in eclipse 3.5 having java card development kit 2.2 installed in it.
    Firstly,I go to the JCWDE tab and press start..then when trying to deploy that package its giving me error like " com.hw.HelloWorld: unsupported class file format of version 50.0." can any one help me in this what is this error???n how to resolve n run this program..

    Hi,
    It is because the converter works on byte code and it only supports a subset of the Java language (see the JC specifications). It is kind of like compiling you code on Java 6 and trying to run it on Java 5. The JCDK outlines the required compiler version.
    Cheers,
    Shane

  • How to test the RFC to Flat File scenario

    Hi,
    How to test the RFC to Flat File scenario
    regards,
    kiran

    Hi,
    After running the RFC it's going Dump.
    this is the error message i got.
    "Error analysis                                                                     
    An error occurred when executing a Remote Function Call.                     
    "CPI-C error CM_RESOURCE_FAILURE_NO_RETRY"                                                
    Status of connection.... "CODE=CM_RESOURCE_FAILURE_NO_RETRY -1 -1 SAPCODE=666
    CONV="                                                                      
    Internal error code.... "RFC_IO5"                                                           
    There is an error in the communication system. To clarify                    
    and resolve the error, contact your system administrator.                     "

  • How to keep the generated java classes for compiled jsp in WL9.2 Workshop

    Hi all,
              <p>
              It should be a very simple question for most of you, however, it seems a bit tricky to me: how to configure the Weblogic 9.2 workshop so that we could keep the generated java files for the compiled jsp when we ran the application within WL 9.2 workshop?
              <p>
              I try some configurations, but not working. Also, where are the generated java files stored?
              <p>
              Thanks for the help!
              <p>
              Agnes
              Edited by wingagnes at 03/21/2008 7:51 AM

    Hi yzeng,
              <p>
              Thanks for the reply. If I change the jsp-descriptor into the following:
              <p>
              <jsp-descriptor>
              <p>
              <keepgenerated>true</keepgenerated>
              <p>
              <working-dir>D:\temp\golGenerated</working-dir>
              <p>
              <debug>true</debug>
              <p>
              </jsp-descriptor>
              <p>
              I will get the following error message:
              <p>
              cvs-complex-type.2.3.d:Invalid content was found starting with element 'precompile'. No child element is expected at this point.
              <p>
              Thanks,
              <p>
              Agnes

  • Problem compiling a simple java file

    Hi,
    When I try to compile the following simple java file
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HowdyServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException {
    PrintWriter out = response.getWriter();
    response.setContentType("text/html");
    out.println("<html>");
    out.println("<body>");
    out.println("<center><h1>Hi</h1></center>");
    out.println("</body>");
    out.println("</html>");
    at the command prompt as follows
    C:\Shared\CBT\Java 2 JSP and Java Servlets\03\servlet1>javac -classpath
    "C:\Program Files\Java\j2re1.4.2_03\lib\ext\QTJava.zip" *.java
    Or
    C:\Shared\CBT\Java 2 JSP and Java Servlets\03\servlet1>javac *.java
    Or
    C:\Shared\CBT\Java 2 JSP and Java Servlets\03\servlet1>javac HowdyServlet.java
    I get the following errors and I cannot compile this java file -
    HowdyServlet.java:2: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    HowdyServlet.java:3: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    HowdyServlet.java:5: cannot find symbol
    symbol: class HttpServlet
    public class HowdyServlet extends HttpServlet {
    ^
    HowdyServlet.java:6: cannot find symbol
    symbol : class HttpServletRequest
    location: class HowdyServlet
    public void doGet(HttpServletRequest request,
    ^
    HowdyServlet.java:7: cannot find symbol
    symbol : class HttpServletResponse
    location: class HowdyServlet
    HttpServletResponse response)
    ^
    HowdyServlet.java:8: cannot find symbol
    symbol : class ServletException
    location: class HowdyServlet
    throws IOException, ServletException {
    ^
    6 errors
    I have installed the latest JEE 5 SDK on Win XP Home. I have the following variable set as follows,
    CLASSPATH = .;C:\Program Files\Java\j2re1.4.2_03\lib\ext\QTJava.zip
    PATH = C:\Sun\AppServer\jdk\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\QuickTime\QTSystem;C:\Sun\AppServer\lib\ant\bin
    ANT_HOME = C:\Sun\AppServer\lib\ant
    I have spent hours scratching my head but don?t have a clue. I was wondering if you have any idea as why I might be getting these errors.
    Thank you for your time.
    Green

    Hello, did you read the answers?
    You have to put j2ee.jar or servlet-api.jar in your classpath. Those JAR files are included in the Java EE package somewhere. Remove the QTJava.zip junk from the classpath.
    If you don't know what the classpath is and how to set it, read this:
    Setting the class path
    How Classes are Found
    And I'll repeat what the others say: if you are very new to Java, then Java EE will probably be way over your head. First learn the language and the standard API. If you understand that well, start with Java EE. Or do you already know what servlets are, and that you need a servlet container to run them, and how to deploy them etc.?

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • How to get the number of files currently open?

    hi,
    does any one know how to get the number of files currently open in windows OS?
    e.g. lets say .txt files...
    any comment will be really appreciated.
    thanks

    Assuming that you don't want to actually do this from within Java code (which would obviously require native code), here's a utility that will give you a list of which file handles are opened by which processes (on Windows):
    http://www.sysinternals.com/ntw2k/freeware/handle.shtml
    - K

  • What's wrong with this simple java file

    I am learning java input methods. When I tried to compile the below simple java file, there were two errors.
    import java.io.*;
    public class MainClass {
       public static void main(String[] args)  {
        Console console = System.console();
        String user = console.readLine("user: ");
        System.out.println(user);
    }The compiler errors:
    h:\java\MainClass.java:5: cannot resolve symbol
    symbol : class Console
    location: class MainClass
    Console console = System.console();
    ^
    h:\java\MainClass.java:5: cannot resolve symbol
    symbol : method console ()
    location: class java.lang.System
    Console console = System.console();
    ^
    2 errors
    Could anyone take a look and shed some lights on this?

    I have changed to "import java.io.Console;" but this below errors:
    h:\java\MainClass.java:1: cannot resolve symbol
    symbol : class Console
    location: package io
    import java.io.Console;
    ^
    h:\java\MainClass.java:5: cannot resolve symbol
    symbol : class Console
    location: class MainClass
    Console console = System.console();
    ^
    h:\java\MainClass.java:5: cannot resolve symbol
    symbol : method console ()
    location: class java.lang.System
    Console console = System.console();
    ^
    3 errors
    -----------

  • How to get the current executing file/itself absolute directory?

    hellooo,
              gentlemen/lady, how to get the current executing file/itself absolute directory?
              thanks
              

              Hello,
              you can get the real path information of the JSP through the servlet context:
              http://java.sun.com/products/servlet/2.2/javadoc/index.html
              javax.servlet
              Interface ServletContext
              Method getRealPath
              Christian Plenagl
              Developer Relations Engineer
              BEA Support
              [email protected] (alex mok) wrote:
              >hellooo,
              >
              >gentlemen/lady, how to get the current executing file/itself absolute
              >directory?
              >
              >thanks
              

  • OIC: Need to find the Source Code for the YTDSummary.java file

    Hi All,
    We have 11.5.10 implemention and we are using the OIC(Incentive Compensation) Application. In the Report Module for the Year-To-Date Summary we need look for the Java Source Code.The cnytdsum.jsp file call the YTDSummary.java file. We have teh following question
    1. How we can get the Java Source Code and where and which directory we need to look into?
    2. Let say if we need to customize the java file how we can do that?
    3. where and which directory we have to complie the java file?
    Highly appreciate for any pointers
    Thanks,
    Johnson.

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • How to install the SAP Java Connector

    Hi,
    I am unsure how to install the SAP Java Connector on Linux (Suse Linux Enterprise 10). The SAP Integration Kit install and admin guide says:
    ===
    u2022 Copy the librfccm library and the libsapjcorfc library to busines
    sobjects_root/enterprise120/PLATFORM_PATH, where busines
    sobjects_root is the full path to your businessobjects directory,
    and PLATFORM_PATH is your platform. For example, PLATFORM_PATH
    is solaris_sparc for an installation on Solaris.
    u2022 Use symbolic links for the location of the librfccm library and the lib
    sapjcorfc library.
    u2022 Add the location of the librfccm library and the libsapjcorfc library
    to the library path.
    ===
    Do I have to do all 3 steps or is the 1st one (copying of files) enough?
    On the other hand, the SAP Java Connector guide says:
    ===
    Then add {sapjco-install-path} to the LD_LIBRARY_PATH environment variable.
    Finally, add {sapjco-install-path}/sapjco.jar to your CLASSPATH environment variable.
    ===
    So, what to do?
    Thanks!

    Thanks for your help. So i copied the 2 files as mentioned in point 1.
    Where do I have to copy the file sapjco.jar to? There is no shared lib folder after installing BO Edge 3.1 on a Linux system.
    I copied the sapjco.jar to /bobje/tomcat/common/lib but still get the message that the Java Connector files are not in the correct directory.
    I already copied the files librfccm.so and libsapjcorfc.so to /bobje/enterprise120/linux_x86 .
    Thanks again!
    Edit: problem solved: Copying the sapjco.so to tomcat/shared/lib is correct, if the directory doesn't exist then just create it (mkdir). The message is just plain information 7 hint.

  • Where is the running JAVA file is located

    Hey,
    lets say my java file would be in C:\package1\whereIam.java
    if I run this program, how can I ask (command ?),
    in which directory the running java file is located.
    i.e. I would like to get C:\package1
    Aykut

    It's actually more complicated than that. The class could be in a jar file... would you want the directory the jar file is in? Well, I'll let you deal with those issues. You can get a URL to your class like this, I think:URL me = this.getClass().getResource("/" + this.getClass().getName());

  • How to test the JSP pages and sevlets using JUnit. ?

    How to test the JSP pages using JUnit. How to configure what are all the steps to execute the JUnit test cases.

    Hi xiepei,
    since you are using modbus, a simple error checking is implicit in the protocol and is the comparison between returned checksum and the calculated one on the received message: checksum errors, if any, are an effect of communications errors (you should have at least 2 bits changed and on particular patterns to have the checksum be calculated correctly!). You won't be able to calculate BER on them, but you can calculate PER (Packet Error Rate).
    Another flag for communication errors, on the other direction, is to intercept error messages from the device: if it fully implements modbus protocol, it should return some warning in case of error (I seem to remember that in some cases it returns the reveived message with some error bits added: please check in modbus documentation).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How to run the emca batch file

    Hello,
    I would just like to know how to run the emca batch file for a single test database on my PC with SID = ORCL1.
    Hope someone can help me.
    Thanks!

    Hi
    If you mean running EMCA as batch file and test something.
    I think the best way is to write OS level script to handle this

Maybe you are looking for