DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Posts
    311

    changing user.dir at runtime

    Hello,

    I have the following problem:
    I'm starting my java application as a daemon (onlinux). In my setup this means my user.dir is set to /root. However, I need to run an external program (with the Runtime->Process).
    To be able to run this process, I need to have a user.dir that points to the same dir as where my external prgram resides.
    Is there a way to change your user.dir at runtime?

    Mark

  2. #2
    Join Date
    Mar 2006
    Location
    England
    Posts
    10
    Have u tried e.g. the Runtime method exec(String command, String[] envp, File dir) where dir becomes the working directory used to execute the process?

  3. #3
    Join Date
    Oct 2004
    Posts
    311
    yeah, that should work. But I already fixed it in a different way (changed the program I was calling to not need a user.dir in the first place)

Similar Threads

  1. Replies: 5
    Last Post: 12-22-2009, 07:35 AM
  2. Replies: 1
    Last Post: 11-19-2005, 01:13 AM
  3. Changing Default Values at Runtime
    By lucbrunet in forum VB Classic
    Replies: 5
    Last Post: 04-21-2005, 04:02 PM
  4. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 06:41 PM
  5. Changing Datafield at RunTime
    By Ed Marquez in forum VB Classic
    Replies: 0
    Last Post: 05-10-2000, 04:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links