How can i run Java class form  other java application.

Hi ,
I have problem to run java class from my java application,
I am using the class ClassLoader in order to launched the Java class , it�s work fine whenever, the class exist in the same folder , however , when i am trying to run class that is not in the current folder ,
i got error (see below),
Do you have any idea what is wrong?
java.lang.ClassNotFoundException
     at SimpleClassLoader.loadClass(SimpleClassLoader.java:110)
     at SimpleClassLoader.loadClass(SimpleClassLoader.java:53)
     at Run.main(Run.java:31)

What does "run an class" mean? You don't run classes. They're not executables.
I bet your problem is the classpath. You are aware that the classloader looks only there? Unless it's an UrlClassLoader.

Similar Messages

  • How can I run Runtime.exec command in Java To invoke several other javas?

    Dear Friends:
    I met a problem when I want to use a Java program to run other java processes by Runtime.exec command,
    How can I run Runtime.exec command in Java To invoke several other java processes??
    see code below,
    I want to use HelloHappyCall to call both HappyHoliday.java and HellowWorld.java,
    [1]. main program,
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloHappyCall
         public static void main(String[] args){
              try
                   Runtime.getRuntime().exec("java  -version");
                   Runtime.getRuntime().exec("cmd /c java  HelloWorld "); // here start will create a new process..
                   System.out.println("Never mind abt the bach file execution...");
              catch(Exception ex)
                   System.out.println("Exception occured: " + ex);
    } [2]. sub 1 program
    package abc;
    import java.util.*;
    import java.io.*;
    class HelloWorld
         public static void main(String[] args){
         System.out.println("Hellow World");
    } [3]. Sub 2 program:
    package abc;
    import java.util.*;
    import java.io.*;
    class HappyHoliday
         public static void main(String[] args){
         System.out.println("Happy Holiday!!");
    } When I run, I got following:
    Never mind abt the bach file execution...
    I cannot see both Java version and Hellow World print, what is wrong??
    I use eclipse3.2
    Thanks a lot..

    sunnymanman wrote:
    Thanks,
    But How can I see both programs printout
    "Happy Holiday"
    and
    "Hello World"
    ??First of all, you're not even calling the Happy Holiday one. If you want it to do something, you have to invoke it.
    And by the way, in your comments, you mention that in one case, a new process is created. Actually, new processes are created each time you call Runtime.exec.
    Anyway, if you want the output from the processes, you read it using getInputStream from the Process class. In fact, you really should read that stream anyway (read that URL I sent you to find out why).
    If you want to print that output to the screen, then do so as you'd print anything to the screen.
    in notepad HelloWorld.java, I can see it is opened,
    but in Java, not.I have no idea what you're saying here. It's not relevant whether a source code file is opened in Notepad, when running a program.

  • How can I run Adobe AIR beta until my application is ready to be upgraded?

    How can I run Adobe AIR beta until my application is ready to be upgraded? How can I get around being forced to upgrade? Everything was working fine until the upgrade was forced. This is a huge problem for me

    You can use the Installation Tuner for Reader to customize the UI elements provided to the user.  Details on the Adobe web site.

  • How can i run my .class file with out installing java ?

    Hai friends..am new to java , plz help me any one.
    I wrote a small program in java lang. i want to run this program in my friend's system , which is doesnt have java language .. How can i run this program in my friends system with out installing java language?
    one of my friends told that ,it needs to copy the jvm in to ur directory where the java code is present . How can i copy the jvm from where to where ..?plz help me any one

    Your friend will have to install the Java runtime if they want to run Java
    programs.
    Don't go copying files yourself - and especially don't go copying them to the
    location of the Java code. After all, if your friend wants to run 42 different
    Java programs they shouldn't have to have 42 copies of the runtime.
    Just download and run the installer from this site:
    http://java.sun.com/javase/downloads/index.jsp
    Be careful to download the "Java Runtime Environment" not the JDK.

  • How Can I run Oracle 11g Form without OC4J

    Dear All,
    I was installed Oracle Data Base and Forms 11g but when I try to run the Form I can't because there's no OC4J.
    Thanks
    Eyad

    Thank you, but when I start weblogic
    from { d:\Oracle\Middleware\user_projects\domains\ClassicDomain }, it's ask me about for username and password.
    but Unfortunately forget it. How can I reset it ? or How can I make another username and pass word
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=512m
    WLS Start Mode=Production
    CLASSPATH=D:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;d
    :\Oracle\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic
    patch.jar;d:\Oracle\MIDDLE~1\patchocp371\profiles\default\sys_manifest_classpa
    th\weblogic_patch.jar;C:\PROGRA~1\Java\JDK17~1.0_1\lib\tools.jar;D:\Oracle\MIDDL
    E~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\Oracle\MIDDLE~1\WLSERV~1.3\server\l
    ib\weblogic.jar;d:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3
    .6.0.jar;D:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;d:\Oracle\MIDD
    LE~1\modules\ORGAPA~1.1/lib/ant-all.jar;d:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/
    lib/ant-contrib.jar;D:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;d
    :\Oracle\Middleware\oracle_common\modules\oracle.dms_11.1.1\dms.jar;d:\Oracle\Mi
    ddleware\oracle_common\modules\oracle.jmx_11.1.1\jmxframework.jar;d:\Oracle\Midd
    leware\oracle_common\modules\oracle.jmx_11.1.1\jmxspi.jar;d:\Oracle\Middleware\o
    racle_common\modules\oracle.odl_11.1.1\ojdl.jar;d:\Oracle\Middleware\Oracle_FRHo
    me1\opmn\lib\nonj2eembeans.jar;d:\Oracle\Middleware\Oracle_FRHome1\jdbc\lib\ojdb
    c6.jar;d:\Oracle\Middleware\Oracle_FRHome1\opmn\lib\optic.jar;d:\Oracle\Middlewa
    re\Oracle_FRHome1\opmn\lib\iasprovision.jar;d:\Oracle\Middleware\oracle_common\m
    odules\oracle.ldap_11.1.1\ldapjclnt11.jar;d:\Oracle\Middleware\oracle_common\jli
    b\rcucommon.jar;d:\Oracle\Middleware\Oracle_FRHome1\opmn\lib\opmneditor.jar;d:\O
    racle\Middleware\Oracle_FRHome1\opmn\lib\wlfullclient.jar;d:\Oracle\Middleware\o
    racle_common\modules\oracle.adf.share_11.1.1\commons-el.jar;d:\Oracle\Middleware
    \Oracle_FRHome1\jlib\dfc.jar;d:\Oracle\Middleware\Oracle_FRHome1\dvt\lib\dvt-jcl
    ient.jar;d:\Oracle\Middleware\Oracle_FRHome1\dvt\lib\dvt-utils.jar;d:\Oracle\Mid
    dleware\oracle_common\jlib\ewt3.jar;d:\Oracle\Middleware\oracle_common\modules\o
    racle.iau_11.1.1\fmw_audit.jar;d:\Oracle\Middleware\Oracle_FRHome1\oui\jlib\http
    client.jar;d:\Oracle\Middleware\oraclecommon\modules\oracle.idm_11.1.1\identit
    ystore.jar;d:\Oracle\Middleware\oracle_common\modules\oracle.idm_11.1.1\identity
    utils.jar;d:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jaccprovi
    der.jar;d:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jacc-spi.ja
    r;d:\Oracle\Middleware\Oracle_FRHome1\ord\jlib\jai_codec.jar;d:\Oracle\Middlewar
    e\Oracle_FRHome1\ord\jlib\jai_core.jar;d:\Oracle\Middleware\oracle_common\module
    s\oracle.oc4j-obsolete_11.1.1\jazn.jar;d:\Oracle\Middleware\oracle_common\module
    s\oracle.oc4j-obsolete_11.1.1\jazncore.jar;d:\Oracle\Middleware\oracle_common\jl
    ib\jewt4.jar;d:\Oracle\Middleware\Oracle_FRHome1\jlib\jta.jar;d:\Oracle\Middlewa
    re\oracle_common\modules\oracle.ldap_11.1.1\ldapjclnt11.jar;d:\Oracle\Middleware
    \Oracle_FRHome1\lib\mail.jar;d:\Oracle\Middleware\Oracle_FRHome1\jlib\netcfg.jar
    ;d:\Oracle\Middleware\Oracle_FRHome1\jlib\oracle_ice.jar;d:\Oracle\Middleware\or
    acle_common\jlib\share.jar;d:\Oracle\Middleware\Oracle_FRHome1\jlib\zrclient.jar
    ;d:\Oracle\Middleware\Oracle_FRHome1\reports\jlib\aolj.jar;d:\Oracle\Middleware\
    Oracle_FRHome1\reports\jlib\confmbean.jar;d:\Oracle\Middleware\Oracle_FRHome1\re
    ports\jlib\runtimembean.jar;d:\Oracle\Middleware\Oracle_FRHome1\reports\jlib\rwa
    dmin.jar;d:\Oracle\Middleware\Oracle_FRHome1\reports\jlib\rwenv.jar;d:\Oracle\Mi
    ddleware\Oracle_FRHome1\reports\jlib\rwrun.jar;d:\Oracle\Middleware\Oracle_FRHom
    e1\reports\jlib\rwxdo.jar;d:\Oracle\Middleware\Oracle_FRHome1\jlib\rts2.jar;d:\O
    racle\Middleware\Oracle_FRHome1\common\wlst\lib\adf-share-mbeans-wlst.jar;d:\Ora
    cle\Middleware\Oracle_FRHome1\common\wlst\lib\mdswlst.jar;d:\Oracle\Middleware\O
    racle_FRHome1\common\wlst\resources\auditwlst.jar;d:\Oracle\Middleware\Oracle_FR
    Home1\common\wlst\resources\jps-wlst.jar;d:\Oracle\Middleware\Oracle_FRHome1\com
    mon\wlst\resources\jrf-wlst.jar;d:\Oracle\Middleware\Oracle_FRHome1\common\wlst\
    resources\oamap_help.jar;d:\Oracle\Middleware\Oracle_FRHome1\common\wlst\resourc
    es\oamAuthnProvider.jar;d:\Oracle\Middleware\Oracle_FRHome1\common\wlst\resource
    s\ossoiap_help.jar;d:\Oracle\Middleware\Oracle_FRHome1\common\wlst\resources\oss
    oiap.jar;d:\Oracle\Middleware\Oracle_FRHome1\common\wlst\resources\sslconfigwlst
    .jar;d:\Oracle\Middleware\Oracle_FRHome1\common\wlst\resources\wsm-wlst.jar;D:\O
    racle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;D:\Oracle\MIDDLE~1\WLS
    ERV~1.3\common\derby\lib\derbyclient.jar;D:\Oracle\MIDDLE~1\WLSERV~1.3\server\li
    b\xqrl.jar
    PATH=d:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\native;d:\Oracle\MIDDLE~1
    \patch_ocp371\profiles\default\native;D:\Oracle\MIDDLE~1\WLSERV~1.3\server\nativ
    e\win\x64;D:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;d:\Oracle\MIDDLE~1\modules\OR
    GAPA~1.1\bin;C:\PROGRA~1\Java\JDK17~1.0_1\jre\bin;C:\PROGRA~1\Java\JDK17~1.0_1\b
    in;d:\Oracle\MIDDLE~1\ORACLE~2\BIN;d:\OracleDB\product\112~1.0\dbhome_1\BIN;C:\P
    ROGRA~1\COMMON~1\MICROS~1\WINDOW~1;C:\PROGRA~2\COMMON~1\MICROS~1\WINDOW~1;C:\PRO
    GRA~2\Intel\ICLSCL~1\;C:\PROGRA~1\Intel\ICLSCL~1\;C:\PROGRA~2\AMDAPP~1\bin\x86_6
    4;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WI
    NDOW~1\v1.0\;C:\PROGRA~2\ATITEC~1\ATI.ACE\CORE-S~1;C:\PROGRA~1\Intel\INTEL(~1\DA
    L;C:\PROGRA~1\Intel\INTEL(~1\IPT;C:\PROGRA~2\Intel\INTEL(~1\DAL;C:\PROGRA~2\Inte
    l\INTEL(~1\IPT;C:\PROGRA~1\Sony\VAIOIM~1\;C:\PROGRA~2\Sony\VAIOST~1;C:\PROGRA~2\
    WIC4A1~1\Shared;d:\Oracle\MIDDLE~1\ORACLE~2\opmn\bin;d:\Oracle\MIDDLE~1\ORACLE~2
    \opmn\lib;d:\Oracle\MIDDLE~1\ORACLE~2\perl\bin;D:\Oracle\MIDDLE~1\WLSERV~1.3\ser
    ver\native\win\x64\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.7.0_11"
    Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
    Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
    Starting WLS with line:
    C:\PROGRA~1\Java\JDK17~1.0_1\bin\java -server -Xms256m -Xmx512m -XX:MaxPermSi
    ze=512m -Dweblogic.Name=AdminServer -Djava.security.policy=D:\Oracle\MIDDLE~1\WL
    SERV~1.3\server\lib\weblogic.policy -Dweblogic.ProductionModeEnabled=true -da
    -Dplatform.home=D:\Oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=D:\Oracle\MIDDLE~1\WLS
    ERV~1.3\server -Dweblogic.home=D:\Oracle\MIDDLE~1\WLSERV~1.3\server -Xms512m -
    Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Doracle.home=d:\Oracle\Middlewa
    re\Oracle_FRHome1 -Ddomain.home=d:\Oracle\Middleware\user_projects\domains\Class
    icDomain -Djava.ext.dirs=d:\Oracle\Middleware\Oracle_FRHome1\jdk\jre\lib\ext -Do
    racle.security.jps.config=d:\Oracle\Middleware\user_projects\domains\ClassicDoma
    in\config\fmwconfig\jps-config.xml -Doracle.instance=d:\Oracle\Middleware\asinst
    _1 -Doracle.instance.name=asinst_1 -Doracle.forms.weblogic=1 -Ddomain.name=Class
    icDomain -Dcommon.components.home=D:\Oracle\MIDDLE~1\ORACLE~1 -Djrf.version=11.1
    .1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
    -Ddomain.home=d:\Oracle\MIDDLE~1\USER_P~1\domains\CLASSI~1 -Djrockit.optfile=D:\
    Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.
    server.config.dir=d:\Oracle\MIDDLE~1\USER_P~1\domains\CLASSI~1\config\FMWCON~1\s
    ervers\AdminServer -Doracle.domain.config.dir=d:\Oracle\MIDDLE~1\USER_P~1\domain
    s\CLASSI~1\config\FMWCON~1 -Digf.arisidbeans.carmlloc=d:\Oracle\MIDDLE~1\USER_P
    ~1\domains\CLASSI~1\config\FMWCON~1\carml -Digf.arisidstack.home=d:\Oracle\MIDD
    LE~1\USER_P~1\domains\CLASSI~1\config\FMWCON~1\arisidprovider -Doracle.security.
    jps.config=d:\Oracle\MIDDLE~1\USER_P~1\domains\CLASSI~1\config\fmwconfig\jps-con
    fig.xml -Doracle.deployed.app.dir=d:\Oracle\MIDDLE~1\USER_P~1\domains\CLASSI~1\s
    ervers\AdminServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternat
    eTypesDirectory=D:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,D:\Ora
    cle\MIDDLE~1\ORACLE~1\modules\oracle.oamprovider_11.1.1 -Djava.protocol.handler.
    pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dwc.oracle.h
    ome=D:\Oracle\Middleware\Oracle_FRHome1 -Dclassic.oracle.home=D:\Oracle\Middlewa
    re\Oracle_FRHome1 -Dweblogic.management.discover=true -Dwlw.iterativeDev=false
    -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=d:\O
    racle\MIDDLE~1\patch_wls1036\profiles\default\sysext_manifest_classpath;d:\Oracl
    e\MIDDLE~1\patch_ocp371\profiles\default\sysext_manifest_classpath weblogic.Ser
    ver
    <Feb 4, 2013 6:20:47 PM AST> <Info> <Security> <BEA-090905> <Disabling CryptoJ J
    CE Provider self-integrity check for better startup performance. To enable this
    check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <Feb 4, 2013 6:20:48 PM AST> <Info> <Security> <BEA-090906> <Changing the defaul
    t Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable
    this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <Feb 4, 2013 6:20:48 PM AST> <Info> <WebLogicServer> <BEA-000377> <Starting WebL
    ogic Server with Java HotSpot(TM) 64-Bit Server VM Version 23.6-b04 from Oracle
    Corporation>
    <Feb 4, 2013 6:20:49 PM AST> <Info> <Management> <BEA-141107> <Version: WebLogic
    Server 10.3.6.0 Tue Nov 15 08:52:36 PST 2011 1441050
    WebLogic Server 10.3 Tue Nov 15 08:52:36 PST 2011 1441050 >
    <Feb 4, 2013 6:20:50 PM AST> <Info> <Security> <BEA-090065> <Getting boot identi
    ty from user.>
    Enter username to boot WebLogic server:
    }

  • How can i run report from form?

    Hi.
    I build a report , the name is test , in this report i have 3 parametrs 'user_id' , 'Date_1' and 'Date_2'.
    how can i send those parametrs from form to report?
    i have 3 text item in form for get the parametrs.
    thanks alot

    You can run the report from within a program unit, using following :
    Run_Product(REPORTS, report_name, ASYNCHRONOUS, RUNTIME, FILESYSTEM, param_list, NULL);
    Here, report_name contains report file's name (test.rdf in your case) its type is Varchar2.
    param_list is of ParamList type, it contains the name-value pairs for parameters you want to pass to the report. You'll have to add parameters to this using addParameter() function. see the Help for addParameter().
    this will run the report using Report Background Engine.
    Regards,
    Muhammad Shakeel

  • How can i run a linux command in java app?

    i created a cell script to run the compile process of my C++ simulator and want to control it thru java application, i tried the following but it doesn't work.
    the command in linux should be. under the path /home/workspace/SIM/ run: . / zs_compile
    and i use runtime to do this
    String path="home/workspace/SIM/ . /zs_compile";
    try {Runtime.getRuntime().exec(path);}
    catch( IOException e) {
    e.printStackTrace() ;
    Error report is java.io.IOException: java.io.IOException: home/workspace/SIM/ . /zs_compile : not found
    who can help me to find the reason, thanks a lot!!!!!

    the reason is that the command you're truing to execute can't be found. se this article for other traps relatd to runtime.exec:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    the command in linux should be. under the path /home/workspace/SIM/ run: . / zs_compilecould yu elaborate a bit? "should be . under the path" -- do you mean it should be sourced from that path? Sourcing a script file makes no sense from a Java program.

  • How can I run a servlet with Sun Java System Application Server PE 8?

    I've created a package with a TestServlet.class inside, used the deploytool to create a WAR and deployed this using the autodeploy folder.
    The filestructure has been generated and I find the TestServlet.class in
    [installdir]\domains\domain1\applications\j2ee-modules\testProject\WEB-INF\classes\[packagefolderstructure]\TestServlet.class.
    The context root is working fine, but I have no clue how I can run the servlet directly via the URL.
    I've tried many things like
    http://localhost:8080/testProject/TestServlet
    http://localhost:8080/testProject/servlet/TestServlet
    http://localhost:8080/testProject/servlet/[packagenamewithpoints]TestServlet
    http://localhost:8080/testProject/servlet/[packagenamewithslashes]TestServlet
    etc etc
    Can somebody tell me please how to write URLs to deployed servlets? Or send me an example url and xml descriptor files?
    Thanks a lot in advance!

    in web.xml use servlet mapping
    <servlet-mapping>
        <servlet-name>TestServlet</servlet-name>
        <url-pattern>/doit</url-pattern>
    </servlet-mapping>then use http://localhost:8080/testProject/doit

  • How can I run EJB Client in other computer ?

    Hello,
    I'm trying to run converter examples.
    if ejb client pgm resides on a same machine with j2ee server , it works fine.
    But when I put client pgm on a different maching
    below message show.
    No application client descriptors defined for: ConverterClinet
    I put ConverterApp.ear, ConverterAppClient.jar and ConverterClient.class on the machine and
    set APPCPATH=ConverterAppClient.jar
    set VMARGS=-Dorg.omg.CORBA.ORBInitialHost=xxx.xxx.xx.xx
    What should I do to run ejb client on different machine?

    Hi SangHPark,
    I had the same problem but have solved it and it works.
    I ran the client remotely from a win98 box.
    Keep two things in mind
    1> Deploy the applications to an ip address and not to the local host using the deploy too. Use the deploy tool Gui to add a new server and then deploy the application to this ip address.
    2> I am running j2ee version 1.3 and jsdk 1.3
    Use the following code but instead of using "java:comp/env/ejb/SimpleConverter" use the jndi name of the object: "MyConverter" as specified in the tutorial.
    Properties prop = new Properties();
    prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
    prop.setProperty(Context.PROVIDER_URL,"IIOP://xxx.xx.x.xxx:1050");
    System.out.println("Attempting to create context...");
    Context initial = new InitialContext(prop);
    // Instead of this use the below line of code
    //Object objref = initial.lookup("java:comp/env/ejb/SimpleConverter");
    Object objref = initial.lookup("MyConverter");
    // MyConverter is the Jndi name of the ConverterBean as per the tutorial
    You need to do the following things.
    1> After making changes to the code recompile using Ant and redeploy it.
    2> Copy the j2ee.jar, ConverterAppClient.jar and ConverterClient.class file to the machine that u want to run the client from.
    3> create a directory called "config" on the remote machine where you copied the files in step two.
    4> Copy to this directory the files ejb.properties and security.properties from your j2ee_home\config\ directory.
    For example you copied the files in step 2 on the remote machine in the c:\test directory. Create c:\test\config directory and copy the files from step 4 into this directory.
    5> Run the following command from the directory where u copied the client files
    java -Dorg.omg.CORBA.ORBInitialHost="host name" -classpath .\j2ee.jar;.;.\ConverterAppClient.jar ConverterClient
    Monal

  • How can I run a dos command from java on windows 98, 95?

    The usage of cmd.exe in the java program to run a dos command on windows 98. 95 doesn't work as the equivalent command is command.exe
    But using the command.exe in the java program makes my program to hang.

    hi,
    As u mentioned, u cannot use the cmd.exe in win9x environment as cmd.exe is specific to windows NT, you can use the command.exe without any hitches.
    for eg
    java.lang.Runtime.getRuntime().exec("start command /K a.bat"); should run the batch file a.bat..
    if the problem persists, try posting the snippet of code that you are using.
    cheerz
    ynkrish

  • How can I run C programs under a Java GUI?

    Hi
    I'm looking for some info on how to run a command line program written in another language behind a Java GUI, any advice greatly appreciated, particularly in how to transfer data between the two.
    Thanks

    Runtime.getRuntime().exec(...)
    Transfering info is more complicated. Maybe write and read status from disk?

  • How can i run report in form developer 10g

    hi plz help me
    i type code
    web.show_document('http://127.0.0.1:8889/reports/rwservlet? server=test report=c:\1.rdf & desformat=htmlcss &userid=scott/tiger@test & destype= cache','_blank');
    then i receive a message with error code REP-51002
    plz plz help

    I noticed that you have several blanks (white spaces) in the url. Please remove them and try again!
    Link should be:
    web.show_document('http://127.0.0.1:8889/reports/rwservlet?server=test report=c:\1.rdf&desformat=htmlcss&userid=scott/tiger@test &destype=cache','_blank');
    This should work perfecly (if of course you have started the Reportsserver 'test'). Also try copy that link and paste it directly into your browser. If it works there, it should work in Forms!!!
    You can check the environment of that Report with following link:
    http://127.0.0.1:8889/reports/rwservlet/showenv?server=test
    And what you can additional do is to check the Reports Que:
    http://127.0.0.1:8889/reports/rwservlet/showjobs?server=test
    The Reports Que is my number one to check for errors. You'll see a red circle/x after an unsessfull Report. Click on that icon for complete error message.
    Regards,
    Martin

  • How can I run a a class file on the Apache server?

    Hi Guys and Gurus,
    I am seeking some favor all of experienced gurus, i.e.
    How can I run a a class file on the Apache server?
    Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
    Please advise...
    VJ

    cross posted
    http://forum.java.sun.com/thread.jsp?thread=299137&forum=31&message=1184025

  • URGENT PLEASE:How can I run a a class file on the Apache server?

    Hi Guys and Gurus,
    I am seeking some favor all of experienced gurus, i.e.
    How can I run a a class file on the Apache server? Can I run through an Applet?
    How can I set Environment variables in Windows2000 Professional Environment?
    Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
    The code is here
    import java.sql.*;
    public class RecordShow {
    public static void main(String args[]) {
    String url = "jdbc:mysql://localhost/myhost";
    Connection con;
    String query = "select mytable.column," +
    "from mytable " +
    "where mytable.column = 1";
    Statement stmt;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    try {
    con = DriverManager.getConnection(url,
    "myuser", "mypassword");
    stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    int rowCount = 1;
    while (rs.next()) {
    System.out.println("Row " + rowCount + ": ");
    for (int i = 1; i <= numberOfColumns; i++) {
    System.out.print(" Column " + i + ": ");
    System.out.println(rs.getString(i));
    System.out.println("");
    rowCount++;
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.print("SQLException: ");
    System.err.println(ex.getMessage());
    Please advise... THANKS
    VJ

    Ehm, I wasn't referring to you at all... read up,
    there's a comment by jschell saying that CGI might be
    easier/better for his purposes.
    Yep.
    I know PHP/Perl/whatever might be easier for some
    purposes, but only if you happen to know them and want
    to/are able to use them. Ok. But you aren't the one asking the question are you. And the person who asked the question seems to have absolutely no familiarity with Apache or applets.
    So whatever they do they are going to have to learn a lot.
    And that does indeed suggest that in all likelyhood they have not investigated the alternatives.
    And for the vast majority of internet applications, especially with smaller projects (obvious this person is not working with a large team), using perl, or something besides java, is going to be the best business solution. It is simpler, and more secure (probably due to the fact that it is simpler.)
    Since this is a Java forum, I
    answer under the assumption that people have made a
    choice one way or another to use a Java solution to
    their problem, so I try to solve it in Java first, and
    only when that fails (very seldom) do I turn to other
    solutions.You approach problems by arbritrarily deciding to try to solve it in java first and only if you fail do you then look to other solutions?
    My first step is to try to figure out which of the various avenues is going to cost less. (And a secondary, but non-trivial concern, is then to convince the customer that just because they have heard of a buzz word like 'enterprise bean' that it doesn't mean that is a cost effective solution.) We must come from different worlds.

  • How can i run a java class file from shell?

    Hi all,
    I've a .class file named "File" that contains Main method, it is in the package "File2".
    How can I run it by shell command?
    PS: "java -cp . file" doesn't work it launch->
    Exception in thread "main" java.lang.NoClassDefFoundError: File2/File (wrong name: File2/File)
    Thanks in advance.

    Just to understand: is File2 ar jar archive or not? If it is a jar archive, have you tried open File2.jar? If File2 is a directory within the current directory, have you tried java -cp . File2/File? I just tested with a set of classes and it works... Let me be precise:
    * Let us imagine you are working in a directory whole path is PathToDir/
    * in this directory you have the classes put in a directory called File2
    * in order to launch File.class then you would have to invoke :
    cd PathToDir/ (just to be sure)
    java -cp . File2/File
    *if you were to do the following then you would have the problem you describe
    cd PathToDir/File2/
    java -cp . File

Maybe you are looking for

  • Foxfire won't open I tried to find the issue in norton, but the directions don't apply to my norton it won't open at all

    It has to be something to do with norton firewall. however, I read the troubleshooting directions and I don't see what they say when I open norton. Please. please can someone help? I am so tired of this browser being nothing but a problem. I download

  • ITunes application cannot be opened.  Unknown error occured (-200)

    `every time i try to open iTunes 7, this pops up. It worked fine until i tried to do a system restore to try and fix my computer for other reasons, and now it doesn't work. I've tried to reinstall iTunes 6.5 but everytime i try to open that, a messag

  • How to optimize my computer performance?

    Thanks to the tweakers page, and many admins here, I've built my beast machine 6 months ago and it's great! I just want to know however, is there a way to see if there is a bottleneck in the system, or if something can be simply changed/upgraded to i

  • JavaFX Scatter plots

    Hello all, I have searched through these forums and not found anything. Is there any optimal way in which to add large amounts of data to a javaFX Scatterplot. It seems like attempting to plot more than 200 points slows down the software drastically.

  • Deadlocks and very high wait times

    We are seeing a very high number of deadlocks in the system. The deadlocks trace all show a 'enq: TX - row lock contention' with wait times of around 2929700+ seconds ex: last wait for 'enq: TX - row lock contention' blocking sess=0x70000006d85e1b8 s