This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have need to run at least two different JDK versions, 1.3.1 and 1.4. What is the best way to compile code using the two individually without having to be in the JDK's Bin directory, or using an absolute path to that JDK's Bin Directory every time. I was thinking of using a batch file, but I don't know how I would get the batch file to take in arguments. i.e java1.bat myProgram where java1.bat runs the JAVAC for 1.3.1 and myProgram is the program to be compiled. Thanks
I have several bat files out there. For instance I have j131.bat, j140.bat etc. When I want to use a particular release, I run the bat that sets up a different path and classpath on the fly. I just work in the working directory that I set up for each of these. Then you can just work as normal. However, If you want to invoke a particular JRE when starting your program (perhaps a different one from what your normal classpath points to) you can just specify when you invoke the application. The actual call to the app is bolded. example RunAPP.bat:
So instead of running a batch file that runs the compiler, you just set up a batch file that resets your paths to whatever you need them set to. Smart Lady Thanks Cindy. As always you have solved my problem.