Sudhir Srinivasan wrote:which i don't think is the right way, as I'm doing manually - for every program - what should be done by the O.S globally, through setting the classpath, for all programs.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:However, it isn't the CLASSPATH variable you need to set but the PATH variable.
Rob Spoor wrote:This FAQ entry explains how to set the CLASSPATH variable globally. The same instructions work for the PATH variable, with one caveat - you should not remove the existing PATH contents, but add to them (using ; to separate paths).
Rob Spoor wrote:By adding the JDK folder to the start you will make sure that no other JDK (or JRE) will be preferred.
Brian Burress wrote:Some options which can help you avoid this include setting up a directory of batch files in your path that you can use to set up the path for the command window you have opened. The batch files will add the jdk to the path for your command window session only - when closed they go away. For example you could have batch files for "JDK6", "JDK7", "IBMJDK", etc depending on with what JDK you want to work.
Brian Burress wrote:Sudhir,
You are welcome. I'll elaborate here, let me know if something remains unclear.
Sudhir Srinivasan wrote:Can the code,lines 5 to 7 shown above, in the batch file be modified to
Brian Burress wrote:I would advise you avoid getting to fancy with the bat file unless you know bat well otherwise you are going to find yourself debugging windows scripting instead of working with the java which I think the latter is your intended focus right now.
Brian Burress wrote:Be careful with line 8 from your copied example as it appends the java bin directory to the PATH variable instead of pre-pending it. If you happen to have another java bin on the path variable already then the one you are adding will not be used.
Brian Burress wrote:You should be able to update the bat file to help orchestrate pretty much whatever is done from a command line.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|