File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Head First Android 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: 9126

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.

[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.
It is sorta covered in the JavaRanch Style Guide.
subject: Unix/windows - sh/bat file problem
It's not a secret anymore!