title: How to run Java Card Connected Edition Web samples on Eclipse?
body: <p>I downloaded <a href="http://www.oracle.com/technetwork/java/embedded/javacard/documentation/jcdevkit-relnotes-connected-bin-web-137896.html">Java Card Connected Edition 3.0.2</a> from Oracle official website and installed it. There are some <a href="https://kenai.com/projects/javacard/pages/JC3Samples">web samples</a> in JCDK. In documentation written:</p>
  
  <blockquote>
    <p>All samples must be run from within the NetBeans IDE. They cannot be run from
    the command line in this release of the development kit. </p>
  </blockquote>
  
  <p>Samples works with NetBeans IDE correctly. I can import them and run on Java Card Platform.</p>
  
  <p>But I want to use this samples on Eclipse IDE. In Eclipse as Java Card SDK path I showed Java Card Connected home path. Then created new device and tried to start it [<a href="https://kenai.com/projects/javacard/sources/subversion/show/samples/web/CardHolderAuthorization/CardHolderApp?rev=25">CardHolderApp</a> for example]. But Eclipse gives:</p>
  
  <pre><code>ApduTool thread exited
  User input thread exited
  APDU|ApduTool [v3.0.2]
  APDU|    Copyright (c) 2009 Sun Microsystems, Inc.
  APDU|    All rights reserved.
  APDU|    Use is subject to license terms.
  APDU|Opening connection to localhost on port 9025.
  APDU|Connected.
  APDU|java.net.ConnectException: Connection refused: connect
  ApduTool process finished with code: 1
  </code></pre>
  
  <p>.log file:</p>
  
  <pre><code>!ENTRY org.eclipse.core.jobs 4 2 2015-09-08 01:39:17.142
  !MESSAGE An internal error occurred during: "Launching CardHolderApp".
  !STACK 0
  java.lang.RuntimeException: Cannot start device. Please see the log.
      at com.oracle.javacard.jcdk.launch.runconfiguration.AppletRunConfigurationDelegate.launch(AppletRunConfigurationDelegate.java:79)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
      at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
      at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
  </code></pre>
  
  <p>Is it possible to run Java Card Connected <strong>Web</strong> project in Eclipse IDE?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Device started successfully. But project not deployed. It gives "unsupported String type constant" on every String usage. 
  Code example:</p>
  
  <pre><code>public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
      response.setContentType("text/html"); // unsupported String type constant
      PrintWriter out = response.getWriter();
      RequestDispatcher dispatcher = null;
      dispatcher = request.getRequestDispatcher("/WEB-INF/header.i");//unsupported String type constant
      response.sendRedirect(response.encodeRedirectURL("http://www.sun.com"));//unsupported String type constant
      dispatcher.include(request, response);
      dispatcher.include(request, response);
  }
  </code></pre>
  
  <p>Classic Edition did not support Strings. But it must work on Connected Edition.</p>