How to run a Java class in JDeveloper - with Input parameters

Folks,
I need to run Forms 10g trace and do not have access to the Dos command line (no Programs-ACcessories-Comand prompt). I am allowed to run Batch files though.
So really I need to run class "oracle.forms.diagnostics.Xlate", but need to give Input Parameter to this class. I know to load JDeveloper and open this class, but when I execute it it gives me the following error.
My question is HOw do I input the File name to this Class when I execute it from JDeveloper.
ERROR: You must specify an input datafile
Exception in thread main
java.lang.NoClassDefFoundError: oracle/forms/registry/MessageManager
     at oracle.forms.diagnostics.Xlate.printUsage(Unknown Source)
     at oracle.forms.diagnostics.Xlate.readArgs(Unknown Source)
     at oracle.forms.diagnostics.Xlate.<init>(Unknown Source)
     at oracle.forms.diagnostics.Xlate.main(Unknown Source)
Process exited with exit code 1.

To specify program arguments
1. Select Tools>Project Properties.
2. Select Run/Debug.
3 Select the Default Configuration and select Edit.
4. Specify the program arguments in the Program Arguments field.

Similar Messages

  • How to run a java class from its package directory

    Hi,
    I hope someone can help me on the following ....
    Let say I have a Test.java class with the package definition: "package com.ams.eai.mq.fileAdapter;". I compiled the class into the directory c:\myJava\client\com\ams\eai\mq\fileAdapter. I have c:\myJava\client specified in my classPath and Path. Why is it when I go to the mentioned directory and enter at the prompt >java Test, I get java.lang.NoClassDefFoundError: test (wrong name: com/ams/eai/mq/fileAdapter/test).
    What directory am I supposed to be in to run my Test class ? Is there some other path that I need to specify but didn't ?
    Thanks for any help.

    You have to type out the fully qualified class name:
    java com.ams.eai.mq.fileAdapter.Test
    Even if you had the entire dir structure, "c:\myJava\client\com\ams\eai\mq\fileAdapter" in your classpath you'd still have to fully qualify the name of the "Test" class. What if there was another class named "Test" in a different package in your CP? The VM would have no way of knowing which "Test.class" you'd want to run.

  • How to run a java class from a shell script with passing arguments

    hi,
    I have a jar with all the required classes. I was using ant to run the classes i needed.
    But now i want to use a shell script to run the class, also the class accepts some arguments so when script is run it should accept arguments.
    So can any one tell me how to set class paths, jar location and call the required class from shell script or batch file with passing arguments to it.
    Thanks in advance.

    Let's say that the order of arguments is as below
    1. Jar file name
    2. Classpath
    Your shell script would look like this
    java -cp $CLASSPATH:$2 -jar $1 I am assuming that your jar file has the required main-class entry in its manifest. Note that $1...$9 represent the arguments to this shell script.
    The same goes for a batch file
    java -cp %CLASSPATH%;%2 -jar %1

  • How to run a java class as nt service in jdk1.1.8

    Hi,
    Could you help me , i try to start a service for a class who needs jdk1.1.8. I find javaservice.exe but it runs only for jdk1.2 or 1.3.
    HEEEEELLLLLPPPP

    Once old man was sitting in the park reading book "Learn C++ in 21 days". A passer by saw him and asked "You are such an old guy, why do you bother to learn C++?" "I have heard that now communication language at heaven is C++ only , so after my death when I will be in heaven, I don't want to face communication problem." old man replied. "But how come are U so sure that U will be in heaven? It could be a hell also." he asked. "Ya, doesn't matter .... I already know Java".

  • How can I compile and run other java classes from within an application?

    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
    I have tried using this command to compile:
    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
    ...and this one to run:
    Runtime.getRuntime().exec ("c:\\programs\\java className");
    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
    Adrian ( ...in distress!! )

    public class JavaCompiler{
       public static void main(String[] args)throws Exception{ //sorry bout the laziness
          if(args == null || args.length != 1){
             System.out.println("Usage: java JavaCompiler MyClass.java");
             System.exit(0);
          String className = args[0];
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("javac " + className); //consider setting cpath for this
          p.waitFor();
          //now try to run after it is done.
          p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
          p.waitFor();
          //do some other stuff
    }This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out.

  • Than how can i get java class by using it's class file?

    Hi
    After compilation of a java program, it creates a class file.
    After getting class file suppose class file has been deleted.
    Than how can i get java class by using it's class file?
    Thanks in advance.

    get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
    BTW: many of your compilers have source control--if it does, just restore your missing file.

  • Run a java class in Oracle db to connect to Sybase

    Hi All, I'm looking for a way to connect to Sybase database at no-license-cost (meaning Oracle Gateway or similar 3rd party products), first coming idea was JDBC, I know I can run a java class in Oracle, the simple idea is to write a java class which connects to Sybase via JDBC thin driver and return the resultset of given query in a java class, the resultset will be presented in Oracle Apex framework.  Does anyone know if this can be done or not, and how?  Any howto articles are welcomed.
    Henry

    Henry:
    To connect to Sysbase or MsSQL Server you could use jTDS open source driver.
    http://sourceforge.net/projects/jtds/
    upload above driver (jar file) using loadjava, and grants the port connection using dbms_java.grant_permission procedure.
    Because jTDS is pure java driver (mode 4) is possible to use directly inside the RDBMS.
    Best regards, Marcelo.
    PD: Latest jtds driver is compiled against 1.6 sources, but oldest version will work with 1.5 for 11g.

  • How to run a java program in another folder

    Hello!
    I want to run for example the java class file in the path ./sourcecode/javafile.class. It works fine if I do the following:
    cd sourcecode
    java javafile
    but it cannot work if I do:
    java sourcecode/java
    The error it outputs is NoClassDefFoundError.
    Can someone tell me how to run a java program in another folder
    thanks a lot.

    You need to specify the classpath using the -cp flag when running. so instead of
    "java sourcecode/javafile"
    Try
    "java -cp sourcecode javafile"

  • Getting an error msg while trying to run the java class from CMC

    Hi All,
    I am getting an error, while trying to run the java .class file, that which is imoported into CMC.
    Error msg:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.crystaldecisions.sdk.plugin.desktop.program.internal.ProgramWrapper.main(ProgramWrapper.java:49)
    I have imported .class file into CMC and trying to invoke the .class file by another java program from eclipse..When i tried to invoke the .class in cmc, i am getting an error msg, mentioned above. I thought there might be version conflict. So i changed the java complier version to 1.5 in my Eclipse. After that is done again i am facing the same problem.
    Can anyone help me to resolve this issue?
    Thanks in Advance.

    i have installed BO SDK 3.1 , Service pack 3. It comes woth JDK 1.5 version. i have not done any chnages to it. I impoprted all the jar files related to BO into eclipse.
    1)  Actually, i am writing java code on eclipse. When i run code from the eclipse, it creates a session to cmc and creates folder structure what i need.
    2)  But the thing is, that code needs to run, when i import the .class file into cmc. The process how i imported the .class file to cmc.
    Manage> Add> Program File-->Java (Check Box). In this way i added java class file from the eclipse workspace (class file from the bin directory).
    3) So when i run the .class file externally by another java program or also when i log in to CMC and run that .class file, the instance shows sucess, but when i see the logfile i am getting an exception that which i mentioned above.
    If my method is worng can you please let me know the stepts how to run java program in cmc.
    Thanks in Advance

  • How to call a Java class from another java class ??

    Hi ..... can somebody plz tell me
    How to call a Java Class from another Java Class assuming both in the same Package??
    I want to call the entire Java Class  (not any specific method only........I want all the functionalities of that class)
    Please provide me some slotuions!!
    Waiting for some fast replies!!
    Regards
    Smita Mohanty

    Hi Smita,
    you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
    e.g.
    you have developed A.java and B.java, both are in same package.
    in implementaion of B.java
    class B
                A obj = new A();
                 //to access A's methods
                 A.method();
                // to access A's variable
                //either
               A.variable= value.
               //or
               A.setvariable() or A.getvariable()

  • How to use a java class in difference project under a same workspace!

    Hi, there:
    I have a problem. I want to reuse a java class which is located in another project of the same workspace. I do not know how to set the two project setting or how to import the java class. I deeply appreciate.
    Sheng-He

    include it as a library
    open project settings goto libraries and simply add your class

  • Running a Java Class in Workshop

    I'm trying to run a Java class with a public static void main method in Workshop. As instructed I opened the properties for the Java project, under the debbuger tab, checked Build before debugging. Then under "Create new process settings", in the Main Class box put the class with the main method with proper package structure. Clicked Ok. When I click the start button, the project builds, the process starts, the last message in the Output box is "Process Started" but then nothing happens. No System.out.println statements show. If I set breakpoints it never gets there. No values ever get set or changed in the Locals box. What am I missing?

    Thanks your response. I'm on sp3.
    The application is "Factory".
    The Java Project in "Factory".
    In the Java project there is a folder "pac", in that folder there is a class with a main method called "ProviderClient"
    In the "Factory" Java project properties/debugger window, Build before debugging is checked, also Create new process. Main class: pac.ProviderClient
    Home directory: C:/bea/user_projects/MyApps/Factory/Factory/
    (It was put there autopmatically when I clicked Browse as you said).
    When I run I get:
    Trying to create process and attach to 3640...
    Starting process in C:\bea\user_projects\MyApps\Factory\Factory
    C:\bea\jdk142_04\bin\javaw.exe -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=3640,suspend=y,server=y -classpath "C:\bea\user_projects\MyApps\Factory\APP-INF\lib\Factory.jar;C:\bea\user_projects\MyApps\Factory\EJBs.jar;C:\bea\jdk142_04\jre\lib\rt.jar;C:\bea\jdk142_04\jre\lib\jsse.jar;C:\bea\jdk142_04\jre\lib\jce.jar;C:\bea\jdk142_04\lib\tools.jar;C:\bea\weblogic81\server\lib\knex.jar;C:\bea\weblogic81\common\lib\log4j.jar;C:\bea\weblogic81\server\lib\debugging.jar;C:\bea\weblogic81\javelin\lib\javelin.jar;C:\bea\weblogic81\server\lib\wlw-lang.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbserver44.jar;C:\bea\weblogic81\common\eval\pointbase\lib\pbclient44.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\bea\weblogic81\server\lib\webserviceclient.jar;C:\bea\weblogic81\server\lib\webserviceclient+ssl.jar;C:\bea\weblogic81\server\lib\wli.jar;C:\bea\weblogic81\server\lib\xbean.jar;C:\bea\weblogic81\server\lib\wlxbean.jar;C:\bea\weblogic81\server\lib\xqrl.jar;C:\bea\weblogic81\server\lib\netui\netui-compiler.jar" pac.ProviderClient
    Process started
    After a long time I get "Could not attach to debuggee process.
    Debugging Finished"
    What am I doing wrong?

  • Can we run a java class in a external server through abap program?

    Dear Experts,
    Can we run a java class in an external server ( other than application server and client system )?
    I have tried running it in the client system through a program and it works.
    But i have the requirement of running it in another system. Can it be done?

    Hi,
    If this is the case I think you can call this web service from SAP and triger the execution of the application on the "external server".
    SAP is behaving as a client in this case.
    Another alternative:
    "have tried running it in the client system through a program and it works." please elaborate.
    Regards.

  • How to hot deploy java class?

    I write some java class and put them into the weblogic\class folder to
    replace the old java class files.
    When I run the program, the server still run the old java class.
    But when I restart the server, the server runs new java class.
    The server must restart, when I want to run new java class?
    thanks

    Does this work ??
    I was unable to achieve hot deployment using REDEPLOY file.
    Sheng Sheen <[email protected]> wrote in message
    news:[email protected]..
    You need to create a REDEPLOY file and touch the file.
    From the documentations:
    Dynamic Redeployment of Exploded Applications
    You can also dynamically redeploy applications or application components
    that have been deployed in exploded format. When an application has been
    deployed in exploded format, the Administration Server periodically looks
    for a file named REDEPLOY in the exploded application directory. If the
    timestamp on this file changes, the Administration Server redeploys the
    exploded directory.
    If you want to update files in an exploded application directory, do the
    following:
    a.. When you first deploy the exploded application, create an empty file
    named REDEPLOY in the directory where the exploded application resides.
    b.. To update the exploded application, copy the updated files over the
    existing files in that directory.
    c.. After copying the new files, touch the REDEPLOY file in the exploded
    directory to alter its timestamp.
    When the Administration Server detects the changed timestamp, it redeploys
    the contents of the exploded directory.
    "Alex" <[email protected]> wrote in message
    news:[email protected]..
    I write some java class and put them into the weblogic\class folder to
    replace the old java class files.
    When I run the program, the server still run the old java class.
    But when I restart the server, the server runs new java class.
    The server must restart, when I want to run new java class?
    thanks

  • How to run a java prog from c prog

    hello all
    I wanted to run a java class from a c prog,
    can any body suggest the way in which this can be done, links or tutorials in this regard is highly appreciable,
    thanks in advance
    Message was edited by:
    mahima_vyas

    Let's say that the order of arguments is as below
    1. Jar file name
    2. Classpath
    Your shell script would look like this
    java -cp $CLASSPATH:$2 -jar $1 I am assuming that your jar file has the required main-class entry in its manifest. Note that $1...$9 represent the arguments to this shell script.
    The same goes for a batch file
    java -cp %CLASSPATH%;%2 -jar %1

Maybe you are looking for

  • Patch Order Application Server 10g

    When applying CPUJAN2008 (6639296) to app server 10g (10.1.2.0.2), do we only patch the infrastructure? In the documentation, it says the order to apply this patch is first DB, then app server infra, then app server midtier. Ive already patched the d

  • JDBC adapter is not polling as scheduled

    Hi, we have observed JDBC adapter is not polling database correctly. adapter is scheduled at every 1 second, but it is plooing for every 5 sec or 6 sec. is there any way the issue can be fixed? Thank You, Madhav

  • Partition in Data warehouse

    Hello, I'm trying to create Interval partition in one table with Invoice_Date as key column. Database NLS Setting for date is DD-MON-RR and we are entering date as 'DD-MON-YYYY'. Now what i want to know is when i create table like below CREATE TABLE

  • Proxy Table type not Generated

    Hi Gui's, I am woking on proxies while creating the proxis in SPROXY transaction proxy table type is not creating which we used in abap programing. what is the issue will you please guide me. Thanks, Lakshmi

  • Adding date to PreparedStatement?

    Hello, I created a table in mysql to store some information about the users, and wish to add the current date to the preparedstatement. I am using the DATE type field in the table, the date being added is always 01.01.2006 Could anyone advise how to