Search This Blog

Java add all jar files in a directory to classpath

javac -cp "../lib1.jar;../lib/*" Main.java
java -cp "../lib1.jar;../lib/*" Main

NOTE:

  • Must use quotes
  • * not *.jar

Mac OS X: disable Image Capture auto-run

On Mac OS X Mountain Lion, Image Capture opens every time I connect my phone. To disable it:
  • Open Image Capture and click the little icon at bottom left corner:
  • Change it to "No Application"

Javascript: check if Java Plugin is installed in your browser

Oracle provides deployJava.js to check if Java Run Time is installed on your computer.

1. HTML example code



2. Run the HTML example



3. See also

TCL: get the last or first element in a list

The following example shows how to get the last and first element of a list in TCL:

GWT: open a url in a new browser window

com.google.gwt.user.client.Window has static method open(String url, String name, String features) can open a url in a new window:


To open a relative URL, GWT has a static method: getHostPageBaseURL() can be used, see the example below: