Using Java Reflection to call a method with int parameter

Hi,
Could someone please tell me how can i use the invoke() of the Method class to call an method wiht int parameter? The invoke() takes an array of Object, but I need to pass in an array of int.
For example I have a setI(int i) in my class.
Class[] INT_PARAMETER_TYPES = new Class[] {Integer.TYPE };
Method method = targetClass.getMethod(methodName, INT_PARAMETER_TYPES);
Object[] args = new Object[] {4}; // won't work, type mismatch
int[] args = new int[] {4}; // won't work, type mismatch
method.invoke(target, args);
thanks for any help.

Object[] args = new Object[] {4}; // won't work, type
mismatchShould be:
    Object[] args = new Object[] { new Integer(4) };The relevant part of the JavaDoc for Method.invoke(): "If the corresponding formal parameter has a primitive type, an unwrapping conversion is attempted to convert the object value to a value of a primitive type. If this attempt fails, the invocation throws an IllegalArgumentException. "
I suppose you could pass in any Number (eg, Double instead of Integer), but that's just speculation.

Similar Messages

  • Dynamic Imagelink Component - Calling Impl method with input parameter

    Hi All,
    I have requirement where Imagelinks are created dynamically on the pageload. Generated the components and the components are displayed on the jspx.
    Now when I click the image link, a method in AMImpl should invoke and this method takes some input parameters.
    I am able to call the method successfully in AMimpl with the help of below code. But I could not understand how to pass the input parameters to that method.
                               RichCommandImageLink lockimageLink =
                                new RichCommandImageLink();
                            lockimageLink.setIcon("icon.png");
                            lockimageLink.setId("icon" + index);                   
                            MethodExpression me =
                                JSFUtils.getMethodExpression("#{bindings." +
                                                             "MyMethodName" +
                                                             ".execute}");
                            lockimageLink.addActionListener(new MethodExpressionActionListener(me));
      public static MethodExpression getMethodExpression(String name) { 
       Class [] argtypes = new Class[1]; 
       argtypes[0] = ActionEvent.class; 
       FacesContext facesCtx = FacesContext.getCurrentInstance(); 
       Application app = facesCtx.getApplication(); 
       ExpressionFactory elFactory = app.getExpressionFactory(); 
       ELContext elContext = facesCtx.getELContext(); 
       return elFactory.createMethodExpression(elContext,name,null,argtypes); 
      } Can some one please suggest how to pass input parameters to the Impl method.
    Jdeveloper Version : 11.1.1.4.0
    Thanks,
    Morgan.
    Edited by: 900114 on May 12, 2012 11:23 PM

    You can use the below method to call an AMImpl method. You can pass parameters as well to the AMImpl method.
    DCBindingContainer bindings = getDCBindingContainer();
    OperationBinding ob = bc.getOperationBinding("MyMethodName");
    Map m = ob.getParamsMap();
    ob.put("paramName", "paramValue"); paramName is the parameter in AMImpl and paramValue is the value to be passed.
    ob.execute();
    Where getDCBindingContainer() is:
    public DCBindingContainer getDCBindingContainer() {
    ExpressionFactory exprFactory;
    ELContext elContext;
    ValueExpression valueExpression;
    DCBindingContainer dcBindingContainer;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    exprFactory = facesContext.getApplication().getExpressionFactory();
    elContext = facesContext.getELContext();
    valueExpression =
    exprFactory.createValueExpression(elContext, "#{bindings}",
    Object.class);
    dcBindingContainer =
    (DCBindingContainer)valueExpression.getValue(elContext);
    return dcBindingContainer;
    Hope this helps
    Edited by: umesh.agarwal on May 13, 2012 12:10 AM
    Edited by: umesh.agarwal on May 13, 2012 12:10 AM

  • How to do this: Link which calls a methode with a parameter?

    Hello!
    I have a small question:
    I have a jsp-site with some beans.
    On the jsp-site I have the following code which isnt functional:
    <c:forEach items="${filter.resultlist}" var="result">
        <c:url action="#{filter.selectedAoid(result.aoid)}">
             <c:out value="${result.name}" / >
         </c:url>
    </c:forEach>-> As you can see:
    I want to make a Link, which is named like the String in the List and accessable by ${result.name} and on a click it should run "filter.selectedAoid()" with an int Parameter.
    (So I can access the right object with my Aoid-identifier...)
    The List comes from a DB and I am able to access the values of the Objects in the list.
    Could someone please tell me how that is done?
    Thanks in advance
    Fuchur

    One way of hacking this problem is by dynamically updating the job step which executes the stored procedure to include the parameters the user provided.  You can do so by using
    msdb.dbo.sp_update_jobstep.
    So for example, you could create a job named "Test job" and in that job the first step would be to execute your stored procedure.  You would then use the following code to update that step at run time:
    execute msdb.dbo.sp_update_jobstep
    @job_name = N'Test job',
    @step_id = 1,
    @command = 'execute my_proc @my_variable = ''my_value'''
    You'd then use sp_start_job like so:
    execute msdb.dbo.sp_start_job @job_name = 'Test job'
    Your job would then execute using the value provided at run time for the @my_variable parameter.

  • Use a variable to call a method

    Hi
    I'm not very familiar with JAVA. I'm just doing different things in my free time at home.
    Now I try to write a abstract class so my mostly used methods are allways the same. but for that I have to call a method in a class but I know the method only at runtime.
    e.g.
       String[] methods = {"compare", "compareIgnoreCase"};
      // Here I like to call the method out of the above string:
      result = callMethod(class, methods[0], param1, param2);Is this possible in Java? If yes, how?
    By the way, I have J2SE 1.5 installed. And I'm working with NetBeans as my developing tool.
    Thanks for any help
    Cheers
    moba

    Classes can be dynamically loaded to invoke their methods using Java Reflection feature.
    The article http://java.sun.com/developer/technicalArticles/ALT/Reflection/index.html provides examples on using the reflection feature.
    In particular, the section "Invoking Methods by Name" in the article gives an example of invoking a method dynamically.
    The relevant APIs (in java.lang and java.lang.reflect packages) are documented at:
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/package-summary.html
    and http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html.

  • Calling a method with a string

    Here's the question:
    I want to call a method with the name equal to a string variable.
    For example, if the string variable contains "hellojava" , i'd like the hellojava() method to be called..
    if the string contains "error", the error() method should be called..
    and so on..:)

    Here is an example I had thrown together for this
    purpose of the exact demonstration, Ar'nt you in luck.:-). If there is anything you don't understand,
    I can be reached at [email protected] and will be happy to help....
    import java.lang.reflect.*;
    import java.io.*;
    class Test {
         String name = "Default";
            public Test(String name) {
                    this.name = name;
            public void test() {
                    System.out.println("Hello");
         public void count() {
              for(int i=0; i<10; i++) {
                   System.out.println(i);
           public static void main(String[] args) {
                 try {
                         Test myObject = new Test("test1");
                             Class myClass = myObject.getClass();
                   BufferedReader bRead =
                        new BufferedReader(
                        new InputStreamReader( System.in ));
                   String bufStr = null;
                   while( (bufStr = bRead.readLine()) != "exit") {
                         Method noParams = myClass.getDeclaredMethod(bufStr, new Class[] {});
                              noParams.invoke(myObject, new Object[] {});
                }catch(Exception e) {
                   System.out.println("No Such Method.");
    }Good Luck,
    -- Ian

  • Calling a method with parameters in jstl?

    i need to call a method with a series of String parameters what am i doing wrong?
    the java
        public ArrayList getEmployeeSkills(String ename, String snmae, String yearsexp)the jstl
        <jsp:useBean id="empskill" class="com.Database.EmployeeSkill"/>
        <c:forEach var="emp" items="${empskill.EmployeeSkills(null, null, null)}">
        </c:forEach>

    this works:
         <jsp:useBean id="empskill" class="com.Database.EmployeeSkill" scope="page">
             <jsp:setProperty name="empskill" property="ename" value="Helen Smith"/>
             <jsp:setProperty name="empskill" property="sname" value="Java"/>
         </jsp:useBean>but this part isnt:
         <c:forEach var="empskill" items="${empskill.EmployeeSkillsReport}">
         </c:forEach>ive removed the get part from the method as i have done before from the java class it is calling:
    public ArrayList getEmployeeSkillsReport()
    but it produces:
    org.apache.jasper.JasperException: Exception in JSP: /main.jsp:146
    143:      </jsp:useBean>
    144:      
    145:
    146:      <c:forEach var="empskill" items="${empskill.EmployeeSkillsReport}">
    147:      </c:forEach>
    148:                          
    149:    
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:506)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: An error occurred while evaluating custom action attribute "items" with value "${empskill.EmployeeSkillsReport}": Unable to find a value for "EmployeeSkillsReport" in object of class "com.Database.EmployeeSkill" using operator "." (null)
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
         org.apache.jsp.main_jsp._jspService(main_jsp.java:244)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "items" with value "${empskill.EmployeeSkillsReport}": Unable to find a value for "EmployeeSkillsReport" in object of class "com.Database.EmployeeSkill" using operator "." (null)
         org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:109)
         org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:129)
         org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:75)
         org.apache.taglibs.standard.tag.el.core.ForEachTag.evaluateExpressions(ForEachTag.java:155)
         org.apache.taglibs.standard.tag.el.core.ForEachTag.doStartTag(ForEachTag.java:66)
         org.apache.jsp.main_jsp._jspx_meth_c_forEach_3(main_jsp.java:590)
         org.apache.jsp.main_jsp._jspService(main_jsp.java:232)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

  • How to use INVOKE function with INT parameter types

    Can you tell me how to use invoke function with int parameter type ?

    Pass the int as an Integer.

  • Call a method with complex data type from a DLL file

    Hi,
    I have a win32 API with a dll file, and I am trying to call some methods from it in the labview. To do this, I used the import library wizard, and everything is working as expected. The only problem which I have is with a method with complex data type as return type (a vector). According to this link, import library wizard can not import methods with complex data type.
    The name of this method is this:   const std::vector< BlackfinInterfaces::Count > Counts ()
    where Count is a structure defined as below:
    struct Count
       Count() : countTime(0) {}
       std::vector<unsigned long> countLines;
       time_t countTime;
    It seems that I should manually use the Call Library Function Node. How can I configure parameters for the above method?

    You cannot configure Call Library Function Node to call this function.  LabVIEW has no way to pass a C++ class such as vector to a DLL.

  • Errors in a Java class when calling other methods

    I am giving the code i have given the full class name . and now it is giving the following error :
    Cannot reference a non-static method connectDB() in a static context.
    I am also giving the code. Please do help me on this. i am a beginner in java.
    import java.sql.*;
    import java.util.*;
    import DButil.*;
    public class StudentManager {
    /** Creates a new instance of StudentManager */
    public StudentManager() {
    Connection conn = null;
    Statement cs = null;
    public Vector getStudent(){
    try{
    dbutil.connectDB();
    String Query = "Select St_Record, St_L_Name, St_F_Name, St_Major, St_Email_Address, St_SSN, Date, St_Company, St_Designation";
    cs = conn.createStatement();
    java.sql.ResultSet rs = cs.executeQuery(Query);
    Vector Studentvector = new Vector();
    while(rs.next()){
    Studentinfo Student = new Studentinfo();
    Student.setSt_Record(rs.getInt("St_Record"));
    Student.setSt_L_Name(rs.getString("St_L_Name"));
    Student.setSt_F_Name(rs.getString("St_F_Name"));
    Student.setSt_Major(rs.getString("St_Major"));
    Student.setSt_Email_Address(rs.getString("St_Email_Address"));
    Student.setSt_Company(rs.getString("St_Company"));
    Student.setSt_Designation(rs.getString("St_Designation"));
    Student.setDate(rs.getInt("Date"));
    Studentvector.add(Student);
    if( cs != null)
    cs.close();
    if( conn != null && !conn.isClosed())
    conn.close();
    return Studentvector;
    }catch(Exception ignore){
    return null;
    }finally {
    dbutil.closeDB();
    import java.sql.*;
    import java.util.*;
    public class dbutil {
    /** Creates a new instance of dbutil */
    public dbutil() {
    Connection conn;
    public void connectDB(){
    conn = ConnectionManager.getConnection();
    public void closeDB(){
    try{
    if(conn != null && !conn.isClosed())
    conn.close();
    }catch(Exception excep){
    The main error is occuring at the following lines connectDB() and closeDB() in the class student manager. The class dbutil is in an another package.with an another file called connectionManager which establishes the connection with DB. The dbutil has the openconnection and close connection methods. I have not yet written the insert statements in StudentManager. PLease do Help me

    You're doing quite a few things that will cause errors, I'm afraid. I'll see if I can help you.
    The error you're asking about is caused by the following line:
    dbutil.connectDB();
    Now first of all please always ensure that your class names begin with capital letters and your instances of classes with lowercase letters. That's what everybody does, so it makes your code much easier to follow.
    So re-write the couple of lines at the beginning of your dbutil class like this:
    public class Dbutil {
    /** Creates a new instance of Dbutil */
    public Dbutil() {
    Now you need to create an instance of dbutil before you can call connectDB() like this:
    Dbutil dbutil = new Dbutil();
    now you can call the method connectDB():
    dbutil.connectDB();
    The problem was that if you don't create an instance first then java assumes that you are calling a static method, because you don't need an instance of a class to call a static method. If it was static, the method code would have been:
    public static void connectDB(){
    You have a fine example of a static method call in your code:
    ConnectionManager.getConnection();
    If it wasn't a static method your code would have to look like this:
    ConnectionManager connectionManager = new ConnectionManager();
    connectionManager.getConnection();
    See the difference? I also know that ConnectionManager.getConnection() is a call to a static method because it begins with a capital letter.
    Anyway - now on to other things:
    You have got two different Connection objects called conn. One is in StudentManager and the other is in Dbutils, and for the moment they have nothing to do with each other.
    You call dbUtil.connectDb() and so if your connectDb method is working properly you have a live connection called conn in your dbUtil object. But the connection called conn in StudentManager is still null.
    If your connection in the dbUtil object is working then you could just add a line after the call to connectDb() in StudentManager so that the StudentManager.conn object references the dbUtil.conn object like this:
    dbutil.connectDB();
    conn = dbUtil.conn;

  • Calling arbitrary method with expression language

    I'm new to JSP, but have a strong background in Java. I've created a bean that I've included on a JSP page that is meant to manage access to a database. On this bean I have a method
    public int createNewRecord();which will create a new record and return its id. I then want to embed this id in a link within my webpage by using something like:
    <jsp:useBean id="dbBean" scope="application" class="com.myDomain.DatabaseIfaceBean"/>
    <html>
    <body>
    Link to <a href="relativePage.jsp?recordId=${dbBean.createNewRecord}">record page</a>
    </body>
    </html>However, this doesn't work. Is there a way to call this method? If this method accepted arguments, is there some way I could pass arguments to it?

    Its a bit long winded, but EL functions would be the way to go. [url http://www.sitepoint.com/article/java-6-steps-mvc-web-apps/6]Here's  a link (search for EL functions in the page)
    ram.

  • Calling a method with a html Submit button

    hi guys,
    is it possible to call a method from a JSP file using a HTML submit button. I know i can call another website easily doing it this way, is there a similar way available to call a method once the button is clicked?
    FYI
    The method is in a bean file named jdbc. The methods name is getUsername.
    Nice one.
    <form action = <%jdbc.getUsername()%> <input type="submit" value="Submit">

    Dear friend,
    you mentioned that u need to call a method when submit button is clicked. Is the method dynamically created. If not so, then you can include the method on the submit button html file itself.
    Regards,
    Rengaraj.R

  • HT1692 I want to use my reminder folder in simple method with has come with I pad .i m facing the problem after update of software

    I want to use my reminder folder in simple method .witch I have received with iPad .after update of software now the. Window is different .plz help me to resolve
    the same.

    Read how the new Reminder function works here:
    iPad User Guide - For iOS 7 (October 2013)Nov 1, 2013 - 23 MB

  • How to upgrade Forms 11gR2 to use JAVA 7 after it was installed with JAVA 6

    I recently installed Forms 11gR2 on a development server.  We are trying to have the latest versions of everything to migrate from Forms 10g and assure we have support for the next few years.
    Our platform has the following software configuration:
    Solaris 10 (Update 19) SPARC 64 bits
    Weblogic 11g (10.3.6) that was installed with Java JDK 1.6.0_38
    Forms 11g R2 (11.1.2.1) that was also installed with
    Java JDK 1.6.0_38
    I tried to install Weblogic and Forms using the latest Java 7 JDK (1.7.0_25) but I got an error in the final steps of Forms setup, when I was configuring the domain.  I searched online and found a couple of tips but nothing worked.  The installation was stuck at the
    Creating Weblogic Domain step.  So I decided to try the installation process with the Java 6 JDK that we are using right now for Forms 10g, and it worked perfectly.  I have now two options but I don't know which one might be the better path:
    Uninstall Weblogic and Forms 11g completely, and try to re-install them again with Java 7, trying to fix the error that I got at the end of the configuration process.
    Try to upgrade the current Forms 11g installation from Java 6 to Java 7.  I found a blog that might suggest it is possible, but I don't know if it may cause additional issues along the road. http://pitss.com/us/2013/02/20/how-to-use-java-7-with-oracle-forms-11g-in-an-oracle-supported-environment/
    Thanks in advance for any suggestions you might have, or if any of you has experience installing Forms 11gR2 with Java 7 it might be great to know how to fix this error.  It might be worth mentioning that when I installed Forms and Weblogic with Java 6 I used exactly the same values, ports, options and paths.  The error appears like this in the installation logs and the process hangs there:
    XXX: adding task: oracle.as.install.classic.ca.standard.DomainProvisioningTask
      AdminServer port is 7001
      trying to connect to admuxas09.adminsrvad.sa.gov.au 7001
      Creating Weblogic Domain.
    oracle.as.provisioning.exception.ASProvWorkflowException
            at oracle.as.provisioning.weblogic.ASDomain._createDomain(ASDomain.java:2958)
            at oracle.as.provisioning.weblogic.ASDomain.createDomain(ASDomain.java:2476)
            at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:633)
            at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:391)
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
            at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
            at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
            at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
            at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
            at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:371)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
            at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
            at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:64)
            at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:160)
            at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
            at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
            at java.lang.Thread.run(Thread.java:662)
    oracle.as.provisioning.exception.ASProvisioningException
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:872)
            at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
            at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
            at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
            at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
            at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:371)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
            at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
            at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
            at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:64)
            at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:160)
            at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
            at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
            at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:686)
            at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:391)
            at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
            ... 13 more
    Cheers,
    Ivan Neva
    Oracle DBA

    Well if I got it to work with java 6 I'd leave it alone, to say the least. The elephant in the room is the certification matrix.
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html
    there's 2 issues, what jdk does forms on the server want? Bigger question, what JRE is acceptable on the client?
    You would surely want the jre to be 7 on the client. Regarding the jdk on the server, you could leave it as is IMHO.
    Note that there was a patch to 11gr2. In conclusion, be sure to check the cert matrix regarding what is certified for the jdk for the server.
    I think the matrices are saying that if you have forms 11.1.2.1.0 that you can use the jdk 7. but like I said the big issue is what can the client use?
    As I read the matrix I think it is saying you have to have 11.1.2.1.0 to use the jre 7 on the client.
    So I would say if you have 11.1.2.1.0 on the server you are good because it's not a problem to have the jdk 6 on the server, if not you have to apply the patch in order to enable the jre 7 on the client.

  • Easy Question, 'calling' a method with a number

    Here is a bit of code
    public class RollDice {
        public int x = 0;
        public RollDice(byte numberOfDice) {
            x = numberOfDice;
    }and another bit...
    public class RollDiceDemo {
        public static void main(String[] args) {
            RollDice currentRoll = new RollDice(7);
            System.out.println("Width of rectOne: " +
                    currentRoll.x);
    }So my issue is this, the code works if I change byte to int in 'public RollDice(byte numberOfDice) {' and I am guessing that is because ''7' defaults to an int in the call statement. How do I tell it to be a byte, I've tried RollDice(byte 7) with no luck.

    Encephalopathic wrote:
    MajorApus wrote:
    Because I am a newbie? What should I be doing instead?The class field "x" is an int. Why not use an int parameter in the constructor? What advantage is there to use a byte here?You realise now OP will just change x to be byte as well.

  • Calling CFC Method With AJAX

    Hello Guys , I am trying to call Component method using AJAX
    but its not working , Here is the Code i am using . In Code
    REC.OPEN is giving Trouble. Is this a Proper way to call Function ?
    function Process_Calendar(day,month,year,name){
    var hello = document.getElementById(name);
    hello.innerHTML = day+'<img
    src="../../Content/Graphics/images.jpg">';
    if (window.XMLHttpRequest)
    req = new XMLHttpRequest();
    else if (window.ActiveXObject){
    req = new ActiveXObject("Microsoft.XMLHTTP");
    req.open("getNoCache","BaseFunc.cfc?Method=Insertme&month="+month+"&day="+day+"&year="+ye ar+"&ms="+new
    Date().getTime(),true);
    req.send("");
    if ((req.readyState == 4) && (req.status == 200)){
    var arr = req.responseText;
    hello.innerHTML = arr;
    Thanks a Lot

    This might be a stupid question, but do you have the method's
    access set to
    remote? You are calling it via HTTP.
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technologies, Inc.
    =============================
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "flooker" <[email protected]> wrote in message
    news:e61jtu$o22$[email protected]..
    > Hello Guys , I am trying to call Component method using
    AJAX but its not
    > working , Here is the Code i am using . In Code REC.OPEN
    is giving
    > Trouble.
    >
    > function Process_Calendar(day,month,year,name){
    >
    > var hello = document.getElementById(name);
    > hello.innerHTML = day+'<img
    src="../../Content/Graphics/images.jpg">';
    >
    > if (window.XMLHttpRequest)
    > {
    >
    > req = new XMLHttpRequest();
    > }
    > else if (window.ActiveXObject){
    >
    > req = new ActiveXObject("Microsoft.XMLHTTP");
    >
    > }
    >
    >
    >
    >
    req.open("getNoCache","BaseFunc.cfc?Method=Insertme&month="+month+"&day="+day+
    > "&year="+year+"&ms="+new Date().getTime(),true);
    > req.send("");
    >
    > if ((req.readyState == 4) && (req.status ==
    200)){
    > var arr = req.responseText;
    > hello.innerHTML = arr;
    >
    > }
    > }
    >
    > Thanks a Lot
    >

Maybe you are looking for

  • How does one use airport express to extend a non-Apple wifi network?

    Hello. The wifi signal reaching my room shows good on my macbook but weak on my ipod touch. Therefore I want to pick it up on my airport express and extend/boost it. I have tried everything in the auto and manual methods of setup to do this, but the

  • Using iPod as an external hard drive

    hi! I'm planning on buying the iPod 80g. I was wondering if that iPod is good enough to be use as an external hard drive. Oh yeah! and I may transfere from mac to pc because my school got no mac :S thx for the help guy.

  • BadI problem in MIGO

    Dear Experts, I need to do some validation in MIGO tcode based on item Purchase Order and item. I have already identified badi MB_MIGO_BADI and methods CHECK_ITEM also. but problem is in CHECK_ITEM method having Item Number only as Input parameter. I

  • I can't adjust volume on my Macbook pro

    As showing on the picture above, I am not allowed to increase or decrease the volume of my external speaker. It just happened recently Also when I go into perferences, under audio, it will say the chosen device has no output control. I tried to searc

  • Imac won't start up n issues in single user mode

    Imac won't start up after long time 'frazing' of Firefox. Manual start up ended up in the grey screen forever'processing' icon. Had a look at other solutions, unable to enter safe mode. Someone mentioned to try single user mode and it went through ha