Universal file path in Java
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Universal file path in Java

  1. #1
    Join Date
    Apr 2017
    Posts
    1

    Post Universal file path in Java

    I have created a Java program which is executing cmd.exe and that cmd.exe is running a batch file which is installing SSL certificates to java keytool.

    Now, the issue is i have specified the path of that .bat file as per my system. So, if i give that java program to anyone else it won't work because that person should not have the same file path.

    Suppose my batch file is in C:/Java/Certificates/xyz.bat but the other might have xyz.bat in D:/Test/xyz.bat.
    So, i want to know is there any provision of universal file path name in java through which it will find the xyz.bat from anywhere in the system?

    Thanks,
    Pratik Avinash

  2. #2
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,722

    Re: Universal file path in Java

    One solution might be to have the java program copy the bat file from inside the jar file to a temporary file on the PC and execute it from there and then delete it.
    Norm

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


HTML5 Development Center