Possible forms of main function

i was always thinking that
public static void main(String[] args)would be the only correct form of the main function. but i noticed that
public static final void main(String[] args)worked too. i searched the internet and found even such things like:
public static final void main(String argument)
public static final void main()
private static final void main(String[] args)but in the java language specs there is nothing about these forms!
could somebody bring light in here???

You can name a method any way you like, for instance
public static int main(int argc, char[][] argv) {
public voir MAIN() {
public static final JFrame main(JComponent c) {
etc...
but the JVM will look for a method with the signature
public static void main(String[] args) {
when you execute 'java SomeClass'
the method can be final and you can change the name of the parameter, that's all.
Regards

Similar Messages

  • Is It Possible to use Call Function in update task in perform on commit

    Hi Friends,
    I have to send an email once the commit work is done. so i am writing code like this,
    Perform send_email on commit.
    form send_email.
    call function 'SO_NEW_DOCUMENT_SEND_API1' in update task
    endform.
    endform.
    .... ( Some other code)
    commit work.
    But, I am getting error saying Update task is not possible. Please suggest me how to solve this.
    Thanks in Advance,
    Phani.

    Hi Phani,
          Check whether <b>COMMIT Work</b> has be performed. I think this might be the problem.
    Regards,
    Prashanth

  • Jre hangs/freeze at digital signature dialog (oracle.forms.engine.Main)

    hi,
    we are using webforms (application server 11).
    when a client starts up a form in the browser the dialog for accepting the digital signature (oracle.forms.engine.Main) appears. in this dialog wether a button can be klicked nor the checkbox (always trust...) can be checked. still this dialog can be moved.
    what's the reason for that?
    we tried different jre versions (1.6 u12 - u20) and also patch 9553040 (jrefb-6u20-rev-b05-windows-i586.exe) doesn't work - the same problem appears.
    regards,
    matthias

    It does!
    I [read this paper|http://forms.pjc.bean.over-blog.com/ext/http://www.oracle.com/technology/products/forms/pdf/SigningJint13.pdf] before, years ago the first time. It's from *2002* and refers to JInitiator. And I read this paper again. But I stopped around page 13, reading
    +"PROBLEMS WITH MULTIPLE SIGNING IDENTITIES+
    +There is currently a restriction within Oracle9i Forms. If a Forms application is+
    +started within JInitiator or the Sun Java Plug-in, which uses code signed with+
    +multiple certificates ... This restriction will be lifted in a later release of Forms ...."+
    Not one of my best ideas. Notice, Sun Plug-in is mentioned and +8 years+ might not be enough, obviously.
    Reason behind the "re-appearance" of the problem with forms 11g is that the forms jars (including webutil) are now signed with an VeriSign certificate what was not the case with 10g. Downloading jacob.jar by your own, you get an unsigned jar file. Signing this, as you were used in 10g leads to the second signing identity and the freezing problem.
    But let's see how we could solve the problem, for the moment, perhaps for the next 8 years. We
    . took solution path 2 out of the aove cited paper (Register Your Custom Signing Certificate Separately).
    . rename jacob.jar to jy_jacob.jar (we do not want to interfere with other forms application of other companies also using webutil)
    . add the registration applet code as described in the paper to jy_jacob.jar
    . sign jy_jacob.jar.
    . [to be on the save side we repeated these steps for all our jar files, necessary for the application]
    . rename webutiljpi.htm to webutiljpijy.htm
    . modify webutiljpijy.htm by adding applet registration section before webutil registration. This reads like
    <!-- Registration applet definition (start) -->
    <OBJECT classid="%jpi_classid%"
    codebase="%jpi_codebase%"
    WIDTH="0"
    HEIGHT="0"
    HSPACE="0"
    VSPACE="0">
    <PARAM NAME="TYPE" VALUE="%jpi_mimetype%">
    <PARAM NAME="CODEBASE" VALUE="%codebase%">
    <PARAM NAME="CODE" VALUE="com.joynit.forms.applet.RegisterCertificateApplet">
    <PARAM NAME="ARCHIVE" VALUE="%archive%,%webUtilArchive%" >
    <COMMENT>
    <EMBED SRC="" PLUGINSPAGE="%jpi_download_page%"
    TYPE="%jpi_mimetype%"
    java_codebase="%codebase%"
    java_code="com.joynit.forms.applet.RegisterCertificateApplet"
    java_archive="%archive%,%webUtilArchive%"
    WIDTH="1"
    HEIGHT="1"
    HSPACE="0"
    VSPACE="0"
    >
    <NOEMBED>
    </COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!-- Registration applet definition (end) -->
    . modify formsweb.cfg so that webutiljpijy.htm and jy_jacob.jar are used (original settings as comments below)
    baseHTMLjpi=webutiljpijy.htm
    #baseHTMLjpi=webutiljpi.htm
    archive=frmall.jar,iText-5.0.3.jar,vzg_grafik.jar,vzg_images.jar,vzg_netz.jar,jy_pdfutil.jar
    #archive=frmall.jar
    WebUtilArchive=frmwebutil.jar,jy_jacob.jar
    #WebUtilArchive=frmwebutil.jar,jacob.jar
    And then, after flushing the jar cache, success! No freezing. It was possible to confirm the certifcates and to start the application.
    Thnx to Mia Urman and the oracle forms communitiy on [http://oracleformsinfo.wordpress.com/] , who gave me the tip... There is another, easier solution.
    Never set one of the original oracle jar-Files on pole position (1st position) in one auf the archive parameters. This leads to hanging.
    Put one of your self-signed jar-Files in front and let the oracle jars follow. The forms application will start properly.
    It work with 3 different signing authorities, also. What makes hope for 4, and so on.
    Edited by: KRodler on 15.03.2012 11:07

  • Is is possible to call a function or method before JVM exits ??

    Hi All,
    Is is possible to call a function or method before JVM exits where System.exit() is used.
    I am calling a program where System.exit is used. i need to call a function before the JVM exits.
    Please help me.
    Thanks,
    J.Kathir

    How to call the method ? Did i have to call the shudown hooks method in my main class ?
    Is it possible to have in subclass?
    is the below code is correct ? i am calling a class before System.exit is called....
    java.lang.Runtime.getRuntime().addShutdownHook(...My Own Class()....)

  • In my smart form why main's content din't display in print preview?Plz help

    In my smart form why main's content din't display in print preview?Plz help me.
    Regards
    Indu
    Moderator message: too vague, help not possible, please describe problems in all technical detail when posting again.
    Edited by: Thomas Zloch on Jan 5, 2011 3:27 PM

    make sure u've specified da style in output options of text element as
    TIMES 10 in style field and select da desired paragraph and charcter format in general attributes tab of da text element.activaTE AND CHECK.
    if problem still persists u can ask again.
    reward points if it helps.

  • Is it possible to perform doDML functionality in ViewObject

    Hello,
    In Oracle Forms to ADF conversion, different forms is sharing same entity object. As a result,
    different pre-Insert, Pre-update, etc. is requied.
    Is is possible to perform doDML() functionality in ViewObject instead of the Entity Object?
    Thanks

    No, but what you could do is create a transient attribute in the EO, of which each VO sets a different value. Thus when the doDML method is called, it could check the value of the transient attribute, and execute different functionality based on the transient.
    CM.

  • SAPSCRIPT: Is a DO/ENDO STMT Possible in the MAIN?

    SAPSCRIPT: Is a DO/ENDO STMT Possible in the MAIN?
                      Thank-You.
    Message was edited by:
            Tom M.
    Message was edited by:
            Tom M.

    I assume that you do not want to make any change in the Driver program. I am not sure if DO ENDDO is possible in Layouts but you can call a subroutine in the layout. You need to code this in a different subroutine pool program and call in your layout. This thread gives an example of how to call a FORM routine in a SAP Layout.
    Perform in Script

  • 10g R2 AS + JPI = oracle.forms.engine.Main not found

    Greetings,
    we have a Oracle Forms & Report Services 10.1.2.0.2 installation on a RHEL box. There's need to implement JPI instead of Jinitiator, but I have encountered some problems - I have followed the instructions for dynamic JPI listed in Doc ID 368218.1. The client is XP SP3 with JRE 1.6.0_02 installed, still the end result is:
    network: Cache entry not found [url: http://xxx:7777/forms/java/oracle/forms/engine/Main.class, version: null]
    network: Connecting http://xxx:7777/forms/java/oracle/forms/engine/Main.class with proxy=DIRECT
    network: Cache entry not found [url: http://xxx:7777/forms/java/oracle/forms/engine/Main.class, version: null]
    network: Connecting http://xxx:7777/forms/java/oracle/forms/engine/Main.class with proxy=DIRECT
    load: class oracle.forms.engine.Main not found.
    java.lang.ClassNotFoundException: oracle.forms.engine.Main
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    basic: Exception: java.lang.ClassNotFoundException: oracle.forms.engine.Main
    I have checked ownership/permissions for frmall.jar, but they seem fine (there was a note pointing out possible ownerhsip issues).
    Any ideas/suggestions?
    Jan

    I checked 578759.1 and yes, the classid and codebase parameters seem fine.
    What happens when I open http://xxx:7777/forms/frmservlet?config=jpi is:
    - java 6 logo appears, but
    - is replaced by an X, the status bar says "Applet oracle.forms.engine.Main notinited"
    - the status bar says "Loading Java Applet Failed..."
    The whole Java Console output is:
    Java Plug-in 1.6.0_02
    Using JRE version 1.6.0_02 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\myuser
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    load: class oracle.forms.engine.Main not found.
    java.lang.ClassNotFoundException: oracle.forms.engine.Main
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more

  • Error oracle.forms.engine.Main not found.java.lang.ClassNotFoundException

    Hi all,
    I tried to update oracle_logo.gif in forms jar which is in f90all_jinit jar. I placed my icon in forms\oracle\forms\icons and renamed it as oracle_logo.gif while removing the existing one. Then I did jar the forms and placed that in f90all_jinit and again did jar f90all_jinit. Then, I placed this in ORACLE-HOME/forms90/java. When I tried to run the form...the form could not open and the java console shows this..
    Loading http://<MACHINE_NAME>:8888/forms90/java/f90all_jinit.jar from JAR cache
    load: class oracle.forms.engine.Main not found.java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.     at sun.applet.AppletClassLoader.getBytes(Unknown Source)     at sun.applet.AppletClassLoader.access$100(Unknown Source)     at sun.applet.AppletClassLoader$1.run(Unknown Source)     at java.security.AccessController.doPrivileged(Native Method)     at sun.applet.AppletClassLoader.findClass(Unknown Source)     at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     at sun.applet.AppletClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     at sun.applet.AppletClassLoader.loadCode(Unknown Source)     at sun.applet.AppletPanel.createApplet(Unknown Source)     at sun.plugin.AppletViewer.createApplet(Unknown Source)     at sun.applet.AppletPanel.runLoader(Unknown Source)     at sun.applet.AppletPanel.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)
    Can anyone guide me on how to get rid of this error ? Strange thing is that I've removed that f90all_jinit.jar and placed back the existing one (I took backup). But still it's showing the same error and not opening the form. I could and can not do anything without this error corrected.
    Please suggest me as soon as possible...
    thank you
    madhu.

    Dear Friends,
    I was also facing the same problem. to solve this, i have uninstalled Oracle Jinitiator. Cleared all the temporary internet files & cookies. Then while running the form, when it asks to install JInitiator, i have specified a different path for jinitiator, For Example, By default it asks for C:\programfiles, i have changed it to c:\manish directory.
    This has solved my problem. Probably this also help you.
    Regards,
    Manish Trivedi,
    India

  • Is it possible to define a function in the MathScript Node

    Is it possible to define a function in the MathScript Node

    You can not define a function inside of a MathScript Node, but only because it isn't necessary. The way custom functions work in MathScript is that they are saved in .m files located in paths in the MathScript path list. When the MathScript compiler receives a function that it doesn't recognize, then it searches for it in the path list, and upon finding it, compiles and loads the function. You can specify these search paths manually by going to File>>MathScript Preferences from the MathScript Window or dynamically by using the path() command within a script.
    To answer your original question, if you would like to create custom functions dynamically within a VI, then you can simply build your custom functions using strings and then save them to an ASCII file with the extension .m. You could either save the file to a path already in the MathScript path list or you could dynamically specify the path by passing the path into a MathScript Node as a string and by using the path() command at the beginning of your script to set it.
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • Does ExtendScript have a concept of "main" function/method like when script is included as a library

    I was just wondering whether ExtendScript has any concept like a main method, whereby if the current script is included by another script like a library import it will not execute this main function/method and only execute it when the script is run directly.
    Similar to Java's main() method and Python's __main__.
    If not, is there a workaround to mimic such behavior generically?

    I cannot reproduce this.  Can you create a very simple repro of this issue and post to OneDrive?
    Jeff Sanders (MSFT)
    @jsandersrocks - Windows Store Developer Solutions
    @WSDevSol
    Getting Started With Windows Azure Mobile Services development?
    Click here
    Getting Started With Windows Phone or Store app development?
    Click here
    My Team Blog: Windows Store & Phone Developer Solutions
    My Blog: Http Client Protocol Issues (and other fun stuff I support)

  • How to pass argument in main function ?

    How to pass arguments in main function of one class from another class ?
    I don't want to pass argument from command prompt.
    I want to try something like this -
    class Test{
    public static void main(String args[]){
    for(int i=0;i<args.length;i++)
         System.out.println(args);
    class Fun{
    public static void main(String args[]){
         Test t=new Test("Hello","good bye");
    when i run Fun class it gives error.
    Suggest me how can i do that.

    In Fun class main method does not take arguments that is fine. In Test class instead of main method you can have constructor to take input parameters as suggested by BalusC
    However, if you want to make your existing code work, you can call (though not appropriate) main() method of Test class from main() method of Fun class (As main() method is static object is not required to invoke this):
    Test.main(new String[]{"Hello","good bye"});Here is your code:
    class Test{
    public static void main(String args[]){
    for(int i=0;i<args.length;i++)
    System.out.println(args);
    public class Fun{
    public static void main(String args[]){
    //Test t=new Test("Hello","good bye");
    Test.main(new String[]{"Hello","good bye"});
    } Thanks,
    Mrityunjoy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Help with main function

    Can someone help me out with this? Im trying to create a main function out of this contructor.
    public studentID()
    int size; //hold returned values from box
    int id;
    int age;
    size = Integer.parseInt(JOptionPane.showInputDialog (" Enter a nummber between 1 & 40")); //dialog box
    recCount = 0;
    idArray = new int[size];
    ageArray = new int[size];
    for(int i = 0; i <size; i++) //ask for values (size) times
    id =
    Integer.parseInt(JOptionPane.showInputDialog ("Enter an ID Number"));
    age =
    Integer.parseInt(JOptionPane.showInputDialog ("Enter an age"));
    inputStudent(age, id); //calles method to put values in array
    displayAll();
    selectionSort(idArray, ageArray, size);
    newNumberTable();
    selectionSort(ageArray, idArray, size);
    newAgeTable();
    }

    So what's the problem? Dump it all into the main method.
    Actually I'd advise thinking carefully about whether it should really be in main(). Generally, IMHO, main should only bootstap an app. The real functionality should be in other methods that main() calls.

  • IIs it possible to retrive deleted Function Module

    Hi all,
    i just want to know is it possible to retrive deleted Function Module .
      the request is not released yet.

    Hi Sai,
    Its not possible. (Confirm by contacting ur Basis people, if they can help).
    But the following is valid only if your function module is(or was) a transportable object.
    Go to SE37, enter your function module name and create. Assign it to the same function group and have the same interface and description. Save it, activate it.
    Now go back to SE37, enter the function module name, in the menu, 'Utilities>Versions>Version Management'. Now you should see all your previous versions. Select the most recent past version. Do a retrieve and then activate it as the latest version.
    Not sure if it works. But still give it a try.
    Best Regards,
    Anjali
    Message was edited by: Anjali Devi

  • Form with Folder Functionality and Tab Pages

    Refering here the original link to increase the visibility:
    Apps Form with Folder Functionality and Tab Pages

    DT1977,
    In your referenced post, you indicate that you are trying to create an "APPS Form". Perhaps, you should post your question to the Enterprise Business Suite (EBS) forums. This forum is for non-EBS Forms questions.
    Craig...

Maybe you are looking for

  • Integrating custom ActiveX control with SapGUI

    Hi everybody I'm in the process of writing a custom MFC based ActiveX control written in C++ that we want to use in a product. I am currently at the point where I can instantiate the control and interact with the various methods that it exposes but I

  • How to create interactive forms in ABAP WebDynpro

    Hi Experts, we are trying to create our first interactive form with the "how to guide for ABAP WebDynpros". Unfortunatelly we have a big problem on Step 17, where we want to save the created WebDynpro Application. After safing the system shows a pop

  • Citrix is not working post Yosemite upgrade

    Post the upgrade to Yosemite, my citrix application is not opening. I am being asked to install Java application everytime I boot even though I have installed. Not sure if both are related. I need citrix application to connect to my work. Any help is

  • Duplicate thumbnails

    Somehow, I've made a library management error. The photos in this particular project are filed in chronologically named folders (2007, 2008 etc with sub-sets of albums). The thumbnails in each of the albums are fine - no problem. But in the project i

  • Making CS2 recognize a changed startup images folder

    Hi there, I'm trying to make Photoshop CS2 recognize externally from VB/VBA a change the folder that a user saves a newly created (in this case, scanned) document to. (e.g., this is the folder that appears when you click File -> Open or File -> Save