I was wondering if there is any way to set environment
variables (DOS system) in the same command.com instance that spawned the Java program.
Runtime.exec() spawns another process (another DOS window) so unless there are options that I dont know about I dont think I can use that.
After setting an environment I also need to run a program from the same process that the environment variable is in
Working with files is a moderately common task in Java. For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.
However, when your application has vi…
Viewers will learn about the different types of variables in Java and how to declare them.
Decide the type of variable desired:
Put the keyword corresponding to the type of variable in front of the variable name:
Use the equal sign to assign a v…