1
Short question
I need a variable environment in windows that is auto increment:
setx /a PORT=1000
and every time you call %PORT%:
setx /a PORT=%PORT%+ 1
the result would be:
echo %PORT%
1001
echo %PORT%
1002
echo %PORT%
1003
which begs the question,
Where to put the command ?
setx /a PORT=%PORT%+ 1
Question explained
I’m trying to debug a java applet in windows, other settings did not work, the only one that worked was
create a variety of environment
JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=2502
Only when doing this only 1 java application can be excommunicated, when trying to execute a second one error is thrown saying that the port 2502
is already in use.
my idea now is to do something like
JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=%PORT%
in which %PORT%
will be an incremented number.
To create an environment variable the command is not setx?
– rray
thanks for the correction
– Bruno Rozendo
I think it would be good to create a bat, to increase
%PORT%
and then call the applet, if I’m not mistaken it would becall c:\applet.java
– rray
the applet is already calling for a java web application, there is no way to change it
– Bruno Rozendo