Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Bat file to setup java enviroment.  RSS feed

 
Ranch Hand
Posts: 71
  • 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.
 
Ranch Hand
Posts: 618
  • 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
  • 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
Boost this thread!