Java class problem

upload.png

Version of forms: Forms [32 bit] Version 6.0.8.25.2 (Production)

the JDK version:

Java version "1.7.0_51".

Java (TM) SE Runtime Environment (build 1.7.0_51 - b13)

The Client Java VM (build 24.51 - b03, mixed mode, sharing)

Well, I see several things.

1 forms 6, which has moreover been desupported for many years, is based on Java version 1.2/1.3, so try to use Java 7 with it, will probably cause problems.

2. as indicated in the error, 'java' is a reserved package name.  So, you might have to rename your package name of 'java' to something like 'myjava.

For our benefit, can you help me understand why you use 6 shapes and not a newer version as 11.1.2.2?

Tags: Oracle Development

Similar Questions

  • Problem with a query object back to a Java class ColdFusion

    Hello!
    I need to return a ColdFusion query object from a Java class using a set of JDBC (java.sql.ResultSet) results;

    I tried to move my result defined JDBC the constructor of the class coldfusion.sql.QueryTable with this code:


    ColdFusion code

    < cfset pra = createObject("java","QueryUtil").init () >
    < cfset newQuery = CreateObject ("java", "coldfusion.sql.QueryTable") >
    < cfset newQuery.init (pra.getColdFusionQuery ()) >

    My java class executes a DB query and returns a QueryTable

    Code Java (QueryUtil.java)

    Import coldfusion.sql.QueryTable; (For the QueryTable class CFusion.jar)
    import com.allaire.cfx //(cfx.jar for class Query used from QueryTable)
    public class QueryUtil
    {
    public static coldfusion.sql.QueryTable getColdFusionQuery (rs java.sql.ResultSet)
    {
    return new coldfusion.sql.QueryTable (SR);
    }
    }

    but when I run the cfm page and coldfusion server tries to run: '< cfset pra createObject("java","QueryUtil").init () = >' this error:

    Object instantiation Exception.
    An exception occurred when instantiating a java object. The cause of this exception was that: coldfusion/sql/QueryTable.

    If I try to run QueryUtil.java with eclipse it all works.

    Also, I tried to return a java.sql.ResultSet directly to coldfusion.sql.QueryTable.init () with failure.

    Do you know another solution?

    Thank you cf_dev2

    This is the solution:

    If you are using another jar file in your java.class, you must write the path of the jar in the jvm classpath:

    -Open C:\CFusionMX7\runtime\bin\jvm.config with a text editor;
    -Add at the bottom of the path full fo your jar files
    -Save
    -coldfusion restar

    I thing you can also add the classpath in coldfusion administrator, but I do not know how;

    I found only CF classpath.

    Hi all.

  • Class problem after replaced by the new Java class

    Hello

    I made a java class to a ColdFusion 7.02 Server (linux red hat 3.2)
    At the beginning, that it worked perfectly.
    Then I made a new version with some extra methods, succeeded him, restarted the service and empty the cache. Still, he finds none of the new methods, but it is not the 'old'. What can I do?

    Is there a way you can check the version of the file on the server .class? Human error perhaps?

    How you access to and use of the class? Care to post some code snippets?

  • Load java classes in ORACLE database error: () Ljava/util/list ;) catch_type not a subclass of Throwable

    Hello

    I tried to load java classes in the database using the loadjava tool, but I get a warning which causes an error when calling the java method of procedure PLSQL.

    ERROR: ORA-29552: check warning: java.lang.VerifyError: (class: method com/mq/RIMSmqToolsIn,: mqRead signature: () Ljava/util/list ;) catch_type not a subclass of Throwable)

    I think that it is a problem of dependencie for some missing java classes that need to be solved using loadjava tool but I could not understand what pot should be used and how is the correct command with laodjava?

    NB: I tried to use a jar file that contains java.util.List.class, but I still get the warning when loading

    Thank you very much

    ANTHONY

    Hello

    This error occurs when the dependency jar files loading in the java command loads separate.

    Load all the jar files in a command unique loadjava as below:

    loadjava, sys/eu1 - r u - v-f--s-grant public - genmissing xyz.jar xyz1.jar

    Before loading jar files drop them in the database.

    Thanks and greetings

    Vincent

  • pl/sql appellant java class member function obtains ora-00932 in 11g.

    Call a member function of class of java from a pl/sql script, I get an error ora-00932.

    ORA-00932: inconsistent data types: waiting for an IN argument in position 1 which is an instance of an O

    convertible to an instance of a user defined class Java got a type of Oracle that could not be converted

    The code works fine when the java function is declared static.   However, since there could be thousands of users hitting the function at the same time and there is no instance of the object, I wasn't sure if it would be a matter of how oracle manages memory for each user in a session, if it would not be a problem, I can go forward with this approach.   However, I have greatly simplified this for an example that reproduces the problem.

    Create the oracle type:

    CREATE OR REPLACE TYPE MyObject AS OBJECT

    (

    col1Data VARCHAR2 (10),

    MEMBER FUNCTION createData

    RETURN VARCHAR2 AS LANGUAGE JAVA

    NAME "java.lang.String return MyObject.createData ().

    );

    Java code:

    CREATE OR REPLACE AND FIX JAVA SOURCE NAMED 'MyObject' AS

    import java. IO;

    public class MyObject

    {

    private String col1Data;

    public void createData)

    {

    System.out.println ("col1:" + col1Data);

    }

    }

    Java function call vai pl/sql function:

    FUNCTION to CREATE or REPLACE fn_myobject

    (col1 IN varchar2)

    RETURN VARCHAR2

    AS

    p_rc varchar2 (100);

    myObj MyObject;

    BEGIN

    myObj: = new MyObject (col1);

    p_rc: = myObj.createData ();   -This line gets an error 00932

    RETURN p_rc;

    END;

    /

    And finally, the script from sqlplus to test:

    Set serverout

    call dbms_java.set_output (50);

    Set line 120

    declare

    VARCHAR2 (64) RC: = ";

    R1 varchar2 (64): = 'abc ';

    Start

    RC: = fn_myobject (r1);

    end;

    /

    I tried all sorts of things without success.   Any ideas on this would be most appreciated.  It is once again, 11g.

    Thank you.

    MarkF says:

    If you go back to the example code I posted, it is mapping a java class oracle object.

    No, it isn't.

    Your example simply sets an Oracle object type whose member createData function is implemented in Java.

    The fact that the implementing class has the same name does not have a direct mapping between the class and the type of Oracle.

    The important part to read and understand in the link I posted is:

    A call specification outlines the top level of an Oracle database Java method entry point. So, you can publish only public static methods.

    However, there is an exception. You can publish instance methods as members of an SQL object type methods.

    You are in the first case.

    To be in the exceptional cases and be able to publish instance methods, the Java class must implement SQLData.

    See the latest example here:

    https://docs.Oracle.com/database/121/JJDEV/chsix.htm#JJDEV13273

    Adapted to your example:

    CREATE OR REPLACE AND compile JAVA SOURCE NAMED "MyObject" AS
    import java.sql.*;
    
    public class MyClass implements SQLData
    {
      // Implement the attributes and operations for this type.
      private String col1Data;
    
      public String createData ()
      {
          System.out.println ("col1: " + col1Data);
          return col1Data;
      }
    
      // Implement SQLData interface.
      String sql_type;
    
      public String getSQLTypeName() throws SQLException
      {
        return sql_type;
      }
    
      public void readSQL(SQLInput stream, String typeName) throws SQLException
      {
        sql_type = typeName;
        col1Data = stream.readString();
      }
    
      public void writeSQL(SQLOutput stream) throws SQLException
      {
        stream.writeString(col1Data);
      }
    }
    /
    
    CREATE OR REPLACE TYPE MyObject AS OBJECT
    (
      col1Data  VARCHAR2(10),
      MEMBER FUNCTION createData
              RETURN VARCHAR2 AS LANGUAGE JAVA
        NAME 'MyClass.createData() return java.lang.String'
    );
    /
    

    Test:

    SQL> exec dbms_java.set_output(1000)
    
    PL/SQL procedure successfully completed.
    
    SQL> set serverout on
    SQL>
    SQL> select MyObject('ABC').createData() from dual;
    
    MYOBJECT('ABC').CREATEDATA()
    --------------------------------------------------------------------------------
    ABC
    
    col1: ABC
    
  • java.lang.NoClassDefFoundError when calling a java class of BPEL

    Hello

    I'm calling a java class to convert JSON to XML using BPEL. I imported all the necessary jar files in the project and compile successfully done.

    But while running, I get the java.lang.NoClassDefFoundError: net/sf/json/JSON error.

    For this, I placed all the necessary pots under the path FUSION_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/ and restarted the server.

    But still, I get the same error when running.

    A I missed a step? Let me know the procedure to solve this problem.

    I have to run ant or change the file manifests after placing the pot?

    in a site I find that we must place the pots under < DOMAIN HOME > directory / lib. Is this correct?

    We use SOA suite 11.1.1.6.

    Thank you

    Terry

    Hello Terry,

    I'm not quite sure of what exactly would be the problem. Please go through this link and see if it helps: integrating Java and Java EE Code in a BPEL process

    Kind regards

    Karan

    Oracle Fusion Middleware Blog

  • How to write several unique java class in the java file?

    Hello
    I use Jdev 11.1.2.0.0.

    When I write the java class, I wrote in my file of multiple class. This time Jdeveloper advise that, move this class into distinct java file.
    But I don't want to go, without moving this class it works perfectly. But it is what tells the error indicator 'red '. How to solve this problem.

    Kind regards
    Rami

    Hello

    its an audit rule that is facing you. You can go to tools-->--> Audit preferences and disable it if you are more disturbed.

    Frank

  • How to reuse the java class in several applications

    Hi friendz,.
    Please help me...
    I use JDEV 11.1.2.2.0 version.

    My problem is that I want to reuse the same java class in many applications.
    How can I do that...
    I hope your help...
    -Rude-

    Compile the Java class.
    Package Java class in a POT as suggested in the other post.
    Include the JAR in the classpath.
    Import the class in the other class of the application.

  • How to make java classes valid

    Hello

    I have a problem with the Java objects in the database that went to the INVALID state after updating the database.

    How to make all Classes Java not valid to VALID without loading again using loadjava utility.

    is it possible to make them VALID?


    Select count (1) in object where object_type as "JAVA % ' and STATUS = 'INVALID ';

    It shows me the number of invalid java objects in the database.

    Thank you
    Kiran
    alter java source OWNER."JavaClassName" compile;
    

    or

    alter java class OWNER."JavaClassName" compile;
    
  • import java class of forms 6i

    Dear people
    I want to import the very simple java class of forms 6i, I went to programs then I choose to import java classes and then it gives me the error THAT BDP-UJ1001 could not create the Java virtual machine.

    Please tell me how to solve the problem.
    Yasser

    This option only works for the deployed Web Forms 6i version. Who does not work with C/S mode, because the C/S mode does not use Java at all.

    François

  • Know Java classes and subclasses

    I m working with Forms & Report 10 gr 2.

    I m working with Forms & year Report 1,997. Normally, I flip between different application 8 or 9. My applications now appear a bit old-fashioned. Looking to solve this problem, I found an article by Grant Ronald, I think well know in this forum and it solved me a question that I post here. In this article Grant said:

    Extend the user interface forms
    So, how can you achieve the balance to give your
    Application Forms of the makeover to match the 21
    century without having to embark on an extensive program of
    refurbishment or recycling of the user?
    The answer lies in the architecture of Oracle Forms.
    For a form that runs via a browser, application the
    the user interface is rendered as a Java applet. This Java applet
    includes a number of officials of the Java classes
    each of the components of UI forms made. Magic
    lies in the fact that, since each component of the interface user is, indeed,
    a Java class, it can be subclassed. This means that you can
    create your own component that does all the
    component base, but with your own code to change
    the functionality or appearance.

    Really a piece of gold, in this regard, it will give you the key can change the forms look & feel.

    But, now, come the questions, how can I do this? How do I know what forms of using classes to display a button for example, what I need to do for subclasses?
    is there an example or documentation that can help me? If yes ¿where? One of the gurus can give me some links to explore this?

    Thank you & considers everyone.

    Look at this.

    http://fdtool.free.fr/LAF/doc/Oracle_Forms_Look_and_Feel_project.htm

    It is not supported by Oracle, but is widely used. All support for its use will come from its web page.

  • Java Calendar problem

    Hello

    I have problems with the Java Calendar class:

    Problem 1:
    I try to fix the Java calendar date, but an exception is thrown. The issues dates are 19210501 and 19420403 (YYYYMMDD) to midnight (time of day = 0, minutes = 0, seconds = 0, milliseconds = 0). Setting other dates between 15000101 and 22000101 work OK. Exception is thrown when the calendar calculates new values. Note that this exception is NOT thrown if I don't have hour / minute / second fields!

    Problem 2:
    I put the Java specific date schedule has and convert that date to timeInMillis. Then I put this timeInMillis for calendar and convert them to date B. For some dates has! = B. problematic dates are 19210501 and 19420403 (YYYYMMDD) to midnight (time of day = 0, minutes = 0, seconds = 0, milliseconds = 0). Setting other dates between 15000101 and 22000101 work OK.

    These problems occur if timeZone = "Europe/Helsinki. Problem does not occur if timeZone = "EET" or "GMT".

    Example code for this issue is below:
    ==================
    package z_javaexperiments5;

    import java.util.Calendar;
    import java.util.TimeZone;

    public class CalendarProblem {}

    Public Shared Sub main (String [] args) {}

    Main CalendarProblem = new CalendarProblem();

    System.out.println ("RunSetCalendars");

    Time zone time zone = TimeZone.getTimeZone ("GMT");
    main.runSetCalendars (time zone, L 19420403000000000);
    main.runSetCalendars (time zone, L 19210501000000000);
    main.runSetCalendars (time zone, L 19210502000000000);

    zone = TimeZone.getTimeZone ("EET");
    main.runSetCalendars (time zone, L 19420403000000000);
    main.runSetCalendars (time zone, L 19210501000000000);
    main.runSetCalendars (time zone, L 19210502000000000);

    zone = TimeZone.getTimeZone (' Europe/Helsinki');
    main.runSetCalendars (time zone, L 19420403000000000);
    main.runSetCalendars (time zone, L 19210501000000000);
    main.runSetCalendars (time zone, L 19210502000000000);

    }

    Calendar setCalendar1 (time zone time zone, long dateTimeYYYYMMDDHHMMSSsss) {}
    Calendar calendar = Calendar.getInstance (timeZone);
    Calendar.Clear ();
    System.out.println ("setCalendar1 timeZone =" + calendar.getTimeZone () .getID ());

    year int = (int) (dateTimeYYYYMMDDHHMMSSsss / 10000000000000L);
    int month = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 10000000000000) / 100000000000 L)-1;
    Day = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 100000000000) int / 1000000000);
    int h = (int) ((dateTimeYYYYMMDDHHMMSSsss % 1000000000) / 10000000);
    int min = (int) ((dateTimeYYYYMMDDHHMMSSsss % 10000000) / 100000);
    dry int = (int) ((dateTimeYYYYMMDDHHMMSSsss % 100000) / 1000);
    int mSec = (int) (dateTimeYYYYMMDDHHMMSSsss % 1000);
    System.out.println (year + "." + (month + 1) + "." + day + "" + hour + ":" + min + ":" + dry + "." + mSec);
    Calendar.Set (year, month, day);
    Calendar.Set (Calendar.HOUR_OF_DAY, time);
    Calendar.Set (Calendar.MINUTE, minutes);
    Calendar.Set (Calendar.SECOND, dry);
    Calendar.Set (Calendar.MILLISECOND, mSec);
    calendar.setLenient (false); Reject invalid values

    try {}
    Calendar.get (Calendar.SECOND); Recalculate values
    } catch (IllegalArgumentException e) {}
    throw new RuntimeException ("Invalid argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long =" + dateTimeYYYYMMDDHHMMSSsss + "message of Exception =" + e.getMessage ());
    }

    return calendar;
    }

    Calendar setCalendar2 (time zone time zone, long dateTimeYYYYMMDDHHMMSSsss) {}
    Calendar calendar = Calendar.getInstance (timeZone);
    System.out.println ("setCalendar2 timeZone =" + calendar.getTimeZone () .getID ());
    Calendar.Clear ();

    year int = (int) (dateTimeYYYYMMDDHHMMSSsss / 10000000000000L);
    int month = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 10000000000000) / 100000000000 L)-1;
    Day = (int) ((dateTimeYYYYMMDDHHMMSSsss % L 100000000000) int / 1000000000);
    int h = (int) ((dateTimeYYYYMMDDHHMMSSsss % 1000000000) / 10000000);
    int min = (int) ((dateTimeYYYYMMDDHHMMSSsss % 10000000) / 100000);
    dry int = (int) ((dateTimeYYYYMMDDHHMMSSsss % 100000) / 1000);
    int mSec = (int) (dateTimeYYYYMMDDHHMMSSsss % 1000);
    System.out.println ("Initial dateTime =" + year + "." + (month + 1) + "." + day + "" + hour + ":" + min + ":" + dry + "." + mSec "");
    Calendar.Set (year, month, day);
    If (hour! = 0)
    Calendar.Set (Calendar.HOUR_OF_DAY, time);
    on the other
    Calendar.Clear (Calendar.HOUR_OF_DAY);
    If (min! = 0)
    Calendar.Set (Calendar.MINUTE, minutes);
    on the other
    Calendar.Clear (Calendar.MINUTE);
    If (s! = 0)
    Calendar.Set (Calendar.SECOND, dry);
    on the other
    Calendar.Clear (Calendar.SECOND);
    If (mSec! = 0)
    Calendar.Set (Calendar.MILLISECOND, mSec);
    on the other
    Calendar.Clear (Calendar.MILLISECOND);
    calendar.setLenient (false); Reject invalid values

    try {}
    Calendar.get (Calendar.SECOND); Recalculate values
    } catch (IllegalArgumentException e) {}
    throw new RuntimeException ("Invalid argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long =" + dateTimeYYYYMMDDHHMMSSsss + "message of Exception =" + e.getMessage ());
    }

    long millis = calendar.getTimeInMillis ();
    System.out.println ("Initial dateTime =" + millis);

    Calendar = Calendar.getInstance (timeZone);
    Calendar.Clear ();

    calendar.setTimeInMillis (millis);
    an2 int = calendar.get (Calendar.YEAR);
    Month2 = calendar.get (Calendar.MONTH) int;
    day 2 = int calendar.get (Calendar.DAY_OF_MONTH);
    time2 int = calendar.get (Calendar.HOUR_OF_DAY);
    min2 int = calendar.get (Calendar.MINUTE);
    sec2 int = calendar.get (Calendar.SECOND);
    mSec2 int = calendar.get (Calendar.MILLISECOND);
    System.out.println ("Final dateTime =" + an2 + '. ' + (Month2 + 1) + "." + day2 + "" + time2 + ":" + min2 + ":" + S2 + "." + mSec2 "');
    If ((année! = AN2) |) (month! = Month2) | (day! = day2) | (time! = time2) | (min! = min2) | (s! = S2) | (mSec! = mSec2))
    System.out.println ("setCalendar2 failed, dates are not equal");
    return calendar;
    }

    void runSetCalendars (time zone time zone, long dateTimeYYYYMMDDHHMMSSsss) {}
    System.out.println ("");
    System.out.println ("runSetCalendars dateTimeYYYYMMDDHHMMSSsss =" + dateTimeYYYYMMDDHHMMSSsss);
    try {}
    setCalendar1 (time zone, dateTimeYYYYMMDDHHMMSSsss);
    } catch (RuntimeException e) {}
    System.out.println ("failed to setCalendar1, dateTimeYYYYMMDDHHMMSSsss =" + dateTimeYYYYMMDDHHMMSSsss + "Exception ="+ try () ");
    }

    Calendar calendar = null;
    try {}
    calendar = setCalendar2 (time zone, dateTimeYYYYMMDDHHMMSSsss);
    long timeInMillis = calendar.getTimeInMillis ();
    Calendar.Clear ();
    calendar.setTimeInMillis (timeInMillis);
    } catch (RuntimeException e) {}
    System.out.println ("failed to setCalendar2, dateTimeYYYYMMDDHHMMSSsss =" + dateTimeYYYYMMDDHHMMSSsss + "Exception ="+ try () ");

    }
    }

    }
    ==================

    The program output is below:
    ==================
    RunSetCalendars

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19420403000000000
    setCalendar1 timeZone = GMT
    1942.4.3 0:0:0.0
    setCalendar2 timeZone = GMT
    Initial DateTime = 1942.4.3 0:0:0.0
    Final DateTime = 1942.4.3 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210501000000000
    setCalendar1 timeZone = GMT
    1921.5.1 0:0:0.0
    setCalendar2 timeZone = GMT
    Initial DateTime = 1921.5.1 0:0:0.0
    Final DateTime = 1921.5.1 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210502000000000
    setCalendar1 timeZone = GMT
    1921.5.2 0:0:0.0
    setCalendar2 timeZone = GMT
    Initial DateTime = 1921.5.2 0:0:0.0
    Final DateTime = 1921.5.2 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19420403000000000
    time zone = EET setCalendar1 schedule
    1942.4.3 0:0:0.0
    time zone = EET setCalendar2 schedule
    Initial DateTime = 1942.4.3 0:0:0.0
    Final DateTime = 1942.4.3 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210501000000000
    time zone = EET setCalendar1 schedule
    1921.5.1 0:0:0.0
    time zone = EET setCalendar2 schedule
    Initial DateTime = 1921.5.1 0:0:0.0
    Final DateTime = 1921.5.1 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210502000000000
    time zone = EET setCalendar1 schedule
    1921.5.2 0:0:0.0
    time zone = EET setCalendar2 schedule
    Initial DateTime = 1921.5.2 0:0:0.0
    Final DateTime = 1921.5.2 0:0:0.0

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19420403000000000
    setCalendar1 timeZone = Europe/Paris
    1942.4.3 0:0:0.0
    setCalendar1 failed, dateTimeYYYYMMDDHHMMSSsss = Exception 19420403000000000 = java.lang.RuntimeException: bad argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long = Exception 19420403000000000 message = HOUR_OF_DAY
    setCalendar2 timeZone = Europe/Paris
    Initial DateTime = 1942.4.3 0:0:0.0
    Final DateTime = 1942.4.3 1:0:0.0
    setCalendar2 failed, dates are not equal

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210501000000000
    setCalendar1 timeZone = Europe/Paris
    1921.5.1 0:0:0.0
    setCalendar1 failed, dateTimeYYYYMMDDHHMMSSsss = Exception 19210501000000000 = java.lang.RuntimeException: bad argument: cannot convert long dateTimeYYYYMMDDHHMMSSsss, long = Exception 19210501000000000 message = MINUTE
    setCalendar2 timeZone = Europe/Paris
    Initial DateTime = 1921.5.1 0:0:0.0
    Final DateTime = 1921.5.1 0:20:8.0
    setCalendar2 failed, dates are not equal

    runSetCalendars dateTimeYYYYMMDDHHMMSSsss = 19210502000000000
    setCalendar1 timeZone = Europe/Paris
    1921.5.2 0:0:0.0
    setCalendar2 timeZone = Europe/Paris
    Initial DateTime = 1921.5.2 0:0:0.0
    Final DateTime = 1921.5.2 0:0:0.0
    ==================

    Why the program fails when timeZone = ' Europe/Helsinki '?

    Could it be related to changes in time zone that took place at that time?

    http://www.timeanddate.com/worldclock/clockchange.html?n=101&year=1921

  • How to call java class/method control-flow-case

    Hello everyone, I'm newbie...
    I have little problem managing about control-flow-case adfc-file config.Xml. in this case i'want to call control-flow-case of java class/method (manage-bean)

    If someone help me solve this problem...?

    THX cordially
    agungdmt...: D

    If you have the control-flow-case defined between Page1.jspx to Page2.jspx as "goToPage2."
    You can use the code snippet in the bean managed in Page1.jspx

    FacesContext context = FacesContext.getCurrentInstance ();
    context.getApplication () .getNavigationHandler () .handleNavigation (context,
    NULL,
    "goToPage2");

    Thank you
    Nini

  • How to pass values from a Java class to a class of JavaFX?

    Hi Forum,
    I get nuts on this problem:
    I designed a program with Java and JavaFX classes. JavaFX classes handle the GUI and Java classes mix program logic. I think that's the way it is supposed to be. My program calculates something, so in my JavaFX GUI, I have a button to run this calculation. It's not a problem to call the start function calculation (which is in my Java class) on click of a button. But now I want to display the result of this calculation in my GUI. I can't just simply pass the result to my class of JavaFX GUI. I tried to import the JavaFX class in my Java class to call a set function, but I can't import them with the import statement. So my question is, how do I make the results to my GUI? What is the right way to do it?
    I hope someone can help, thanks in advance :)

    Two ways, either:

    -your JavaFX class asks the Java class for the result once the task completed in exactly the same way he instantiated to start the task. Of course, you should regularly check the completion of the task (a mere PauseTransition).

    - or your JavaFX class implements a Java INTERFACE and your Java class accepts (whether through the method or constructor) a variable of type of this interface. For example, you can set a reference to the subject of JavaFX itself in the Java object using the interface.
    When the task is completed, your Java class calls a method defined in the INTERFACE to set the result in the object of JavaFX.

    In addition, JavaFX 1.3.x provides an API to start asynchronous and be notified when a task is completed in the javafx.async package that allows you to run the task of basic Java (you mind that the class is named...) JavaTaskBase, see also the RunnableFutre interface) in a separate thread.

  • How to pass an argument to a standalone java class JDeveloper

    For the experienced:

    In JDeveloper when you write a java class with a main() method that takes no arguments, you just click with the right button on the java file and choose run to run the program. But suppose the main() method takes arguments, how to move your arguments to the program? This is especially a problem I use the studio version of JDeveloper (10.1.3.4 and 11.1.1.3 Versions) that each uses the version of the JDK included with, rather the JDK (which is yet another different version) installed at the level of the OS on the PC.

    Thanks a lot for your help!


    Newman

    Hello

    If you mean how to pass arguments in JDeveloper:
    Tools > Project Properties > run/debug > change the default run Configuration (or create a new) > settings start > program Arguments - here you can set arguments

    Kind regards
    Branislav

Maybe you are looking for

  • iMac Mail.app - sent mail deposited in the wrong folder for sent mail

    Have 3 on my iMac 27 "ElCapitan 10.11.2 iMAP e-mail accounts.  All 3 accounts synchronize very well on my iPad and iPhone. The problem is in the folder of mail sent on my iMac.  My iMac Mail.app sent the file structure has a main folder "sent", follo

  • Restore problem

    After a disastrous accident (office a6050y) which has corrupted the registry I got a message to restore the original state. And an offer to restore my files that I made. It was a program of HP. Now, I have installed Windows 7 and have a problem, try

  • Computer runs continuously check disk and automatically goes into power saving mode.

    2 days ago my computer was working fine, then yesterday he wanted to run the check disk at startup upward. Finished, he found no errors and proceeded to vista loading which then stated that he was going to power saving mode, the screen went black and

  • Problem with burning a DVD using Windows DVD Maker

    Im trying to burn a DVD and I've imported all the files I want to burn but when I click on burn says DVD burner not found - make sure your DVD burner is connected and installed and try again. I've only used the week last to burn a DVD! Anyone got any

  • Access controlled while caputuring sound exception

    Hello I'm getting "net.rim.device.api.system.ControlledAccessException" when I am tring to capture audio on the device, here is my code try { // Create a Player that captures live audio. _player = Manager.createPlayer("capture://audio"); _player.real