Path to rt.jar from C program

How do I get path to rt.jar from a program written in C.
Thank you

Just like anything else you do in C. Pass in in via the command line or use a config file or use an environment variable or parse the registry (OS specific), etc.

Similar Messages

  • Executing code modules (seperate jars) from main program (main.jar)

    Hi all
    Sorry if i am crossposting, but i dont think that is the case.
    I have a main program ( in a jar ) and some modules to be executed and run in the main program.
    Theese components are packed a module in a single jar, and all theese jars are located in the same folder as the main program.
    The main classes in the module jars implement a interface known to the main tool, so that i can use them.
    My problem are, how to load the modules?
    I know i can use JarFile to get the manifests, and thereby get the name of the main class in each jar (they get obfuscated before launch, so no hardcoding of names).
    But how do i instanciate the mainclasses in the modules from the main tool ?
    hope you can help out.
    -Anders

    You can't. I understand the module approach as many others have similar designs. The first problem is that you need to add all the JARs to your classpath so that these JARs are known during starttime. There is no other solution to this if you don't write your own classloader that fetches classes during runtime and work peacefully with the other classloaders of the VM (it's a pain in the ass!). So, your main application needs to know the JAR files. Then it's a small step to also register the modules that your main app should know. Our approach is to have a small database table that holds the fully referenced class names of the modules that are available and can be used via Class.forName(). With this solution, we just need to stop the main app, copy the new JAR, adjust the classpath to add the new JAR, and restart the main app. After adding the new module names to the config table, the main app automatically uses them. Instead of a database table you can use e.g. a properties file.

  • Creating and running JARs from Java programs

    OK, I have been googling and searching, but this is something I cannot work out, so I raelly need some help.
    Basically, I am building a GUI app that would generate, compile and run java programs. And I also want to enable the users to create JARs they can later double-click if they want to run the program.
    I am using Runtime to compile programs and it works just fine. When I click on a button to create a JAR, my application creates one, but when I double-click on it, it can't find main and it exits. Now that is not so much unusual, but I am positive that my manifest file is OK, because when I run the same command from the command line, then I can click on the JAR file to run it.
    So what is the deal here? I mean, why would a JAR file created from the command line run and the one created through a GUI app using the very same command could not find main?
    Any help would be graetly appreciated.

    again, another unanswered question.
    BTW I'l keep bumping these until I get an answer that works. I have been up 3 hours now trying to get this sorted and it's something that netbeans is supposed to do on its own!?!?!?!?!
    Hello, SUN, is there anyone there???
    No, didn't think so.

  • Getting absolute path of a JAR from its classfiles?

    I am creating a class witch is going into a jar-file. With this jar-file I will also have another file (config/data-file). That file will allways be in the same directory as the jar-file.
    What I am wondering is: How can i programatically get the path of the "current" JAR file the "current" class is contained within, so that I can open/read the config/data file?
    Today I use a method which i hope I can replace with a better method:
    private static String jarfile="progconf.jar";
    private static String projectname="ProgramConfig";
    public static String getJarPath() throws Exception{
         try{
              String jvc = System.getProperty("java.class.path")+";";
              if(jvc.indexOf("\\"+jarfile+";")>0){
                   jvc = jvc.substring(0,jvc.indexOf("\\"+jarfile+";"))+"\\";
                   jvc = jvc.substring(jvc.lastIndexOf(":")-1); //Filsti
              }else if(jvc.indexOf("\\"+projectname+";")>0){
                   jvc = jvc.substring(0,jvc.indexOf("\\"+projectname+";"))+"\\";
                   jvc = jvc.substring(jvc.lastIndexOf(":")-1); //Filsti
              }else{
                   throw new Exception("Klarte ikke finne JarPath!");
              return jvc;
         }catch(Exception ex){
              throw new Exception("getJarPath-" + ex.getMessage());
    }-Wolflad

    check out my replies at the link shown below:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=494736
    ;o)
    V.V.

  • Retrieving Jar path in the HD from within the jar?

    I have a small problem. I wrote a program which is packed in a jar file and this program is able to compile and run java files (Which I do by running javac and java processes) but the kind of files that this program compiles requires some other libraries inside the same package (In the jar file) so I am wondering how can I retrieve the jar path in the harddisk from within this jar because at the moment I ask the user where the program is and I think it is kind of ugly to ask the user where the program is from within the exact same program we are looking for.
    Hope I made myself understandable.
    Best Regards
    NooK

    Thanks for the answer. I mistakenlly ended writing a new thread (New to the forum)
    but if you would kindly look here, I have other problem now which I have been working on for a whole day.
    http://forum.java.sun.com/thread.jsp?thread=524717&forum=31&message=2514471
    Best Regards
    NooK

  • Is it possible to verify a signed jar-file from a program?

    Is it possible to verify a signed jar-file from a program
    (using some API) likewise jarsigner does?

    Is it possible to verify a signed jar-file from a
    program
    (using some API) likewise jarsigner does?Hi,
    You would have to open the jarfile, read each jar entry and for each of them do a getCertificates() and then in turn verify each certificate with the public key of the enclosed certificates in the jar file.
    An easier solution would be to use the verify flag of the JarFile or JarInputStream.
    Hope it helps..
    Cheers,
    Vijay

  • Launch Jar from Program file

    Hello world,
    I need some help. I have a folder that contains my Jar file and some other files. My questions is, how do I make my Jar appear in the Programs or All Programs, (depending on which MS windows you are using) when the computer starts up? I tried putting the folder that contains the jar into the Program Files folder and restarted my computer, but the Jar did not show in the programs.
    Please guys, help me out here.
    Thanks.

    right click on your jar file, select copy from the pop-up menu, then click on the desktop and select paste shortcut, now you have a shortcut to your jar, now drag the shortcut over to the start button and let the dialog popup, drag it over the folder you want, then drop it in the list inside the folder--this will work on 98, Me, 2000, and XP but I do not know about ealier versions or windows.
    After you have made the shortcut you can do a right click on the start button and just explor to the folder you want and drag or paste the shortcut to the folder you want it to show in. This will work in all versions of windows 95 through XP.

  • Refering to jars from Java Embedding  and Spring Context

    Hi BPEL Experts
    I have been trying to create a Agile PLM session and get data from Agile PLM using two jars AgileAPI.jar and agileclasses.jar. I have placed the jar in following location
    C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext
    then run build.xml, my MANIFEST.MF as follows
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 20.10-b01 (Sun Microsystems Inc.)
    Implementation-Vendor: Oracle
    Implementation-Title: Oracle SOA EXT
    Implementation-Version: 11.1.1
    Product-Name: Oracle SOA EXT
    Product-Version: 11.1.1.4.0
    Specification-Version: 11.1.1
    Extension-Name: oracle.soa.ext
    Class-Path: ext/AgileAPI.jar ext/agileclasses.jar ext/log4j-1.2.17.jar
      classes/
    Then I updated BpelcClasspath From EM Console as follows
    C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\AgileAPI.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\agileclasses.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ext\log4j-1.2.17.jar
    Then Restarted the server, but seems the jars not loading to classpath, and the bpel is unable to refer to the jar. Please find the logs from server during the start up
    ** Setting up SOA specific environment for win...
    PATH=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\native;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\native;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\nati
    ve\win\32;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\bin;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\jre\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\
    bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Window
    s\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Oracle\Middleware\jdk160_29\bin;C:\Program Files\Microsoft\W
    eb Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Progr
    am Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mot\Mot Data Protection\Encryption\;C:\OracleSOA\Middleware\modules\org.apache.ant_1.7.1\bin;C:\ORAC
    LE~2\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;C:\OracleSOA\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\bin
    USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
    JAVA_OPTIONS= -Xverify:none
    ** End SOA Specific environment setup  for win.
    ** SOA specific environment is already set. Skipping ...
    "Rijesh CLASSPATH value is =  C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\user-patch.jar;C
    :\OracleSOA\Middleware\Oracle_SOA1\soa\modules\soa-startup.jar;;C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORAC
    LE~2\MIDDLE~1\patch_ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\JDK160~1\lib\tools.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\ser
    ver\lib\weblogic_sp.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\ORACLE~
    2\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\ORACLE~2\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.ja
    r;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\OracleSOA\Midd
    leware\Oracle_SOA1\soa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;C:\OracleSOA\Middleware\Oracle_SOA1\communications\modules\usermessag
    ing-config_11.1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.xdk_11.1.0\xsu12.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules.xquery_10.3.1.0
    .jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\db2jcc4.jar;C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\soa-infra;C:\OracleSOA\Middleware\Oracle_SOA1\
    soa\modules\fabric-url-handler_11.1.1.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\quartz-all-1.6.5.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle
    .soa.fabric_11.1.1\oracle.soa.fabric.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;C:\OracleSOA\Middleware\
    Oracle_SOA1\soa\modules\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;C:\
    ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\
    lib\xqrl.jar"
    "Rijesh Classpath end"
    JAVA Memory arguments: -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\user-patch.jar;C:\OracleSOA\Middlewa
    re\Oracle_SOA1\soa\modules\soa-startup.jar;;C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\patch_
    ocp371\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\ORACLE~2\MIDDLE~1\JDK160~1\lib\tools.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.
    jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules_10.3.6.0.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.
    3\server\lib\webservices.jar;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;C:\ORACLE~2\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;C:\ORACLE~2\MIDDLE
    ~1\ORACLE~1\soa\modules\commons-cli-1.1.jar;C:\ORACLE~2\MIDDLE~1\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\OracleSOA\Middleware\Oracle_SOA1\s
    oa\modules\oracle.soa.common.adapters_11.1.1\oracle.soa.common.adapters.jar;C:\OracleSOA\Middleware\Oracle_SOA1\communications\modules\usermessaging-config_11.1.1.ja
    r;C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.xdk_11.1.0\xsu12.jar;C:\ORACLE~2\MIDDLE~1\modules\features\weblogic.server.modules.xquery_10.3.1.0.jar;C:\OracleSOA\Mi
    ddleware\Oracle_SOA1\soa\modules\db2jcc4.jar;C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\soa-infra;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\fabric-u
    rl-handler_11.1.1.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\quartz-all-1.6.5.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\o
    racle.soa.fabric.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime-ext-wls.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modu
    les\oracle.soa.adapter_11.1.1\oracle.soa.adapter.jar;C:\OracleSOA\Middleware\Oracle_SOA1\soa\modules\oracle.soa.b2b_11.1.1\oracle.soa.b2b.jar;C:\ORACLE~2\MIDDLE~1\OR
    ACLE~1\modules\oracle.jrf_11.1.1\jrf.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\common\derby\lib\derbyclient.jar;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar
    PATH=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\native;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\native;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\nati
    ve\win\32;C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server\bin;C:\ORACLE~2\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\jre\bin;C:\ORACLE~2\MIDDLE~1\JDK160~1\
    bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Program Files (x86)\Common Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Window
    s\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Oracle\Middleware\jdk160_29\bin;C:\Program Files\Microsoft\W
    eb Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Progr
    am Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Mot\Mot Data Protection\Encryption\;C:\OracleSOA\Middleware\modules\org.apache.ant_1.7.1\bin;C:\ORAC
    LE~2\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8;C:\OracleSOA\Middleware\Oracle_SOA1\soa\thirdparty\edifecs\XEngine\bin
    *  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.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
    Java HotSpot(TM) Client VM (build 20.4-b02, mixed mode)
    Starting WLS with line:
    C:\ORACLE~2\MIDDLE~1\JDK160~1\bin\java -client   -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=C:\ORAC
    LE~2\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy  -Xverify:none  -da -Dplatform.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3 -Dwls.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\se
    rver -Dweblogic.home=C:\ORACLE~2\MIDDLE~1\WLSERV~1.3\server  -Dcommon.components.home=C:\ORACLE~2\MIDDLE~1\ORACLE~1 -Djrf.version=11.1.1 -Dorg.apache.commons.logging
    .Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Djrockit.optfile=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules
    \oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\servers\AdminServer -Doracle.domain.
    config.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1  -Digf.arisidbeans.carmlloc=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\
    carml  -Digf.arisidstack.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\ORACLE~2\MIDDLE~1\USER_P~
    1\domains\SOA_DO~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1\servers\AdminServer\tmp\_WL_user -Doracle
    .deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.ossoiap_11.1.1,C:\ORACLE~2\MIDDLE~1\ORACLE~1\modules\oracle.oamp
    rovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol"|"oracle.fabric.common.classloaderurl.handler"|"oracle.fabric.common.uddiurl.handler"|"oracle.bpm
    .io.fs.protocol  -Dweblogic.jdbc.remoteEnabled=false -Doracle.security.jps.policy.migration.validate.principal=false  -da:org.apache.xmlbeans... -Dsoa.archives.dir=C
    :\OracleSOA\Middleware\Oracle_SOA1\soa -Dsoa.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Dsoa.instance.home=C:\ORACLE~2\MIDDLE~1\USER_P~1\domains\SOA_DO~1 -Dtan
    gosol.coherence.clusteraddress=227.7.7.9 -Dtangosol.coherence.clusterport=9778 -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.
    MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=C:\ORACLE~2\MIDDLE~1\WLSERV~1
    .3\server\lib\DemoTrust.jks -Dem.oracle.home=C:\OracleSOA\Middleware\oracle_common -Djava.awt.headless=true -Dbam.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Du
    ms.oracle.home=C:\OracleSOA\Middleware\Oracle_SOA1 -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.e
    xt.dirs=C:\ORACLE~2\MIDDLE~1\patch_wls1036\profiles\default\sysext_manifest_classpath;C:\ORACLE~2\MIDDLE~1\patch_ocp371\profiles\default\sysext_manifest_classpath  w
    eblogic.Server
    <Sep 22, 2014 7:13:12 PM IST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this chec
    k, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <Sep 22, 2014 7:13:12 PM IST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this
    change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <Sep 22, 2014 7:13:12 PM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 20.4-b02 from Sun Microsystems I
    nc.>
    <Sep 22, 2014 7:13:12 PM IST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 >
    <Sep 22, 2014 7:13:13 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Sep 22, 2014 7:13:13 PM IST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Sep 22, 2014 7:13:14 PM IST> <Notice> <LoggingService> <BEA-320400> <The log file C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServer\logs\
    AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Sep 22, 2014 7:13:14 PM IST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\OracleSOA\Middleware\user_projects\domains\soa_domain\serve
    rs\AdminServer\logs\AdminServer.log00064. Log messages will continue to be logged in C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServer\log
    s\AdminServer.log.>
    <Sep 22, 2014 7:13:14 PM IST> <Notice> <Log Management> <BEA-170019> <The server log file C:\OracleSOA\Middleware\user_projects\domains\soa_domain\servers\AdminServe
    r\logs\AdminServer.log is opened. All server side log events will be written to this file.>
    <Sep 22, 2014 7:13:17 PM IST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Sep 22, 2014 7:13:26 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Sep 22, 2014 7:13:26 PM IST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>

    again, another unanswered question.
    BTW I'l keep bumping these until I get an answer that works. I have been up 3 hours now trying to get this sorted and it's something that netbeans is supposed to do on its own!?!?!?!?!
    Hello, SUN, is there anyone there???
    No, didn't think so.

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • How to use external jar in a program

    I am writing a java program which requires The class org.apache.commons.lang.StringUtils and the method StringUtils.upperCase(). I have downloaded the commons-lang-2.1.jar jar and put it in the lib directory under my project directory.
    But while compiling the program I am getting an error like this :
    package org.apache.commons.lang does not exist
    and can not find symbol , symbol : variable StringUtils
    Could anyone suggest me what to do so that the program compiles without error?

    I am using command line javac tool.
    Could you tell me how to tell compiler to include the
    jar.javac -classpath /some/directory/commons-lang-2.1.jar;(other required paths and/or jars) files to compile go here
    Please read tutorials too.
    http://java.sun.com/docs/books/tutorial/
    I would also suggest a good build tool called Ant.
    http://ant.apache.org/
    Message was edited by:
    warnerja

  • Runnable JAR from Eclipse with DLL

    Hi,
    Is it possible to export a runnable jar from Eclipse that includes and uses a dll?
    My simple application uses an 'external' API - JIntelliType - a jar file and a dll belongs to it.
    I can run the project fine from Eclipse, but I can't export it to runnable jar. I am a bit lost among classpath, path, build path, native library location, referenced library,..
    But maybe it doesn't matter because after trying to look this question up on the net, I am not sure if it is possible to do it with Eclipse (not without additional plugin at least).
    Could somebody please help me with this?
    Thank you in advance!
    lemonboston

    Your question is that of deployment. In Eclipse you setup your development environment to include native binaries in the projects working directory. As soon as you leave Eclipse you do not have its facilities anymore and you need to make do with what the JDK has to offer you.So your real question is: I have a jar and a DLL, the jar depends on the DLL. How do I run the application such that the DLL can be loaded by it?
    The answer is: you can provide through a system property (java.library.path) which directory Java (and ultimately the operating system) should scan for native binaries, or you can simply put the DLL in the same directory as the jar. The current working directory (the directory where Java is invoked) is always on the binary search pat of the operating system.
    The documentation for the java tool is here:
    http://download.oracle.com/javase/6/docs/technotes/tools/windows/java.html
    To pass a system property as a parameter you would do something like:
    java -Djava.library.path=path/to/libs -jar yourjar.jar

  • How to access database file on CDROM from Java Programe??

    Hello friends,
    I am making online exam application.
    I want my question database to be reside on CDROM.
    but i am not getting any idea how to make DSN or static path that resolute the path that i have mentioned for CDROM.
    basically i want to know how to access CDROM from Java Programe????
    Thanks in advance
    Navik Pathak

    Once you mounted the CDROM (something maybe as /media/cdrom) as a file system (or assigned a drive letter to it like D: or F: or whatever), the files are accessible normally.

  • Problem while running dos command from java program

    Dear friends,
    I need to terminate a running jar file from my java program which is running in the windows os.
    For that i have an dos command to find process id of java program and kill by using tskill command.
    Command to find process id is,
    wmic /output:ProcessList.txt process where "name='java.exe'" get commandline,processid
    This command gives the ProcessList.txt file and it contains the processid. I have to read this file to find the processid.
    when i execute this command in dos prompt, it gives the processid in the ProcessList.txt file. But when i execute the same command in java program it keeps running mode only.
    Code to run this command is,
    public class KillProcess {
         public static void main(String args[]) {
              KillProcess kProcess = new KillProcess();
              kProcess.getRunningProcess();
              kProcess = new KillProcess();
              kProcess.readProcessFile();
         public void getRunningProcess() {
              String cmd = "wmic /output:ProcessList.txt process where \"name='java.exe'\" get commandline,processid";
              try {
                   Runtime run = Runtime.getRuntime();
                   Process process = run.exec(cmd);
                   int i = process.waitFor();
                   String s = null;
                   if(i==0) {
                        BufferedReader stdInput = new BufferedReader(new
                               InputStreamReader(process.getInputStream()));
                        while ((s = stdInput.readLine()) != null) {
                         System.out.println("--> "+s);
                   } else {
                        BufferedReader stdError = new BufferedReader(new
                               InputStreamReader(process.getErrorStream()));
                        while ((s = stdError.readLine()) != null) {
                         System.out.println("====> "+ s);
                   System.out.println("Running process End....");
              } catch(Exception e) {
                   e.printStackTrace();
         public String readProcessFile() {
              System.out.println("Read Process File...");
              File file = null;
              FileInputStream fis = null;
              BufferedReader br = null;
              String pixieLoc = "";
              try {
                   file = new File("ProcessList.txt");
                   if (file.exists() && file.length() > 0) {
                        fis = new FileInputStream(file);
                        br = new BufferedReader(new InputStreamReader(fis, "UTF-16"));
                        String line;
                        while((line = br.readLine()) != null)  {
                             System.out.println(line);
                   } else {
                        System.out.println("No such file");
              } catch (Exception e) {
                   e.printStackTrace();
              return pixieLoc;
    }     when i remove the process.waitFor(), then while reading the ProcessList.txt file, it says "No such file".
    if i give process.waitFor(), then it's in running mode and program is not completed.
    Colud anyone please tell me how to handle this situation?
    or Is there anyother way to kill the one running process in windows from java program?
    Thanks in advance,
    Sathish

    Hi masijade,
    The modified code is,
    class StreamGobbler extends Thread
        InputStream is;
        String type;
        StreamGobbler(InputStream is, String type)
            this.is = is;
            this.type = type;
        public void run()
            try
                InputStreamReader isr = new InputStreamReader(is, "UTF-16");
                BufferedReader br = new BufferedReader(isr);
                String line=null;
                while ( (line = br.readLine()) != null)
                    System.out.println(type + ">" + line);
                } catch (IOException ioe)
                    ioe.printStackTrace(); 
    public class GoodWindowsExec
        public static void main(String args[])
            try
                String osName = System.getProperty("os.name" );
                String[] cmd = new String[3];
                 if( osName.equals( "Windows 95" ) )
                    cmd[0] = "command.com" ;
                    cmd[1] = "/C" ;
                    cmd[2] = "wmic process where \"name='java.exe'\" get commandline,processid";
                } else {
                    cmd[0] = "cmd.exe" ;
                    cmd[1] = "/C" ;
                    cmd[2] = "wmic process where \"name='java.exe'\" get commandline,processid";
                Runtime rt = Runtime.getRuntime();
                System.out.println("Execing " + cmd[0] + " " + cmd[1]
                                   + " " + cmd[2]);
                Process proc = rt.exec(cmd);
                System.out.println("Executing.......");
                // any error message?
                StreamGobbler errorGobbler = new
                    StreamGobbler(proc.getErrorStream(), "ERROR");           
                          // any output?
              StreamGobbler outputGobbler = new
                    StreamGobbler(proc.getInputStream(), "OUTPUT");
                          // kick them off
                errorGobbler.start();
                outputGobbler.start();
                // any error???
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);       
            } catch (Throwable t)
                t.printStackTrace();
    }when i execute the above code, i got output as,
    Execing cmd.exe /C wmic process where "name='java.exe'" get commandline,processid
    and keeps in running mode only.
    If i execute the same command in dos prompt,
    CommandLine
    ProcessId
    java -classpath ./../lib/StartApp.jar;./../lib; com.abc.middle.startapp.StartAPP  2468
    If i modify the command as,
    cmd.exe /C wmic process where "name='java.exe'" get commandline,processid  > 123.txt
    and keeps in running mode only.
    If i open the file when program in running mode, no contents in that file.
    If i terminte the program and if i open the file, then i find the processid in that file.
    Can you help me to solve this issue?

  • Running a jar from the command line

    I am trying to run a Jar from the command line. I have a number of classes in a package called "trainnn".
    I put all the classes into a jar
    jar cvf name.jar trainnn\*.classI then creat a file called mainClass.txt with the line (with a blank return line after it, where QueryMatch has the main). This file was placed in the same directory as the package and the jar file
    Main-Class: QueryMatch
    then
    jar cmf mainClass.txt network.jar G:/TrainNN/src/trainnn/QueryMatch.classthis worked fine.....but it is from here I have problems when I try run the jar
    java -jar network.jarbut get this error.
    Exception in thread "main" java.lang.NoClassDefFoundError: QueryMatch
    I cant figure out this error, I have tried specifying the exact path in the mainClass.txt file but that didnt work.
    Any ideas
    Thanks in advance.

    Hi,
    To start a java app in the command line with "java -jar yourJarFile.jar", the jar needs to have a mainfest file "MANIFEST.MF" in a folder called "META-INF". The manifest file would have to contain the name of your starting class, e.g. it could look like thisManifest-Version: 1.0
    Main-Class: com.yourCompany.yourProject.YourClass Hope that helps. Cheers, HJK

  • Java API from ABAP program.

    Hi
    I have a requirement to call a Java API from ABAP program.
    We are using a third party component for encrypting the files
    using Java API The component consist of ".jar" files. I need to
    know exactly where we need to copy the ".jar" files on application server,
    so that I can call the API methods in my ABAP code and process the file in SAP,
    and how to establish a connect with there server for the encryption.
    Thanks
    Regards
    Lalith

    LInk is:
    /people/puru.govind/blog/2006/12/20/let-abap-speak?page=last&x-maxdepth=0

Maybe you are looking for