Execution path of an  file at runtime

I have dir stucture like this
D:\first;
D:\first\second;
both of these are included in my classpath.
I have a package structre as
com.myName.MyPack
The above package is stored in both the structures mentioned above.
FileName.class is a file inside the package, and hence can have two absolute paths
D:\first\com\myName\MyPack\FileName.class
D:\first\second\com\myName\MyPack\FileName.class
The Command
java com.myName.MyPack.FileName
is given form the D: itself.
Now I need to know which class is called (it might be any of the two as the classpath is set in the users system).
I need to get the absolute path of the class which is loaded by the classLoader how do I do it.
Is there any api or method to know the above

Double-posted here: http://forum.java.sun.com/thread.jsp?thread=416540&forum=31&message=1840525

Similar Messages

  • Is it possible to add path to .property files at runtime?

    I have 3rd party jars that require access to property files. I won't know the path to these property files until I execute some discovery code at runtime. Is there some mechanism to add these directories to the path at runtime?

    Hi Marco,
    I assume your requirement is :
    At design time bind Inuputfield IP1 to ATTR1 and at runtime bind IP1 to ATTR2 on some condition.
    Instead of changing the binding you can have two input fields IP1 and IP2 bound to ATTR1 and ATTR2  .
    Hide IP2 initially ( Bind attributes of type WDUI_VISIBILITY to the 'Visible' property of IP2 and IP1 )
    On the event or condition you want it to change , hide IP1 and unhide IP2.
    I hope it helps.
    Please revert in case of issues.
    Regards,
    Sumit

  • Could not find a part of the path 'C:\Program Files\Update Services\Schema\

    clean SC 2012 R2 RTM.
    1. had problems with WSUS installation/post configuration
    2. found a blog with an identical problem where the problem was solved with the call to Microsoft. Tools directory was missing.
    I followed the suggestion: reinstalled WSUS using ps and wsusutil.
    I canceled WSUS configuration at recommended step. Everything looked fine.
    But after SUP creation I found SMS_WSUS_CONFIGURATION_MANAGER warning.
    I checked WCM.log and found Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.
    When checked there was no Schema folder in the path above. So it's just missing as folder TOOLS before troubleshooting.
    Any suggestions for fixing this.
    Thanks.
    Here is partial WCM that could help to find the issue, I clearly see that there is no Schema directory in C:\Program Files\Update Services:
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
    Verify Upstream Server settings on the Active WSUS Server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
    No changes - WSUS Server settings are correctly configured and Upstream Server is set to Microsoft Update SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
    Refreshing categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
    Successfully refreshed categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:14 PM 4536 (0x11B8)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:20 PM 4536 (0x11B8)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:20 PM 4536 (0x11B8)
    Successfully inserted WSUS Enterprise Update Source object {91F81925-CC1D-40C0-98C3-902AD3717594} SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:21 PM 4536 (0x11B8)
    Configuration successful. Will wait for 1 minute for any subscription or proxy changes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:21 PM 4536 (0x11B8)
    Setting new configuration state to 2 (WSUS_CONFIG_SUCCESS) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:21 PM 4536 (0x11B8)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:21 PM 4536 (0x11B8)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:21 PM 4536 (0x11B8)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    PublishApplication(8427071A-DA80-48C3-97DE-C9C528F73A2D) failed with error System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~   at System.IO.__Error.WinIOError(Int32
    errorCode, String maybeFullPath)~~   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath,
    Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)~~   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)~~  
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)~~   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)~~   at System.Xml.XmlTextReaderImpl.FinishInitUriString()~~  
    at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)~~   at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)~~   at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage.Verify(String
    packageFile)~~   at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage..ctor(String packageFile)~~   at Microsoft.UpdateServices.Internal.BaseApi.Publisher.LoadPackageMetadata(String sdpFile)~~   at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetPublisher(String
    sdpFile)~~   at Microsoft.SystemsManagementServer.WSUS.WSUSServer.PublishApplication(String sPackageId, String sSDPFile, String sCabFile) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    ERROR: Failed to publish sms client to WSUS, error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    STATMSG: ID=6613 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_CONFIGURATION_MANAGER" SYS=confman.contoso.lan SITE=MON PID=1716 TID=4536 GMTDATE=Sat Dec 07 22:10:22.831 2013 ISTR0="8427071A-DA80-48C3-97DE-C9C528F73A2D" ISTR1="5.00.7958.1000"
    ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    Failed to publish client with error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    completed checking for client deployment SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    HandleSMSClientPublication failed. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    Waiting for changes for 58 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
    Shutting down... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:51:31 PM 4536 (0x11B8)
    Shutting Down... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:51:31 PM 4536 (0x11B8)
    SMS_EXECUTIVE started SMS_WSUS_CONFIGURATION_MANAGER as thread ID 4168 (0x1048). SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:38 PM 2008 (0x07D8)
    This confman.contoso.lan system is the SMS Site Server. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
    Populating config from SCF SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
    Setting new configuration state to 1 (WSUS_CONFIG_PENDING) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
    Changes in active SUP list detected. New active SUP List is: SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
        SUP0: confman.contoso.lan, group = CONFMAN, nlb = SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
    Updating active SUP groups... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
    Waiting for changes for 1 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
    Wait timed out after 0 minutes while waiting for at least one trigger event. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:43 PM 4168 (0x1048)
    Timed Out... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Checking for supported version of WSUS (min WSUS 3.0 SP2 + KB2720211 + KB2734608) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Checking runtime v2.0.50727... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Did not find supported version of assembly Microsoft.UpdateServices.Administration. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Checking runtime v4.0.30319... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Found supported assembly Microsoft.UpdateServices.Administration version 4.0.0.0, file version 6.3.9600.16384 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Found supported assembly Microsoft.UpdateServices.BaseApi version 4.0.0.0, file version 6.3.9600.16384 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Supported WSUS version found SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:55 PM 4168 (0x1048)
    Verify Upstream Server settings on the Active WSUS Server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:55 PM 4168 (0x1048)
    No changes - WSUS Server settings are correctly configured and Upstream Server is set to Microsoft Update SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
    Setting new configuration state to 4 (WSUS_CONFIG_SUBSCRIPTION_PENDING) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
    Refreshing categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
    Successfully refreshed categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:27 PM 4168 (0x1048)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:32 PM 4168 (0x1048)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:32 PM 4168 (0x1048)
    Configuration successful. Will wait for 1 minute for any subscription or proxy changes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:32 PM 4168 (0x1048)
    Setting new configuration state to 2 (WSUS_CONFIG_SUCCESS) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:32 PM 4168 (0x1048)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:32 PM 4168 (0x1048)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:32 PM 4168 (0x1048)
    Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:34 PM 4168 (0x1048)
    Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:34 PM 4168 (0x1048)
    PublishApplication(8427071A-DA80-48C3-97DE-C9C528F73A2D) failed with error System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~   at System.IO.__Error.WinIOError(Int32
    errorCode, String maybeFullPath)~~   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath,
    Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)~~   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)~~  
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)~~   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)~~   at System.Xml.XmlTextReaderImpl.FinishInitUriString()~~  
    at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)~~   at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)~~   at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage.Verify(String
    packageFile)~~   at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage..ctor(String packageFile)~~   at Microsoft.UpdateServices.Internal.BaseApi.Publisher.LoadPackageMetadata(String sdpFile)~~   at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetPublisher(String
    sdpFile)~~   at Microsoft.SystemsManagementServer.WSUS.WSUSServer.PublishApplication(String sPackageId, String sSDPFile, String sCabFile) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    ERROR: Failed to publish sms client to WSUS, error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    STATMSG: ID=6613 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_CONFIGURATION_MANAGER" SYS=confman.contoso.lan SITE=MON PID=1668 TID=4168 GMTDATE=Sat Dec 07 22:55:35.051 2013 ISTR0="8427071A-DA80-48C3-97DE-C9C528F73A2D" ISTR1="5.00.7958.1000"
    ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    Failed to publish client with error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    completed checking for client deployment SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    HandleSMSClientPublication failed. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    Waiting for changes for 58 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    Trigger event array index 0 ended. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
    SCF change notification triggered. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:40 PM 4168 (0x1048)
    Populating config from SCF SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:40 PM 4168 (0x1048)
    Waiting for changes for 58 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:40 PM 4168 (0x1048)
    "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

    >Any Errors in SUPSetup.log and WSUSCtrl.log log files?
    No errors in these files. As I mentioned there is no Schema folder in  Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~ 
    Here are 3 repetitive errors in WCM.log:
    1. PublishApplication(8427071A-DA80-48C3-97DE-C9C528F73A2D) failed with error System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~   at System.IO.__Error.WinIOError(Int32
    errorCode, String maybeFullPath)~~   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath,
    Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)~~   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)~~  
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)~~   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)~~   at System.Xml.XmlTextReaderImpl.FinishInitUriString()~~  
    at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)~~   at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)~~   at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage.Verify(String
    packageFile)~~   at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage..ctor(String packageFile)~~   at Microsoft.UpdateServices.Internal.BaseApi.Publisher.LoadPackageMetadata(String sdpFile)~~   at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetPublisher(String
    sdpFile)~~   at Microsoft.SystemsManagementServer.WSUS.WSUSServer.PublishApplication(String sPackageId, String sSDPFile, String sCabFile)
    2. Failed to publish client with error = 0x80070003
    3. HandleSMSClientPublication failed.
    "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

  • How to capture output of java files using Runtime.exec

    Hi guys,
    I'm trying to capture output of java files using Runtime.exec but I don't know how. I keep receiving error message "java.lang.NoClassDefFoundError:" but I don't know how to :(
    import java.io.*;
    public class CmdExec {
      public CmdExec() {
      public static void main(String argv[]){
         try {
         String line;
         Runtime rt = Runtime.getRuntime();
         String[] cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E.java";
         Process proc = rt.exec(cmd);
         cmd = new String[2];
         cmd[0] = "javac";
         cmd[1] = "I:\\My Documents\\My file\\CSM\\CSM00\\SmartQ\\src\\E";
         proc = rt.exec(cmd);
         //BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
         BufferedReader input = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
         while ((line = input.readLine()) != null) {
            System.out.println(line);
         input.close();
        catch (Exception err) {
         err.printStackTrace();
    public class E {
        public static void main(String[] args) {
            System.out.println("hello world!!!!");
    }Please help :)

    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassNameYou get a NoClassDefFoundError message because the JVM (Java Virtual Machine) can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.
    javac -classpath .;<any additional jar files or directories> YourClassName.javaYou get a "cannot resolve symbol" message because the compiler can't find your class. The way to remedy this is to ensure that your class is included in the classpath. The example assumes that you are in the same directory as the class you're trying to run.

  • How to handle spaces in using path to the file

    Hi Friends,
    I am getting error "file not found" if I give path of the file that contains spaces in it. (eg. C:\Users\Sample Project\file.txt)
    If I give path that doesn't contain spaces (eg. C:\Users\Sample\file.txt) then it works fine without any error.
    Basically I am invoking one command at runtime (using "exec") in my java program that excepts path of the file as one parameter.
    I can't remove space by manipulating path - othewise that path will be different.
    How can I solve this issue?
    Thanks

    Works for me:
    import java.io.*;
    public class ProcessExample {
        public static void main(String[] args) throws IOException {
            if (args.length == 0) {
                Runtime r = Runtime.getRuntime();
                dump(r.exec("java ProcessExample foo \"bar baz\""));
            } else {
                for(String s : args) {
                    System.out.println(s);
        static void dump(Process p) throws IOException {
            BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
            for(String s; (s = r.readLine()) != null; ) {
                System.out.println("[" + s + "]");
    }But ejp's advice is even better.

  • How to get rejected file absolute path location in file rejection handler

    HI,
    Right now I am working in the below scenario in SOA11G.
    1) Create a file adapter service and wire it to a BPEL process.
    2) Create a Fault-policies file where we have referred a Java Action as a Fault policy.
    3) Refer that fault-policy to the Fault-Binding file and put both the file in the same directory with composite.xml file.
    4) So when any rejection message happened with any wrong incoming file, the Java Action is getting called.
    But as per my requirement I want to get the absolute path of the incoming file in my java action, so that I can write some other logic to copy that file to some other location.
    So is there any API available to achieve this or any logic about how to get the absolute path of a rejected file at runtime.
    Regards,
    Tripathy.

    Hi Omar,
    You need to use OPEN_DATASET & READ DATASET statements to get the file from application server.
    Steps:
    Open dataset in read mode
    Read the data set and collect into internal table
    Now, convert this into XSTRING by using function module SCMS_STRING_TO_XSTRING
    After converting into XSTRING, you can use CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE to download into local system
    Please refer the below links
    Upload File from SAP Application Server using ABAP
    Application Server Program - ABAP Development - SCN Wiki
    Hope this helps you.
    Regards,
    Rama

  • Problem in opening a doc file using Runtime.exec()

    Code:
    import java.io.*;
    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);
                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[]) {
             String file = "test.doc";
             String appPath = "/C";
            try {
                String osName = System.getProperty("os.name" );
                System.out.println("OS : " + osName);
                String[] cmd = new String[3];
                if( osName.equals( "Windows NT" ) || osName.equals( "Windows XP" )) {
                    cmd[0] = "cmd.exe" ;
                    cmd[1] = appPath;
                    cmd[2] = file;
                else if( osName.equals( "Windows 95" ) ) {
                    cmd[0] = "command.com" ;
                    cmd[1] = appPath;
                    cmd[2] = file;
                Runtime rt = Runtime.getRuntime();
                System.out.println("Execing " + cmd[0] + " " + cmd[1] + " " + cmd[2]);
                Process proc = rt.exec(cmd);
                // 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();
    }I got this code from internet. Program will work fine if my "test.doc" is in "C:\test.doc" directory. Is there any way to get the application path and open the doc file or how to give a specified path for my doc file
    EG:- "C:\TestDir\test.doc"
    Thanks

    Well /C is not the path to the app. It is a switch to
    the command line.
    set your file name to "C:/test.doc"
    ~TimSorry, I guess my reply doesn't really answer the problem. But you can supply the entire path as part of the file name string.
    String file = "C:/Path/To/My/File/to execute/test.doc"

  • Problem with optimiser choosing different execution path to that expected!

    We have a sql statement that uses sub-query factoring, and a materialize hint in one of the sub-queries. The query runs fine for me when I do the query manually - it does the Temp Table Transformation as I expect it to (due to the materialize hint). The query runs in under 2 mins, and the explain plan says a cost of 154.
    Take away the materialize hint, and I get an execution path with a cost of 149, and the query runs in just under 2 hours (!). The explain plan then contains two filter steps, listing the predicates (not exists).
    The problem we're seeing is that when we run the overall process that runs the sql statement and outputs the results to file, instead of it using the materialized explain plan, it appears to be using the non-materialized explain plan, but the predicates bit just says "IS NULL". It has a cost of 149.
    I suspect that the optimiser has somehow worked out that the sub-query in question actually returns no rows, and has therefore worked out a "cheaper" method of getting the results. Thing is, I run the exact same (unfortunately, not bound) query manually and it uses the materialized explain plan!
    The process does run the sub-query in question on it's own, but without the materialized hint. I've done similar manually, just in case this affects things by having the results in memory, but it didn't alter the fact that I still got the materialized plan.
    I'm at a loss as to how it knows that the sub-query returns no rows, and as to why the same query is effectively giving two different execution paths under the same circumstances.
    Can anyone give me their thoughts as to what might be happening with the predicates bit, or any pointers as to where to look next, please?
    TIA

    Yes, it's the same database, so same data, same statistics, same user, etc.
    This is with the materialized hint:
    Time     IO Cost     CPU Cost     Cardinality     Bytes     Cost     Plan
    1     110     2,349,615     1     316     154     SELECT STATEMENT  ALL_ROWS                                                       
    24      24      24      24      24      24           24 TEMP TABLE TRANSFORMATION                                                    
    6      6      6      6      6      6                6 LOAD AS SELECT BROIL_FEED.DIM_CURVE_MAPPING                                              
    5      5      5      5      5      5                     5 FILTER  Filter Predicates: NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM1" WHERE "CM1"."TRADE_NAME"=:B1 AND "CM1"."RISK_TYPE"='TVReport' AND "CM1"."RUN_ID"=:B2) OR  NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM2" WHERE "CM2"."TRADE_NAME"=:B3 AND "CM2"."RISK_TYPE"='Delta' AND "CM2"."RUN_ID"=:B4) OR  NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM3" WHERE "CM3"."TRADE_NAME"=:B5 AND "CM3"."RISK_TYPE"='Issuer' AND "CM3"."RUN_ID"=:B6)                                          
    1 1     1 4     1 28,686     1 1     1 19     1 5                         1 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "RUN_ID"=207270                                     
    2 1     2 4     2 28,686     2 1     2 29     2 5                         2 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM1"."RUN_ID"=:B1 AND "CM1"."RISK_TYPE"='TVReport' AND "CM1"."TRADE_NAME"=:B2                                     
    3 1     3 4     3 29,086     3 2     3 58     3 5                         3 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM2"."RUN_ID"=:B1 AND "CM2"."RISK_TYPE"='Delta' AND "CM2"."TRADE_NAME"=:B2                                     
    4 1     4 4     4 29,086     4 2     4 58     4 5                         4 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM3"."RUN_ID"=:B1 AND "CM3"."RISK_TYPE"='Issuer' AND "CM3"."TRADE_NAME"=:B2                                     
    23 1     23 106     23 2,320,930     23 1     23 316     23 149               23 WINDOW SORT                                               
    22      22      22      22      22      22                     22 FILTER  Filter Predicates: NOT EXISTS (SELECT /*+ */ 0 FROM  (SELECT /*+ CACHE_TEMP_TABLE ("T1") */ "C0" "TRADENAME" FROM "SYS"."SYS_TEMP_0FD9D6638_7866E0A0" "T1") "ERRORED_TRADES" WHERE LNNVL("TRADENAME"<>:B1))                                          
    19 1     19 101     19 2,313,658     19 2     19 632     19 144                         19 HASH JOIN OUTER  Access Predicates: "THEDATA"."BUCKET"="TENOR"(+)                                     
    17 1     17 12     17 252,229     17 2     17 598     17 17                              17 NESTED LOOPS OUTER                                
    14 1     14 10     14 233,806     14 2     14 442     14 14                                   14 VIEW BROIL_FEED.                          
    13 1     13 5     13 90,069     13 2     13 174     13 14                                        13 SORT UNIQUE                      
    12      12      12      12      12      12                                              12 UNION-ALL                 
    8 1     8 5     8 36,349     8 1     8 89     8 6                                                  8 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.CREDIT_MRCDATA Filter Predicates: "CM"."RISK_TYPE"='Delta' OR "CM"."RISK_TYPE"='TVReport' OR "CM"."RISK_TYPE"='Issuer' AND "CM"."SHOCK"=0            
    7 1     7 4     7 28,686     7 1     7      7 5                                                       7 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM"."RUN_ID"=207270       
    11 1     11 5     11 143,737     11 1     11 85     11 8                                                  11 HASH GROUP BY            
    10 1     10 5     10 36,297     10 1     10 85     10 6                                                       10 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.CREDIT_MRCDATA      
    9 1     9 4     9 28,686     9 1     9      9 5                                                            9 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "RUN_ID"=207270 AND "RISK_TYPE"='Delta' 
    16 1     16 1     16 9,211     16 1     16 78     16 1                                   16 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.DIM_CURVE_MAPPING                          
    15 1     15 0     15 1,900     15 1     15      15 0                                        15 INDEX UNIQUE SCAN INDEX (UNIQUE) BROIL_FEED.DIM_RISK_CURVENAME Access Predicates: "THEDATA"."RISK_CURVE_NAME"="DIM_CURVE_MAPPING"."RISK_CURVE_NAME"(+)                      
    18 1     18 89     18 1,450,669     18 5,836     18 99,212     18 116                              18 TABLE ACCESS FULL TABLE BROIL_FEED.DIM_TENOR                               
    21 1     21 5     21 7,271     21 1     21 77     21 5                         21 VIEW BROIL_FEED. Filter Predicates: LNNVL("TRADENAME"<>:B1)                                     
    20 1     20 5     20 7,271     20 1     20 14     20 5                              20 TABLE ACCESS FULL TABLE (TEMP) SYS.SYS_TEMP_0FD9D6638_7866E0A0                This is the explain plan for the query without the materialized hint:
    Time     IO Cost     CPU Cost     Cardinality     Bytes     Cost     Plan
    1     105     2,342,394     1     316     149     SELECT STATEMENT  ALL_ROWS                                                  
    20 1     20 105     20 2,342,394     20 1     20 316     20 149          20 WINDOW SORT                                               
    19      19      19      19      19      19                19 FILTER  Filter Predicates: NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "SYS_ALIAS_6" WHERE ( NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM1" WHERE "CM1"."TRADE_NAME"=:B1 AND "CM1"."RISK_TYPE"='TVReport' AND "CM1"."RUN_ID"=:B2) OR  NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM2" WHERE "CM2"."TRADE_NAME"=:B3 AND "CM2"."RISK_TYPE"='Delta' AND "CM2"."RUN_ID"=:B4) OR  NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM3" WHERE "CM3"."TRADE_NAME"=:B5 AND "CM3"."RISK_TYPE"='Issuer' AND "CM3"."RUN_ID"=:B6)) AND "RUN_ID"=207270 AND LNNVL("TRADE_NAME"<>:B7))                                          
    13 1     13 101     13 2,313,658     13 2     13 632     13 144                    13 HASH JOIN OUTER  Access Predicates: "THEDATA"."BUCKET"="TENOR"(+)                                     
    11 1     11 12     11 252,229     11 2     11 598     11 17                         11 NESTED LOOPS OUTER                                
    8 1     8 10     8 233,806     8 2     8 442     8 14                              8 VIEW BROIL_FEED.                          
    7 1     7 5     7 90,069     7 2     7 174     7 14                                   7 SORT UNIQUE                      
    6      6      6      6      6      6                                         6 UNION-ALL                 
    2 1     2 5     2 36,349     2 1     2 89     2 6                                             2 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.CREDIT_MRCDATA Filter Predicates: "CM"."RISK_TYPE"='Delta' OR "CM"."RISK_TYPE"='TVReport' OR "CM"."RISK_TYPE"='Issuer' AND "CM"."SHOCK"=0            
    1 1     1 4     1 28,686     1 1     1      1 5                                                  1 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM"."RUN_ID"=207270       
    5 1     5 5     5 143,737     5 1     5 85     5 8                                             5 HASH GROUP BY            
    4 1     4 5     4 36,297     4 1     4 85     4 6                                                  4 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.CREDIT_MRCDATA      
    3 1     3 4     3 28,686     3 1     3      3 5                                                       3 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "RUN_ID"=207270 AND "RISK_TYPE"='Delta' 
    10 1     10 1     10 9,211     10 1     10 78     10 1                              10 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.DIM_CURVE_MAPPING                          
    9 1     9 0     9 1,900     9 1     9      9 0                                   9 INDEX UNIQUE SCAN INDEX (UNIQUE) BROIL_FEED.DIM_RISK_CURVENAME Access Predicates: "THEDATA"."RISK_CURVE_NAME"="DIM_CURVE_MAPPING"."RISK_CURVE_NAME"(+)                      
    12 1     12 89     12 1,450,669     12 5,836     12 99,212     12 116                         12 TABLE ACCESS FULL TABLE BROIL_FEED.DIM_TENOR                               
    18      18      18      18      18      18                     18 FILTER  Filter Predicates: NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM1" WHERE "CM1"."TRADE_NAME"=:B1 AND "CM1"."RISK_TYPE"='TVReport' AND "CM1"."RUN_ID"=:B2) OR  NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM2" WHERE "CM2"."TRADE_NAME"=:B3 AND "CM2"."RISK_TYPE"='Delta' AND "CM2"."RUN_ID"=:B4) OR  NOT EXISTS (SELECT /*+ */ 0 FROM "CREDIT_MRCDATA" "CM3" WHERE "CM3"."TRADE_NAME"=:B5 AND "CM3"."RISK_TYPE"='Issuer' AND "CM3"."RUN_ID"=:B6)                                     
    14 1     14 4     14 28,736     14 1     14 19     14 5                         14 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "RUN_ID"=207270  Filter Predicates: LNNVL("TRADE_NAME"<>:B1)                                
    15 1     15 4     15 28,686     15 1     15 29     15 5                         15 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM1"."RUN_ID"=:B1 AND "CM1"."RISK_TYPE"='TVReport' AND "CM1"."TRADE_NAME"=:B2                                
    16 1     16 4     16 29,086     16 2     16 58     16 5                         16 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM2"."RUN_ID"=:B1 AND "CM2"."RISK_TYPE"='Delta' AND "CM2"."TRADE_NAME"=:B2                                
    17 1     17 4     17 29,086     17 2     17 58     17 5                         17 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM3"."RUN_ID"=:B1 AND "CM3"."RISK_TYPE"='Issuer' AND "CM3"."TRADE_NAME"=:B2       And this is what the process is running:
    Time     IO Cost     CPU Cost     Cardinality     Bytes     Cost     Plan
                             149     SELECT STATEMENT  ALL_ROWS                                                  
    20 1     20 105     20 2,342,394     20 1     20 316     20 149          20 WINDOW SORT                                               
    19      19      19      19      19      19                19 FILTER  Filter Predicates: IS NULL                                          
    13 1     13 101     13 2,313,658     13 2     13 632     13 144                    13 HASH JOIN OUTER  Access Predicates: "THEDATA"."BUCKET"="TENOR"                                     
    11 1     11 12     11 252,229     11 2     11 598     11 17                         11 NESTED LOOPS OUTER                                
    8 1     8 10     8 233,806     8 2     8 442     8 14                              8 VIEW                           
    7 1     7 5     7 90,069     7 2     7 174     7 14                                   7 SORT UNIQUE                      
    6      6      6      6      6      6                                         6 UNION-ALL                 
    2 1     2 5     2 36,349     2 1     2 89     2 6                                             2 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.CREDIT_MRCDATA Filter Predicates: (INTERNAL_FUNCTION("CM"."RISK_TYPE") OR ("CM"."RISK_TYPE"='Issuer' AND "CM"."SHOCK"=0))            
    1 1     1 4     1 28,686     1 1     1      1 5                                                  1 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM"."RUN_ID"=207268       
    5 1     5 5     5 143,737     5 1     5 85     5 8                                             5 HASH GROUP BY            
    4 1     4 5     4 36,297     4 1     4 85     4 6                                                  4 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.CREDIT_MRCDATA      
    3 1     3 4     3 28,686     3 1     3      3 5                                                       3 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "RUN_ID"=207268 AND "RISK_TYPE"='Delta' 
    10 1     10 1     10 9,211     10 1     10 78     10 1                              10 TABLE ACCESS BY INDEX ROWID TABLE BROIL_FEED.DIM_CURVE_MAPPING                          
    9      9 0     9 1,900     9 1     9      9 0                                   9 INDEX UNIQUE SCAN INDEX (UNIQUE) BROIL_FEED.DIM_RISK_CURVENAME Access Predicates: "THEDATA"."RISK_CURVE_NAME"="DIM_CURVE_MAPPING"."RISK_CURVE_NAME"                      
    12 1     12 89     12 1,450,669     12 5,836     12 99,212     12 116                         12 TABLE ACCESS FULL TABLE BROIL_FEED.DIM_TENOR                               
    18      18      18      18      18      18                     18 FILTER  Filter Predicates: ( IS NULL OR  IS NULL OR  IS NULL)                                     
    14 1     14 4     14 28,736     14 1     14 19     14 5                         14 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "RUN_ID"=207268  Filter Predicates: LNNVL("TRADE_NAME"<>:B1)                                
    15 1     15 4     15 28,686     15 1     15 29     15 5                         15 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM1"."RUN_ID"=:B1 AND "CM1"."RISK_TYPE"='TVReport' AND "CM1"."TRADE_NAME"=:B2                                
    16 1     16 4     16 29,086     16 2     16 58     16 5                         16 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM2"."RUN_ID"=:B1 AND "CM2"."RISK_TYPE"='Delta' AND "CM2"."TRADE_NAME"=:B2                                
    17 1     17 4     17 29,086     17 2     17 58     17 5                         17 INDEX RANGE SCAN INDEX BROIL_FEED.CREDIT_MRCDATA_IDX Access Predicates: "CM3"."RUN_ID"=:B1 AND "CM3"."RISK_TYPE"='Issuer' AND "CM3"."TRADE_NAME"=:B2       P.S., Forgot to mention - my database is 10.2.0.2.
    Message was edited by:
    Boneist

  • How to get folder(directory path only not file path) from local file system

    Hi Firends,
    How to get folder(directory path only not file path) from local file system , whenevr i will click on browse button.
    Please give reply for this one , if anybody knows.
    Thanks,
    Anderson.

    Hi Anderson,
    if you're using flash.filesystem.FileReference - then it is run in black box - except of filename, size and creation data (and few other properties available after some operation succeeded). This is part of security features in Flash runtime (described in header section):
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html
    This for example implies that user can download a content to local machine - but that content cannot be loaded back into Flash runtime. For this you would need either Air runtime flash.filesystem.File:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.h tml
    (so you would created Air runtime based application: desktop or mobile but not web, even as standalone project) or you would need one of 3rd party tools that add file access/file information features to standard Flash runtime applications converted to standalone native applications.
    hth,
    kind regards,
    Peter

  • WMIC get Executable path in batch file

    Hi,
    I would like to get a execution path of a process using batch file. I wrote,
    FOR /F "usebackq skip=1 tokens=* delims==" %%f IN (`wmic process where "ProcessID=8000" get ExecutablePath`) DO echo %%f
    This command gives the execution path. But i cant set the value in a variable. Set command also fails here. 
    Please anyone help me.

    Hi,
    I would like to get a execution path of a process using batch file. I wrote,
    FOR /F "usebackq skip=1 tokens=* delims==" %%f IN (`wmic process where "ProcessID=8000" get ExecutablePath`) DO echo %%f
    This command gives the execution path. But i cant set the value in a variable. Set command also fails here. 
    Please anyone help me.
    Here you go:
    @echo off
    FOR /F "delims==" %%f IN ('wmic process where "ProcessID=3940" get ExecutablePath ^| find "\"') do set Exe=%%f
    echo %Exe%

  • LSMW: Error concerning the logical path in Specify Files step

    Hi,
    I am trying on an ECC 6.0 EHP6 system to upload (open) POs from an existing SAP ERP system. Since I faced some complications in batch input recording method, I decided to go with the standard batch/direct input method.
    I selected object 0085 (Purchase Order) and method 0001 (Purchase Order). The program that is used is RM06EEI0. I followed all the usual steps, but in the "Specify Files" step I get the message:
    '****.lsmw.conv' does not exist; edit the logical path using transaction FILE
    Being aware of both the FILE and SF01 transactions, I created the logical path and file (through the FILE transaction). However, after the modification, I get the message:
    Logical file '****' is not assigned to physical file '****.lsmw.conv'
    There is also the related SAP Note 753511 (Logical and physical path and file name in transaction LSMW) that refers to this case.

    Hi,
    Click on specify file radio button>Legacy data-on the PC Front end
    where input file location like C:\mydocument\desktop\test.txt
    and give input in Name field: mydocument
    in delimiter section > select Tabular
    File structure section> tick on Field order matches source structure definition
    File type: Record end marker(Text file)
    then press enter key and other steps as same.
    Second thing you said that you have used Batch input recording
    after creation and recording finish , scroll the page below on recording and put a cursor unwanted field and remove unwanted input field.
    I hope your problem will resolve. you can find the steps pdf on Google search try now.
    Thanks
    Sanjeet Kumar

  • Displaying the path of the file selected by a FileChooser in a TextField

    I'm just getting started with Swing. I developed a simple dialog box that has two text fields and two buttons. The objective is to open two files using those two buttons. I used FileChooser to select the files. Now, I want to display the path of the selected files in their corresponding TextFields. I use the following code to do that.
    final FileChooser fc1 = new FileChooser();
    final FileChooser fc2 = new FileChooser();
    final TextField tf1 = new TextField();
    final TextField tf2 = new TextField();
    private void button1ActionPerformed(ActionEvent evt)
                int returnVal1 = fc1.showOpenDialog(labelPhpFile);
                if (returnVal1 == JFileChooser.APPROVE_OPTION)
                    File file1 = fc1.getSelectedFile();
                    String fileName1 = file1.getName();               
                    String filePath1 = file1.getPath();
                    tf1.setText(filePath1);
    private void button2ActionPerformed(ActionEvent evt)
                int returnVal2 = fc2.showOpenDialog(labelPhpFile);
                if (returnVal2 == JFileChooser.APPROVE_OPTION)
                    File file2 = fc2.getSelectedFile();
                    String fileName2 = file2.getName();               
                    String filePath2 = file2.getPath();
                    tf2.setText(filePath2);
    }The above code works fine only for the first file. Mean the path of the file selected using fc1 is getting displayed in the tf1 TextField. But, the file selected using fc2 is not getting displayed tf2 TextField. Please help me.
    Thank you :)

    h1. The Ubiquitous Newbie Tips
    * DON'T SHOUT!!!
    * Homework dumps will be flamed mercilessly.
    * Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
    h5. Ask a good question
    * Don't forget to actually ask a question. No, The subject line doesn't count.
    * Ask once
        - Don't Crosspost!
        - Two people answering one question independantly is a waste of there time.
    * Don't even talk to me until you've:
        (a) [googled it|http://www.google.com.au/] and
        (b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
        (c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
        (d) referred to the JLS (for "advanced" questions).
    * [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
        - Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
          - FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
        - Often you discover your own mistake whilst forming a "Good question".
        - Many of the regulars on these forums will bend over backwards to help with a "Good question",
          especially to a nuggetty problem, because they're interested in the answer.
    * Improve your chances of getting laid tonight by writing an SSCCE
        - For you normal people, That's a: Short Self-Contained Compilable Example.
        - Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
        - Often you discover your own mistake whilst writing an SSCCE.
        - Solving your own problem yields a sense of accomplishment ;-)
    h5. Formatting Matters
    * Post your code between a pair of &#123;code} tags
        - That is: &#123;code} ... your code goes here ... &#123;code}
        - This makes your code easier to read by preserving whitespace and highlighting java syntax.
        - Copy&paste your source code directly from your editor. The forum editor basically sucks.
        - The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
          - Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
          - Lines longer than 80 characters should be wrapped.
          - Proper indentation illustrates program logic.
    * Post your error messages between a pair of &#123;code} tags:
        - That is: &#123;code} ... errors here ... &#123;code}
        - To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
            System.out.println("Your momma!); // <<<< ERROR 1
        - Note that error messages are rendered basically useless if the code has been
          modified AT ALL since the error message was produced.
        - Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
    * The forum editor has a "Preview" pane. Use it.
        - If you're new around here you'll probably find the "Rich Text" view is easier to use.
        - WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
        - To see how a posted "special effect" is done, click reply then click the quote button.
    If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
    h1. The pledge!
    We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game.

  • How to get a list of file paths for all files used in a project

    I have a project in Premiere Pro CC which has a large number of bins.  A sequence in one of these bins uses files from other bins.  I am trying to find the locations of all each of the files used  in the project.
    1)  Obviously I can select each clip in the timeline and show in finder, but there a lot of clips
    2) The video usage associated with each file in the project would help.  However
               1.  I haven't found a way to display only clips that have video useage if all of the bins have not been expanded.
              2.  Video usage  shows usage for all sequences, so one would have to manually check the pull down for each file to see if it is used in the sequence in question.
    3) I tried exporting the project to final cut pro xml.  The path url gives me the information that I need.  For some reason, however, when I do the export only one clip's information is there, not the information for all of the other clips in the project.
    4) I tired an export for speedgrade and all of the file names are there.  However the paths are not. 
    Basically I want to find all of the files in the project and relocate them to a specific folder for that project.  There's got to be a way to do this but I'm not seeing it ....

    Thanks for the suggestion concerning the file path.  And certainly it would have been nice to have done this before beginning.  However this is a project that has been around for quite a while, and the files have been moved into different bins.  And now the project sequence is being revised.
    So the problem is, worded slightly differently, how can I search all of the bins for the files that are used just by this sequence, ignoring the files which are used by other sequences?  Or, how can I get a list of the file paths of the files that are used in the sequence?

  • How can I script moving paths from one file to another?

    Hello. I have 1 image with various color correction layers. The other is the exact same size but only contains paths. How can I script moving paths from one file to another? Thanks, in advance, for any help you can offer. Thanks!

    Thanks! This one actually worked for me. Thanks for your help.
    http://forums.adobe.com/message/3305389#3305389

  • In IE, while saving a file it is taking the full path with the file name

    Hi,I am using Tomcat5.5. In one page of my website, there is code responsible for saving an image from the server to the client machine. whenever i am doing this Mozila the file is getting saved with desired name. But in IE it takes full path of the file in the server directory along with its name while being saved in the client machine.Below is the code responsible for this. Plz Help.
    DiskFileUpload fu = new DiskFileUpload();
            List fileItems = fu.parseRequest(request);
            Iterator itr = fileItems.iterator();
            while(itr.hasNext())
              FileItem fi = (FileItem)itr.next();
              //Check if not form field so as to only handle the file inputs
              //else condition handles the submit button input
              if(!fi.isFormField())
                if(fi.getFieldName().equals("FileImage"))
                    if(fi.getSize() < 300000)
                      if(fi.getSize()!=0)
                            java.util.Random rd = new java.util.Random();
                            int random = rd.nextInt(100000);
                            String img_code = random + "";
                                  if(fi.getContentType().equals("image/jpeg") || fi.getContentType().equals("image/pjpeg") || fi.getContentType().equals("image/gif") || fi.getContentType().equals("image/png") || fi.getContentType().equals("image/x-png") || fi.getContentType().equals("image/bmp") || fi.getContentType().equals("image/wmp") || fi.getContentType().equals("application/octet-stream") || fi.getContentType().equals("audio/wav") || fi.getContentType().equals("audio/x-wav") || fi.getContentType().equals("audio/AMR") || fi.getContentType().equals("audio/amr") || fi.getContentType().equals("audio/mpeg") || fi.getContentType().equals("audio/mp4a-latm") || fi.getContentType().equals("audio/x-realaudio") || fi.getContentType().equals("audio/x-pn-realaudio") || fi.getContentType().equals("audio/x-pn-realaudio-plugin") || fi.getContentType().equals("audio/midi") || fi.getContentType().equals("audio/mid") || fi.getContentType().equals("audio/x-midi") || fi.getContentType().equals("audio/x-mid") || fi.getContentType().equals("audio/x-tone-seq") || fi.getContentType().equals("audio/imelody")
                                       || fi.getContentType().equals("video/mp4v-es") || fi.getContentType().equals("video/mp4") || fi.getContentType().equals("video/3gp") || fi.getContentType().equals("video/3gpp") || fi.getContentType().equals("video/mpeg") || fi.getContentType().equals("video-h263-2000"))
                                   System.out.println("Content from FileItem :  "+fi.getContentType());
                              File tempfile = new File(fi.getName());
                                    String imageFile=tempfile.getName();
                                    out.println("imageFile:" +imageFile);     
                                   imageFile= imageFile.replace(':','_');
                                   imageFile=imageFile.replace('\\','_');
                                   imageFile= imageFile.replace('/','_');
                                   imageFile= imageFile.replace(' ','_');
                                   System.out.println(imageFile);
                                  out.println("imageFile:"+imageFile);     
                                   int extIndex=0;
                                   String ext="";
                                  extIndex = imageFile.lastIndexOf(".");
                                  ext = imageFile.substring(extIndex+1);
                                                   if( ext.toLowerCase().equals("jpg") || ext.toLowerCase().equals("jpeg") || ext.toLowerCase().equals("jpe") || ext.toLowerCase().equals("bmp") || ext.toLowerCase().equals("gif")|| ext.toLowerCase().equals("png") || ext.toLowerCase().equals("wbmp")
                                                      || ext.toLowerCase().equals("amr") || ext.toLowerCase().equals("mp3") || ext.toLowerCase().equals("mp2") || ext.toLowerCase().equals("mpga") || ext.toLowerCase().equals("wav") || ext.toLowerCase().equals("midi") || ext.toLowerCase().equals("mid") || ext.toLowerCase().equals("kar") || ext.toLowerCase().equals("ra") || ext.toLowerCase().equals("ram") || ext.toLowerCase().equals("rm") || ext.toLowerCase().equals("au")
                                                      ||  ext.toLowerCase().equals("3gpp") || ext.toLowerCase().equals("3gp") || ext.toLowerCase().equals("mpeg") || ext.toLowerCase().equals("mpe") || ext.toLowerCase().equals("mpg") || ext.toLowerCase().equals("mp4") || ext.toLowerCase().equals("movie") || ext.toLowerCase().equals("avi") || ext.toLowerCase().equals("qt") || ext.toLowerCase().equals("mov") || ext.toLowerCase().equals("viv") || ext.toLowerCase().equals("vivo"))
                              File fNew = new File(application.getRealPath("/userImages/"),img_code+"_"+imageFile);
    //                         ImagePath =  imagepath+img_code+"_"+tempfile.getName();
                             ImagePath =  imagepath+img_code+"_"+imageFile;
                                   System.out.println("Image PAth : "+ImagePath);
    //                          ImagePath =  fNew.getAbsolutePath();
                              //out.println(fNew.toString());
                              ImageName = fNew.getName();
                                    System.out.println("Image Name : "+ImageName);
                                    out.println("ImageName:" +ImageName);     
                              fi.write(fNew);
                                    else
                                           System.out.println("Invalid File Type : "+ext);
                                           Error = "1: Invalid File Type/Extension : "+ext;
                            else
                                Error = "2: File uploaded is not valid.";
                       System.out.println("Content from FileItem :  "+fi.getContentType());
                                System.out.println("invalid Content Type");
                         else
                                Error = "";
                    else
                       Error = "3: File uploaded is not valid. Make sure that the image size does not exceed 300KB";
                       System.out.println("File uploaded is not valid.");
              else
                   session.setAttribute(fi.getFieldName(),fi.getString());
    session.setAttribute("ImagePath",ImagePath);
    session.setAttribute("ImageName",ImageName);
    session.setAttribute("barcodepath",barcodepath);
    //Added by Mutharasu on 30/08/2005
    session.setAttribute("tagpath",tagpath);
    Title = (String) session.getAttribute("txtTitle");
    if(Title.length()==0)
      Error = " Please Enter KoolTag Title : ";
    Key = (String) session.getAttribute("txtKey");
    URL = (String) session.getAttribute("txtURL");
    System.out.println("Key: "+ Key +", URL:"+URL);
    System.out.println("trace 5");
    if (ImagePath.trim().length()==0 && ImageName.trim().length()==0) {
       if (Key==null && URL==null)
          throw new Exception("4: "+Error);
    }

    Hi Vigneshwara,
    Please reopen a new thread in
    ASP.NET Getting Started forum because I can't move it there.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • My iPad is receiving phone calls, not FaceTime calls, that my iPhone under the same iCloud account is receiving, how do I stop this?

    I have an older iPad that we use at my office for Pandora. My iPhone is connected to the same iCloud account as my iPhone is & once in a while my iPad will receive a phone call, not a FaceTime call, from one of my contacts that's trying to call me. I

  • Nokia 5310

    Is there anyway that I can update the firmware as my pc is a mac and am unable to connect to my pc or run software, my phone keeps freezing so many times am told that a firmware update will resolve this. many thanks mark

  • Benefits and Plans

    Hi Can any one explain me how to setup benefits and plans, Reimbursement. Thanks in advance Nakshathra

  • How to edit within 15 min time frame

    I did a search for how to edit a post and found info that we can do that within 15 minutes.  I just sent a post and wanted to edit it and could not find any place to click that says edit, etc.  so how do I take advantage of this option?  Michelld

  • Mavericks cannot be installed on this computer.

    Just replaced internal hdd. All requirements are met running 10.6.8 but after download from App Store I get the alert message "Mavericks cannot be installed on this computer.help. iMac core2 3.06 1tb hdd 4gb ram.