# HG changeset patch # User luisf # Date 1386697961 0 # Node ID f415cc4295585980cce34c01d8dcd6e2685a9f09 # Parent 0c66cff0d1cc0909d7f888c8bda9f4a41b73f01b major updates/changes to INSTALL.txt instructions. diff -r 0c66cff0d1cc -r f415cc429558 INSTALL.txt --- a/INSTALL.txt Tue Dec 10 17:39:27 2013 +0000 +++ b/INSTALL.txt Tue Dec 10 17:52:41 2013 +0000 @@ -1,6 +1,4 @@ -Build Instructions: - - +=== Build Instructions === On OSX you need to @@ -8,33 +6,42 @@ 1. Copy your web servers servlet-api.jar file into this directory. -2. Copy the javabuilder.jar file from your MATLAB or MCR install root in the direcotry /toolbox/javabuilder/jar/javabuilder.jar to the web applications lib folder ./webapp/WEB-INF/lib +2. Copy the javabuilder.jar file from your MATLAB or MCR install root in the direcotry /toolbox/javabuilder/jar/javabuilder.jar to the web applications lib folder ./WebContent/WEB-INF/lib -3. Recompile the MATLAB component by running the following MCC command: +3. Run 'ant build.xml'. This should create the echoapp.war file. In case this fails, follow "Compiling and Generating the echoapp.war file" instructions below (points 3.1 to 3.4). - /Applications/MATLAB_R2013b.app/bin/mcc -W "java:uk.ac.soton.isvr,HumanEcho" -d ./scratch -T "link:lib" -v "class{HumanEcho:./webapp/WEB-INF/mcode/gen_echo.m}" +4. Copy the echoapp.war file to your web server's webapps folder (usually $CATALINA_BASE/webapps); -4. Copy the deployed component from the scratch folder to the web applications lib folder .\webapp\WEB-INF\lib +5. Start/Restart Tomcat, making sure the webapp is correctly deployed; - cp ./scratch/isvr.jar ./webapp/WEB-INF/lib +6. Start the web server and navigate in a browser to the following url: http://localhost:8080/echoapp/ -5. Compile the web application making sure to reference the servlet-api.jar, the deployed component jar, and the javabuilder.jar - javac -cp servlet-api.jar:./webapp/WEB-INF/lib/javabuilder.jar:./webapp/WEB-INF/lib/examples.jar: -d ./webapp/WEB-INF/classes ./webapp/WEB-INF/src/MagicSquareServlet.java + + + +== Compiling and Generating the echoapp.war file == + +Note: You only need to follow this instructions if step 3 above fails (i.e - if you could not run ant correctly and you could not generate the echoapp.war file correctly). + +3.1. Recompile the MATLAB component by running the following MCC command: + + /Applications/MATLAB_R2013b.app/bin/mcc -W "java:uk.ac.soton.isvr,HumanEcho" -d ./scratch -T "link:lib" -v "class{HumanEcho:./WebContent/WEB-INF/mcode/gen_echo.m}" + +3.2. Copy the deployed component from the scratch folder to the web applications lib folder .\WebContent\WEB-INF\lib + + cp ./scratch/isvr.jar ./WebContent/WEB-INF/lib + +3.3. Compile the web application making sure to reference the servlet-api.jar, the deployed component jar, and the javabuilder.jar + + javac -cp servlet-api.jar:./WebContent/WEB-INF/lib/javabuilder.jar:./WebContent/WEB-INF/lib/examples.jar: -d ./WebContent/WEB-INF/classes ./src/HumanEchoServlet.class This will create the servlet: - webapp/WEB-INF/classes/HumanEchoServlet.class + WebContent/WEB-INF/classes/HumanEchoServlet.class -6. Navigate to the web applications directory and create the war file. +3.4. Navigate to the web applications directory and create the war file. - cd webapp - jar -cvf ..\JavaEndToEnd.war . + cd WebContent + jar -cvf ../JavaEndToEnd.war . cd .. - -7. Copy this JavaEndToEnd.war file into your web servers webapps direcotry - -8. Start the web server and navigate in a browser to the following url: -http://localhost:8080/JavaEndToEnd/ExamplesPage.jsp - -