Portable JDK, Tomcat, and Eclipse (Windows)
Does anybody know how to make a usb thumb drive with a JDK, Tomcat, and Eclipse (J2EE) (all for a Windows platform, preferably)?
I saw this question, but the only answer was speculative.
I know that the eclipse part would be easy -- just put it on the thumb drive. Tomcat requires a JDK as far as I know. Would there be a way to setup tomcat so it always references a j开发者_运维问答dk on the thumb drive (rather than using the system JAVA_HOME variable)? How about Eclipse?
I'm thinking something like cygwin would clearly be overkill...
tomcat is pretty easy.
There is a standard batch file called setenv.bat in <tomcat-dir>/bin which is called by catalina.bat you could set this up to reference a relative path for the JDK.
An example of doing this is the liferay tomcat distrabution, have a look at it's setenv.bat file.
liferay 6.0.1 setenv.bat checks for a JRE installed in the CATALINA_HOME directory:
if exist "%CATALINA_HOME%/jre1.5.0_22/win" (
if not "%JAVA_HOME%" == "" (
set JAVA_HOME=
)
set "JRE_HOME=%CATALINA_HOME%/jre1.5.0_22/win"
)
I just saw this. It's 2012. Here's how I did it. Visit http://tgducusin.blogspot.com/2011/12/portable-eclipse-with-java-jdk-tomcat.html
加载中,请稍侯......
精彩评论