Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-09-2012
Banned
 
Join Date: Mar 2012
Posts: 98
Thanks: 49
Thanked 1 Time in 1 Post
Script Shell in java code

Hello,

I try to run a script shell from a java program:
Quote:
Runtime.getRuntime().exec(myShellScript);
but it runs only if i do :chmod 777 myShellScript in the terminal

Please how can i insert chmod 777 in my java code without going through the terminal?

Thank you
Sponsored Links
    #2  
Old 06-09-2012
Resident BOFH
 
Join Date: Dec 2007
Posts: 1,129
Thanks: 2
Thanked 88 Times in 85 Posts
Don't use 777. 755 should be sufficent.

also check More Enhancements in Java SE 6
The Following User Says Thank You to frank_rizzo For This Useful Post:
chercheur857 (06-09-2012)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script shell in java code chercheur857 Programming 9 05-12-2012 08:39 AM
Code java in script shell chercheur857 Shell Programming and Scripting 0 04-27-2012 05:37 PM
Script Shell in java code chercheur857 Programming 2 04-07-2012 06:17 PM
Block of code replacement in Java source code through Unix script hareeshram Shell Programming and Scripting 2 01-30-2012 10:54 AM
date change shell script in java code tarkan Programming 0 09-19-2011 04:09 AM



All times are GMT -4. The time now is 09:50 PM.