Results 1 to 6 of 6
- 06-23-2011, 08:49 AM #1
Member
- Join Date
- Jun 2011
- Posts
- 5
- Rep Power
- 0
- 06-23-2011, 01:21 PM #2
Do you have a server on the other machine that you can give instructions to and that will execute those instructions?
If the server handles FTP then you can use that protocol to create the folders.
- 06-27-2011, 09:38 AM #3
Member
- Join Date
- Jun 2011
- Posts
- 5
- Rep Power
- 0
Its not server.. Just a simple dev machine.
Actually I am able to create Folders in other machine using "cmd /c mkdir" but only in main Method. But when I run the function from my app, It doesnt work. So is there anything else I am suppose to do? Runtime .. ?
- 06-27-2011, 01:20 PM #4
Are there any error messages?It doesnt work
How are you using "cmd /c mkdir"?
Sorry, this makes no sense. What is the difference between the main() method and your app?only in main Method. But when I run the function from my app,
Most java programs use a main method to get started.
- 06-28-2011, 08:27 AM #5
Member
- Join Date
- Jun 2011
- Posts
- 5
- Rep Power
- 0
MY requirement is :
EX:
When a new employee is created, using his empID, I am suppose to create some folders in other machine.
In other system, Emp folder has been shared with all the permissions.
function :
void createFolder() {
String folderCreate ="cmd /c mkdir " + "\\\\192.168.1.10\\Emp\\" + location ;
Runtime.getRuntime().exec(folderCreate);
}
Above method works fine when I test with Main function , folders are created based on EmpID. But When I run my application, create employee.. It fails..
Logs- No exception found.
- 06-28-2011, 09:29 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Similar Threads
-
System path can't be specified?
By Indefinite Design in forum New To JavaReplies: 0Last Post: 04-11-2010, 02:50 AM -
How to dynamically Add Classess to Running VMs class path
By echarish in forum Advanced JavaReplies: 1Last Post: 02-04-2010, 11:12 AM -
How to know system folder path
By ivvgangadhar in forum New To JavaReplies: 6Last Post: 11-21-2008, 08:08 AM -
can java.io.File create a list of all files and folders.
By MattStone in forum New To JavaReplies: 20Last Post: 12-17-2007, 03:20 PM


LinkBack URL
About LinkBacks.gif)
Reply With Quote

Bookmarks