[size=medium]1. jar
[url]http://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html[/url]
Common JAR file operations
To create a JAR file
jar cf jar-file input-file(s)
To view the contents of a JAR file
jar tf jar-file
To extract the contents of a JAR file
jar xf jar-file
To extract specific files from a JAR file
jar xf jar-file archived-file(s)
To run an application packaged as a JAR file (requires the Main-class manifest header)
java -jar app.jar
To invoke an applet packaged as a JAR file
<applet code=AppletClassName.class
archive="JarFileName.jar"
width=width height=height>
</applet>
[url]https://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html[/url]
2. java
in Windows, there are space in folder name or directory name
>"C:\Program Files\Java\jdk1.8.0_25\bin\java" -cp . com.test.HelloWorld
Remote Debug
"C:\Program Files\Java\jdk1.8.0_25\bin\java" -Xdebug -Xrunjdwp:transport=dt_socket,address=8881,server=y,suspend=y -Xms256m -Xmx256m -cp test.jar com.test.HelloWorld
the command will make the java app suspend and wait for the client debugger tool like Eclipse to connect, use "Socket Attach" as the connection type.
3. javac
compile code with debug info
debug="true"
debuglevel="lines,vars,source"
4. javadoc
5. native2ascii [/size]
[url]http://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html[/url]
Common JAR file operations
To create a JAR file
jar cf jar-file input-file(s)
To view the contents of a JAR file
jar tf jar-file
To extract the contents of a JAR file
jar xf jar-file
To extract specific files from a JAR file
jar xf jar-file archived-file(s)
To run an application packaged as a JAR file (requires the Main-class manifest header)
java -jar app.jar
To invoke an applet packaged as a JAR file
<applet code=AppletClassName.class
archive="JarFileName.jar"
width=width height=height>
</applet>
[url]https://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html[/url]
2. java
in Windows, there are space in folder name or directory name
>"C:\Program Files\Java\jdk1.8.0_25\bin\java" -cp . com.test.HelloWorld
Remote Debug
"C:\Program Files\Java\jdk1.8.0_25\bin\java" -Xdebug -Xrunjdwp:transport=dt_socket,address=8881,server=y,suspend=y -Xms256m -Xmx256m -cp test.jar com.test.HelloWorld
the command will make the java app suspend and wait for the client debugger tool like Eclipse to connect, use "Socket Attach" as the connection type.
3. javac
compile code with debug info
debug="true"
debuglevel="lines,vars,source"
4. javadoc
5. native2ascii [/size]