This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Unix/windows - sh/bat file problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unix/windows - sh/bat file problem" Watch "Unix/windows - sh/bat file problem" New topic

Unix/windows - sh/bat file problem

kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122

I am using batch this batch file-

Also this sh file-

Both of these files were working fine until i introduced "CONFIG_ROOT".

if i am putting in batch file this way it's doing fine--
-DConfigRoot="c:/settings" -

Can you please tell me what i am missing?

Joe Ess

Joined: Oct 29, 2001
Posts: 8843

The '$' dereferences environment variables in Unix shells. The leading and trailing '%' dereferences the same in Windows. You have it right with every other variable in your script.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122
Yes Jo, Its working fine.

Thanks for your reply.
I agree. Here's the link:
subject: Unix/windows - sh/bat file problem
Similar Threads
Running JBoss-5.1.0.GA as a service on Red Hat?
run java code through bat file
JBOSS AS5 fails to start with jdk6
Remote Debugging using Jbuilder X and Jboss 3.2.x
error starting up 2nd instance of tomcat