Skip to main content

Home/ woopi-java/ Group items tagged Java

Rss Feed Group items tagged

Martin Menzel

classpath - How to analyse which jar file is used in a JAVA program? - Stack Overflow - 0 views

  •  
    " 10 down vote Invoke the java executable with the -verbose:class argument. This will produce output like: [Loaded org.apache.log4j.helpers.ThreadLocalMap from file:/C:/.../1.2.14/log4j-1.2.14.jar] [Loaded org.apache.commons.cli.Option from file:/C:/.../commons-cli-1.2.jar]"
Martin Menzel

java - Setting Authentication Header in Servlet via Filter - Stack Overflow - 0 views

  •  
    import java.util.Map;
Martin Menzel

How do I trap CTRL-C in my Java app? - 0 views

  •  
    "// And finally a Main class which tests the two classes // We let the sample thread run for 10 seconds and then // force a Shutdown with System.exit(0). You may stop the // program early by pressing CTRL-C. public class Main { public static void main(String [] args) { Shutdown shutdown = new Shutdown(); try { Runtime.getRuntime().addShutdownHook(new ShutdownThread(shutdown)); System.out.println("[Main thread] Shutdown hook added"); } catch (Throwable t) { // we get here when the program is run with java // version 1.2.2 or older System.out.println("[Main thread] Could not add Shutdown hook"); } try { Thread.currentThread().sleep(10000); } catch (InterruptedException ie) { } System.exit(0); } }"
Martin Menzel

Koders Code Search: SmtpTest.java - Java - 0 views

  •  
    "kage foo; import junit.framework.TestCase; import javax.xml.ws.BindingProvider; import org.jvnet.jax_ws_commons.transport.smtp.SMTPFeature; import org.jvnet.jax_ws_commons.transport.smtp.POP3Info; import org.jvnet.jax_ws_commons.transport.smtp.SenderInfo; import com.sun.xml.ws.developer.WSBindingProvider; import org.jvnet.jax_ws_commons.transport.smtp.client.SMTPTransportTube; public class SmtpTest{ public void testSmtp() { SMTPTransportTube.dump = true; // Enable logging // Setup SMTP server SMTPFeature feature = new SMTPFeature("kohsuke.sfbay.sun.com", "10025", "smtp.transport.client@kohsuke.org"); //SMTPFeature feature = new SMTPFeature("localhost", "25", // "smtp.transport.clien@griffon.kohsuke.org"); //Setup POP3 feature.setPOP3("kohsuke.org", "smtp.transport.client", "jaxws123"); //feature.setIncoming(new POP3Info("localhost", 8110, "smtp.transport.clien", "jaxws123")); //Set the endpoint address BookService proxy = new BookServiceService().getBookServicePort(feature); ((WSBindingProvider)proxy).setAddress("smtp://smtp.transport.server@kohsuke.org"); //((WSBindingProvider)proxy).setAddress("smtp://smtp.transport.serve@griffon.kohsuke.org"); for(Book book : proxy.getRecommendedBooks()){ System.out.println("--------------------------------"); System.out.println("Id: " + book.getId()); System.out.println("Author: "+book.getAuthor()); System.out.println("Title: "+book.getTitle()); } System.out.println("--------------------------------"); } }"
Martin Menzel

Jersey - 0 views

1 - 20 of 71 Next › Last »
Showing 20 items per page