This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bat file to setup java enviroment.

 
Peter Shipway
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey yo,

This is a long story but I have created a .bat file to setup the java enviroment as the global variaables are restricted on the UNI computers, and java isnt set up right. It works fine but I would like to modify it so it can be double clicked upon, and then remain in the command line (elimating the need to open it in a command shell). Just wondering if it is possible (oh and I cant use a c++ script as C++ dosent work either ).

Thanks for any help.
 
Stephen Huey
Ranch Hand
Posts: 618
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I understand what you mean by setting up your environment, but it would be good to be able to see exactly what you're doing in that .bat file to know better whether or not this would help you. Anyway, I *think* this will maintain your environment. I have 2 .bat files on my Desktop:

test.bat, which calls another.bat

another.bat has the following in it:



test.bat has this in it:


On Windows XP, cmd (cmd.exe) is preferable over command.com or whatever the old one was called. The /c is how you pass a parameter to it. Then, in the same environment (I think), I call cmd again to get the prompt back. Try that and see...you can, of course, just replace another.bat with your current .bat file. Here's the output I got from double-clicking test.bat, and it was all in one shell window:


[ November 12, 2004: Message edited by: Stephen Huey ]
 
Peter Shipway
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey yo,

As usally I have made an ass of myself asking a question that Is answered by such a simple command. Thanks for the help, and here is my .bat file



I made this file for the computers at my unveristy, they use an image booting system (deep freeze) and the images have the wrong enviroment settings.

Once again thanks for the help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic