Help with getting this to work!

Hi,
I am trying to get this Java application to work - but nothing seems to happen! Basically, its a chemical formulae analyser, e.g. in CaC03, C is the symbol for Carbon and there is 1 atom of this element, Ca for Calcium (1 atom), O for Oxygen (3 atoms). The application should ask the user for input (chemical formulae) and then analyse the formula and identify the symbols present together and the number of atoms of the corresponding element.
The elements should then be identified and a table displayed showing the elements present together with the corresponding number of atoms. Appropriate error messages should be displayed for any invalid data.
Now the code I have seems fine to me, but when you run the application, nothing happens! There are no error messages, but just nothing happens! I have two files, InNeedOfHelp.java and InNeedOfHelp.class, and the InNeedOfHelp.java file contains the following code (but nothin happens when run as I have stated!): -
import java.util.regex.*;
public class InNeedOfHelp {
/* names should be loaded dynamically from that file */
private String[] names = {"H", "C", "Ca", "O"};
private Matcher matcher = null;
private Pattern pattern = null;
public static void main(String[] args) {
InNeedOfHelp inoh = new InNeedOfHelp();
for (int i = 0; i < args.length; i++) {
if (inoh.isValid(args[ i])) {
inoh.check(args[ i]);
} else {
System.out.println("Illegal formula: " + args[ i]);
public InNeedOfHelp() {
String regex = "([A-Z][a-z]?+)([0-9]*+)";
pattern = Pattern.compile(regex);
matcher = pattern.matcher("");
/* Element name needs real solution, current implementation is too static ;) */
private String getElementName(String s) {
if ("H".equals(s)) {
return "Hydrogen";
} else if ("O".equals(s)) {
return "Oxygen";
} else {
return s;
private String getElementCount(String s) {
if ("".equals(s)) {
return "1";
} else {
return s;
public boolean isValid(String formula) {
String regex = "((";
for (int i = 0; i < names.length; i++) {
regex += (i == 0 ? "(" : "|(") + names[ i] + ")";
regex += "){1}[0-9]*)+";
return formula.matches(regex);
/* check needs better name and should be redesigned to just collect data */
public void check(String formula) {
int end = 0;
matcher = matcher.reset(formula);
while (matcher.find(end)) {
end = matcher.end();
System.out.println("Element " + getElementName(matcher.group(1))
+ " occured " + getElementCount(matcher.group(2)) + " time(s)");
So, if anyone could help me with this application I would be very grateful! Thanks guys.

If nothing happens, as a first step I suggest putting in some System.out.println statements in the main method to find out what happens with isValid(). It usually makes sense to look for easy problems first. May be your command line arguments are not valid, or your isValid methods thinks they aren't anyway.

Similar Messages

  • Help with getting Web Start working with two-way SSL

    I have successfully transferred data (myclient.jnlp) utilizing web browsers (IE and Mozilla) from my web server (which is set up for two-way SSL "CLIENT-CERT" required) after using the browser's utility to "import" my client-side cert (in .p12 format).
    After the browser connects and downloads the "myclient.jnlp" contents and places it in a temporary file, it then kicks off the javaws process with the temporary file as a parameter. The first thing javaws does is utilize the codebase and href values (found in the temporary file) to make a "GET" call to the server for the "myclient.jnlp" file (again).
    However, this fails (with a SSL handshake error) since javaws uses a different keystore than IE - the server does not receive the client-side cert. I have imported the root CA and the client cert (in .pem format) into the $JAVA_HOME/jre/lib/security/cacerts file using the keytool command but alas my server still indicates a lack of a client-side cert.
    Has anyone else tried this and got it working?

    Hi Richard,
    Indeed it appears that the 1.5 version will have more built-in capability for client certs. It has the look of the IE browser import capability. Unfortunately, I am stuck with having to utilize 1.4.2 for the time being. Since I have posted my original message I have found more information but have yet to get it all working. The truststore in javaws 1.4.2 does have a default (the 1.4.2 jre's cacert file - stragely enough not the same one that gets updated when you import the root CA! - but this has been noted in many other threads). The javaws keystore does not have a default and I have tried, to no avail yet, to utilize some command line parameters, see http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#Customization - to get my client cert "available" and recognized by javaws.
    With the help of some debug flags here is the output on my javaws "output" log - all seems to go well up to the point of the client's Certificate chain (which appears to be empty), after the ServerHelloDone :
    trustStore is: C:\j2sdk1.4.2_04\jre\lib\security\cacerts
    trustStore type is : jks
    init truststore
    adding as trusted cert:
    snipped all the regular trusted certs, left my root CA as proof it is recognized...
    adding as trusted cert:
    Subject: CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US
    Issuer: CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US
    Algorithm: RSA; Serial number: 0x0
    Valid from Wed May 26 16:38:59 EDT 2004 until Fri Jun 25 16:38:59 EDT 2004
    trigger seeding of SecureRandom
    done seeding SecureRandom
    %% No cached client session
    *** ClientHello, TLSv1
    RandomCookie: GMT: 1070211537 bytes = { 205, 211, 129, 234, 88, 129, 152, 176, 223, 180, 161, 138, 246, 183, 181, 89, 61, 252, 63, 35, 21, 34, 253, 32, 254, 124, 38, 198 }
    Session ID: {}
    Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
    Compression Methods: { 0 }
    [write] MD5 and SHA1 hashes: len = 73
    0000: 01 00 00 45 03 01 40 CA 22 D1 CD D3 81 EA 58 81 ...E..@.".....X.
    0010: 98 B0 DF B4 A1 8A F6 B7 B5 59 3D FC 3F 23 15 22 .........Y=.?#."
    0020: FD 20 FE 7C 26 C6 00 00 1E 00 04 00 05 00 2F 00 . ..&........./.
    0030: 33 00 32 00 0A 00 16 00 13 00 09 00 15 00 12 00 3.2.............
    0040: 03 00 08 00 14 00 11 01 00 .........
    Thread-3, WRITE: TLSv1 Handshake, length = 73
    [write] MD5 and SHA1 hashes: len = 98
    0000: 01 03 01 00 39 00 00 00 20 00 00 04 01 00 80 00 ....9... .......
    0010: 00 05 00 00 2F 00 00 33 00 00 32 00 00 0A 07 00 ..../..3..2.....
    0020: C0 00 00 16 00 00 13 00 00 09 06 00 40 00 00 15 ............@...
    0030: 00 00 12 00 00 03 02 00 80 00 00 08 00 00 14 00 ................
    0040: 00 11 40 CA 22 D1 CD D3 81 EA 58 81 98 B0 DF B4 ..@.".....X.....
    0050: A1 8A F6 B7 B5 59 3D FC 3F 23 15 22 FD 20 FE 7C .....Y=.?#.". ..
    0060: 26 C6 &.
    Thread-3, WRITE: SSLv2 client hello message, length = 98
    Thread-3, READ: TLSv1 Handshake, length = 58
    *** ServerHello, TLSv1
    RandomCookie: GMT: 1070211539 bytes = { 81, 106, 82, 45, 233, 226, 89, 6, 38, 240, 71, 122, 90, 226, 255, 207, 9, 102, 205, 127, 223, 211, 4, 84, 79, 16, 101, 89 }
    Session ID: {34, 167, 132, 174, 141, 4, 57, 197, 190, 207, 105, 117, 241, 9, 97, 81}
    Cipher Suite: SSL_RSA_WITH_DES_CBC_SHA
    Compression Method: 0
    %% Created: [Session-1, SSL_RSA_WITH_DES_CBC_SHA]
    ** SSL_RSA_WITH_DES_CBC_SHA
    [read] MD5 and SHA1 hashes: len = 58
    0000: 02 00 00 36 03 01 40 CA 22 D3 51 6A 52 2D E9 E2 ...6..@.".QjR-..
    0010: 59 06 26 F0 47 7A 5A E2 FF CF 09 66 CD 7F DF D3 Y.&.GzZ....f....
    0020: 04 54 4F 10 65 59 10 22 A7 84 AE 8D 04 39 C5 BE .TO.eY.".....9..
    0030: CF 69 75 F1 09 61 51 00 09 00 .iu..aQ...
    Thread-3, READ: TLSv1 Handshake, length = 607
    *** Certificate chain
    chain [0] = [
    Version: V3
    Subject: CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    e2bd8de9 598e0735 2bed2057 3800c83d 348550e2 93a017c7 9845f35f cd7b4ada
    6ef0c70f 7a033e69 a97ccd15 46f0d1c8 7a0ae909 ddb76f5b cd8029e6 3a6a4965
    Validity: [From: Wed May 26 16:38:59 EDT 2004,
                   To: Fri Jun 25 16:38:59 EDT 2004]
    Issuer: CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US
    SerialNumber: [    00]
    Certificate Extensions: 3
    [1]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 3F A7 DF 1F FA 90 1F 98 4F BA 42 9F 21 7D B4 C4 ?.......O.B.!...
    0010: 88 76 14 DA .v..
    [2]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: 3F A7 DF 1F FA 90 1F 98 4F BA 42 9F 21 7D B4 C4 ?.......O.B.!...
    0010: 88 76 14 DA .v..
    [CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US]
    SerialNumber: [    00]
    [3]: ObjectId: 2.5.29.19 Criticality=false
    BasicConstraints:[
    CA:true
    PathLen:2147483647
    Algorithm: [SHA1withRSA]
    Signature:
    0000: 29 CB D0 48 E2 89 2F 8D 4A A6 73 11 71 EB 58 9D )..H../.J.s.q.X.
    0010: 9E 0C 44 1F 87 C2 A3 3C C0 E7 9A E3 C4 BC A7 DD ..D....<........
    0020: C4 FC 52 F1 A9 72 65 14 99 C1 A7 62 61 35 91 D8 ..R..re....ba5..
    0030: AE FF FB FF 82 D8 1C EE 03 02 77 03 19 6A B0 06 ..........w..j..
    Found trusted certificate:
    Version: V3
    Subject: CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: SunJSSE RSA public key:
    public exponent:
    010001
    modulus:
    e2bd8de9 598e0735 2bed2057 3800c83d 348550e2 93a017c7 9845f35f cd7b4ada
    6ef0c70f 7a033e69 a97ccd15 46f0d1c8 7a0ae909 ddb76f5b cd8029e6 3a6a4965
    Validity: [From: Wed May 26 16:38:59 EDT 2004,
                   To: Fri Jun 25 16:38:59 EDT 2004]
    Issuer: CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US
    SerialNumber: [    00]
    Certificate Extensions: 3
    [1]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 3F A7 DF 1F FA 90 1F 98 4F BA 42 9F 21 7D B4 C4 ?.......O.B.!...
    0010: 88 76 14 DA .v..
    [2]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: 3F A7 DF 1F FA 90 1F 98 4F BA 42 9F 21 7D B4 C4 ?.......O.B.!...
    0010: 88 76 14 DA .v..
    [CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US]
    SerialNumber: [    00]
    [3]: ObjectId: 2.5.29.19 Criticality=false
    BasicConstraints:[
    CA:true
    PathLen:2147483647
    Algorithm: [SHA1withRSA]
    Signature:
    0000: 29 CB D0 48 E2 89 2F 8D 4A A6 73 11 71 EB 58 9D )..H../.J.s.q.X.
    0010: 9E 0C 44 1F 87 C2 A3 3C C0 E7 9A E3 C4 BC A7 DD ..D....<........
    0020: C4 FC 52 F1 A9 72 65 14 99 C1 A7 62 61 35 91 D8 ..R..re....ba5..
    0030: AE FF FB FF 82 D8 1C EE 03 02 77 03 19 6A B0 06 ..........w..j..
    [read] MD5 and SHA1 hashes: len = 607
    0000: 0B 00 02 5B 00 02 58 00 02 55 30 82 02 51 30 82 ...[..X..U0..Q0.
    0010: 01 FB A0 03 02 01 02 02 01 00 30 0D 06 09 2A 86 ..........0...*.
    0020: 48 86 F7 0D 01 01 05 05 00 30 57 31 0B 30 09 06 H........0W1.0..
    0030: 03 55 04 06 13 02 55 53 31 11 30 0F 06 03 55 04 .U....US1.0...U.
    0040: 08 13 08 56 69 72 67 69 6E 69 61 31 10 30 0E 06 ...Virginia1.0..
    0050: 03 55 04 07 13 07 46 61 69 72 66 61 78 31 11 30 .U....Fairfax1.0
    0060: 0F 06 03 55 04 0A 13 08 5A 6F 72 6B 2E 6F 72 67 ...U....Zork.org
    0070: 31 10 30 0E 06 03 55 04 03 13 07 52 6F 6F 74 20 1.0...U....Root
    0080: 43 41 30 1E 17 0D 30 34 30 35 32 36 32 30 33 38 CA0...0405262038
    0090: 35 39 5A 17 0D 30 34 30 36 32 35 32 30 33 38 35 59Z..04062520385
    00A0: 39 5A 30 57 31 0B 30 09 06 03 55 04 06 13 02 55 9Z0W1.0...U....U
    00B0: 53 31 11 30 0F 06 03 55 04 08 13 08 56 69 72 67 S1.0...U....Virg
    00C0: 69 6E 69 61 31 10 30 0E 06 03 55 04 07 13 07 46 inia1.0...U....F
    00D0: 61 69 72 66 61 78 31 11 30 0F 06 03 55 04 0A 13 airfax1.0...U...
    00E0: 08 5A 6F 72 6B 2E 6F 72 67 31 10 30 0E 06 03 55 .Zork.org1.0...U
    00F0: 04 03 13 07 52 6F 6F 74 20 43 41 30 5C 30 0D 06 ....Root CA0\0..
    0100: 09 2A 86 48 86 F7 0D 01 01 01 05 00 03 4B 00 30 .*.H.........K.0
    0110: 48 02 41 00 E2 BD 8D E9 59 8E 07 35 2B ED 20 57 H.A.....Y..5+. W
    0120: 38 00 C8 3D 34 85 50 E2 93 A0 17 C7 98 45 F3 5F 8..=4.P......E._
    0130: CD 7B 4A DA 6E F0 C7 0F 7A 03 3E 69 A9 7C CD 15 ..J.n...z.>i....
    0140: 46 F0 D1 C8 7A 0A E9 09 DD B7 6F 5B CD 80 29 E6 F...z.....o[..).
    0150: 3A 6A 49 65 02 03 01 00 01 A3 81 B1 30 81 AE 30 :jIe........0..0
    0160: 0C 06 03 55 1D 13 04 05 30 03 01 01 FF 30 1D 06 ...U....0....0..
    0170: 03 55 1D 0E 04 16 04 14 3F A7 DF 1F FA 90 1F 98 .U......?.......
    0180: 4F BA 42 9F 21 7D B4 C4 88 76 14 DA 30 7F 06 03 O.B.!....v..0...
    0190: 55 1D 23 04 78 30 76 80 14 3F A7 DF 1F FA 90 1F U.#.x0v..?......
    01A0: 98 4F BA 42 9F 21 7D B4 C4 88 76 14 DA A1 5B A4 .O.B.!....v...[.
    01B0: 59 30 57 31 0B 30 09 06 03 55 04 06 13 02 55 53 Y0W1.0...U....US
    01C0: 31 11 30 0F 06 03 55 04 08 13 08 56 69 72 67 69 1.0...U....Virgi
    01D0: 6E 69 61 31 10 30 0E 06 03 55 04 07 13 07 46 61 nia1.0...U....Fa
    01E0: 69 72 66 61 78 31 11 30 0F 06 03 55 04 0A 13 08 irfax1.0...U....
    01F0: 5A 6F 72 6B 2E 6F 72 67 31 10 30 0E 06 03 55 04 Zork.org1.0...U.
    0200: 03 13 07 52 6F 6F 74 20 43 41 82 01 00 30 0D 06 ...Root CA...0..
    0210: 09 2A 86 48 86 F7 0D 01 01 05 05 00 03 41 00 29 .*.H.........A.)
    0220: CB D0 48 E2 89 2F 8D 4A A6 73 11 71 EB 58 9D 9E ..H../.J.s.q.X..
    0230: 0C 44 1F 87 C2 A3 3C C0 E7 9A E3 C4 BC A7 DD C4 .D....<.........
    0240: FC 52 F1 A9 72 65 14 99 C1 A7 62 61 35 91 D8 AE .R..re....ba5...
    0250: FF FB FF 82 D8 1C EE 03 02 77 03 19 6A B0 06 .........w..j..
    Thread-3, READ: TLSv1 Handshake, length = 220
    *** CertificateRequest
    Cert Types: RSA, DSS, Ephemeral DH (RSA sig),
    Cert Authorities:
    <CN=Root CA, O=Zork.org, L=Fairfax, ST=Virginia, C=US>
    <CN=Server CA, OU=Server Division, O=Zork.org, L=Fairfax, ST=Virginia, C=US>
    [read] MD5 and SHA1 hashes: len = 220
    0000: 0D 00 00 D8 03 01 02 05 00 D2 00 59 30 57 31 0B ...........Y0W1.
    0010: 30 09 06 03 55 04 06 13 02 55 53 31 11 30 0F 06 0...U....US1.0..
    0020: 03 55 04 08 13 08 56 69 72 67 69 6E 69 61 31 10 .U....Virginia1.
    0030: 30 0E 06 03 55 04 07 13 07 46 61 69 72 66 61 78 0...U....Fairfax
    0040: 31 11 30 0F 06 03 55 04 0A 13 08 5A 6F 72 6B 2E 1.0...U....Zork.
    0050: 6F 72 67 31 10 30 0E 06 03 55 04 03 13 07 52 6F org1.0...U....Ro
    0060: 6F 74 20 43 41 00 75 30 73 31 0B 30 09 06 03 55 ot CA.u0s1.0...U
    0070: 04 06 13 02 55 53 31 11 30 0F 06 03 55 04 08 13 ....US1.0...U...
    0080: 08 56 69 72 67 69 6E 69 61 31 10 30 0E 06 03 55 .Virginia1.0...U
    0090: 04 07 13 07 46 61 69 72 66 61 78 31 11 30 0F 06 ....Fairfax1.0..
    00A0: 03 55 04 0A 13 08 5A 6F 72 6B 2E 6F 72 67 31 18 .U....Zork.org1.
    00B0: 30 16 06 03 55 04 0B 13 0F 53 65 72 76 65 72 20 0...U....Server
    00C0: 44 69 76 69 73 69 6F 6E 31 12 30 10 06 03 55 04 Division1.0...U.
    00D0: 03 13 09 53 65 72 76 65 72 20 43 41 ...Server CA
    Thread-3, READ: TLSv1 Handshake, length = 4
    *** ServerHelloDone
    [read] MD5 and SHA1 hashes: len = 4
    0000: 0E 00 00 00 ....
    *** Certificate chain
    JsseJCE: Using JSSE internal implementation for cipher RSA/ECB/PKCS1Padding
    *** ClientKeyExchange, RSA PreMasterSecret, TLSv1
    Random Secret: { 3, 1, 175, 38, 47, 77, 131, 125, 209, 147, 174, 228, 183, 99, 34, 2, 100, 186, 77, 47, 65, 233, 82, 133, 183, 113, 8, 193, 51, 241, 167, 105, 4, 187, 57, 130, 161, 11, 178, 11, 134, 84, 96, 106, 203, 11, 195, 51 }
    [write] MD5 and SHA1 hashes: len = 77
    0000: 0B 00 00 03 00 00 00 10 00 00 42 00 40 39 9F EC ..........B.@9..
    0010: 5F 92 FA 3D 5E 3D 0C 19 10 72 DA BE B6 14 76 62 _..=^=...r....vb
    0020: AE 39 75 0B 74 10 C7 B1 42 D7 A1 22 C0 0E B8 A2 .9u.t...B.."....
    0030: 22 80 73 20 36 A2 FD BB F9 3E F4 F0 91 CE 95 F8 ".s 6....>......
    0040: 05 D7 22 FC 2C CF 1B AB 19 82 03 D2 F5 ..".,........
    Thread-3, WRITE: TLSv1 Handshake, length = 77
    SESSION KEYGEN:
    PreMaster Secret:
    0000: 03 01 AF 26 2F 4D 83 7D D1 93 AE E4 B7 63 22 02 ...&/M.......c".
    0010: 64 BA 4D 2F 41 E9 52 85 B7 71 08 C1 33 F1 A7 69 d.M/A.R..q..3..i
    0020: 04 BB 39 82 A1 0B B2 0B 86 54 60 6A CB 0B C3 33 ..9......T`j...3
    CONNECTION KEYGEN:
    Client Nonce:
    0000: 40 CA 22 D1 CD D3 81 EA 58 81 98 B0 DF B4 A1 8A @.".....X.......
    0010: F6 B7 B5 59 3D FC 3F 23 15 22 FD 20 FE 7C 26 C6 ...Y=.?#.". ..&.
    Server Nonce:
    0000: 40 CA 22 D3 51 6A 52 2D E9 E2 59 06 26 F0 47 7A @.".QjR-..Y.&.Gz
    0010: 5A E2 FF CF 09 66 CD 7F DF D3 04 54 4F 10 65 59 Z....f.....TO.eY
    Master Secret:
    0000: 67 B9 58 74 69 18 0B 2E 00 EB AC 9B 77 15 B4 65 g.Xti.......w..e
    0010: 61 A1 AC D0 F1 D5 4C CA 0E 51 FC 58 A0 11 B7 87 a.....L..Q.X....
    0020: EC 72 26 D0 83 18 27 49 8F B6 32 FF E3 89 1D E4 .r&...'I..2.....
    Client MAC write Secret:
    0000: D5 96 AB F7 1E 46 5F 46 8A E9 3E DF A0 5E 32 5E .....F_F..>..^2^
    0010: 00 FB B8 D8 ....
    Server MAC write Secret:
    0000: E6 7D 8E F5 6A 4C 94 4C D6 2A 3A 4D FC C1 94 A3 ....jL.L.*:M....
    0010: C5 6C 5F B6 .l_.
    Client write key:
    0000: 18 1D 51 8C 74 6D 18 57 ..Q.tm.W
    Server write key:
    0000: 0D 4E 7A F1 5A D6 5F 5B .Nz.Z._[
    Client write IV:
    0000: 4C BB 4D FA 4F EB CB 4E L.M.O..N
    Server write IV:
    0000: B7 6A CA E9 66 7D 25 88 .j..f.%.
    Thread-3, WRITE: TLSv1 Change Cipher Spec, length = 1
    JsseJCE: Using JSSE internal implementation for cipher DES/CBC/NoPadding
    *** Finished
    verify_data: { 20, 20, 38, 13, 43, 235, 102, 72, 75, 212, 21, 21 }
    [write] MD5 and SHA1 hashes: len = 16
    0000: 14 00 00 0C 14 14 26 0D 2B EB 66 48 4B D4 15 15 ......&.+.fHK...
    Padded plaintext before ENCRYPTION: len = 40
    0000: 14 00 00 0C 14 14 26 0D 2B EB 66 48 4B D4 15 15 ......&.+.fHK...
    0010: 90 9C E9 09 F4 48 96 A6 8F AA 04 DF E9 36 72 F0 .....H.......6r.
    0020: 42 F0 60 78 03 03 03 03 B.`x....
    Thread-3, WRITE: TLSv1 Handshake, length = 40
    Thread-3, READ: TLSv1 Alert, length = 2
    Thread-3, RECV TLSv1 ALERT: fatal, handshake_failure
    Thread-3, called closeSocket()
    Thread-3, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    Finalizer, called close()
    Finalizer, called closeInternal(true)
    So I'll toil away trying to get *right* combination of settings - please let me know if you have any ideas! FYI here are the command line settings I am using for the keystore:
    -Djavax.net.ssl.keyStore=c:\myClientIdKeyStore -Djavax.net.ssl.keyStoreType=jks -Djavax.net.ssl.keyStorePassword=myClientIdKeyStorePass
    Thanks,
    Paul

  • I Need Help With Making This Program Work

    The directions for this program:
    Enhance the Student class to contain an Advisor. The advisor has a name (type Name), phone number (type String). Place edits in the Name class to validate that the length of the first name is between 1 and 15, middle inital <= 1, and lastName is between 1 and 15. Throw an IllegalArgumentException if the edits are not met. The advisor attribute in the Student class should replace the advisorName. Document the Name, Advisor, and Student classes including the preconditions and postconditions where necessary. Create a test class that will instantiate a Student, fully populate all of its fields and print it out. Do not document the test class. Submit for grade Student.java, Advisor.java, and Name.java.
    public class Student
         private Advisor advisorName;
         private Advisor phoneNumber;
         public void setAdvisorName(Advisor anAdvisorName)
             advisorName = anAdvisorName;
         public Advisor getAdvisorName()
             return advisorName;
         public void setPhoneNumber(Advisor aPhoneNumber)
             phoneNumber = aPhoneNumber;
         public Advisor getPhoneNumber()
             return phoneNumber;
    public class Name
         private String firstName;
         private String midInit;
         private String lastName;
         public String getFullName()
             return firstName + " " + midInit + " " + lastName;
         public String getFirstName()
             return firstName;
         public String getMidInit()
             return midInit;
         public String getLastName()
             return lastName;
            Calculates length of the first name.
            (Postcondition: getFirstName() >= 0)
            @param s the length of the first name to calculate
            (Precondition: length of aFirstName > 0 and <= 15)
         public void setFirstName(String aFirstName)
             if(aFirstName.length() < 1)
               throw new IllegalArgumentException();
             if(aFirstName.length() > 15)
               throw new IllegalArgumentException();
               firstName = aFirstName;
            Calculates length of the middle initial.
            (Postcondition: getMidInit() >= 0)
            @param s the length of the middle initial to calculate
            (Precondition: length of s > 0 and <= 1)
         public void setMidInit(String aMidInit)
             if(aMidInit.length() == 1)
               throw new IllegalArgumentException();
               midInit = aMidInit;
            Calculates length of the last name.
            (Postcondition: getLastName() >= 0)
            @param s the length of the last name to calculate
            (Precondition: length of aLastName > 0 and <= 15)
         public void setLastName(String aLastName)
             if(aLastName.length() < 1)
               throw new IllegalArgumentException();
             if(aLastName.length() > 15)
               throw new IllegalArgumentException();    
               lastName = aLastName;
    public class Advisor
         private Name advisorName;
         private String phoneNumber;
         public String getFullName()
            return advisorName + " " + phoneNumber + " ";
         public Name getAdvisorName()
             return advisorName;
         public String getPhoneNumber()
             return phoneNumber;
         public void setAdvisorName(Name anAdvisorName)
             advisorName = anAdvisorName;
         public void setPhoneNumber(String aPhoneNumber)
             phoneNumber = aPhoneNumber;
    public class Test
         public static void main(String[] args)
            Name name1 = new Name();
            name1.setFirstName("Timothy");
            name1.setLastName("O'Neal");
            name1.setMidInit("J.");
            System.out.println("name1 = " +
                name1.getFirstName() + " " +
                name1.getMidInit() + " " +
                name1.getLastName());
            Student st = new Student();
            st.setAdvisorName(name1);
            Name name2 = st.getAdvisorName();
            System.out.println("name2 = " +
                name2.getFirstName() + " " +
                name2.getMidInit() + " " +
                name2.getLastName());   
            name2.setFirstName("Timothy");
            System.out.println("name2 = " +
                name2.getFirstName() + " " +
                name2.getMidInit() + " " +
                name2.getLastName());       
            System.out.println("name1 = " +
                name1.getFirstName() + " " +
                name1.getMidInit() + " " +
                name1.getLastName());
            System.out.println("name1 = " + name1.getFullName());   
            System.out.println("name2 = " + name2.getFullName());
    }I can't get the test class to compile and i'm not sure if this is what i'm suppose to do

    public class Test
    public static void main(String[] args)
    Student st = new Student();
    Advisor advisor = new Advisor();
    st.setAdvisor(advisor);
    Name name1 = new Name();
    name1.setFirstName("Jake");
    name1.setLastName("Schmidt");
    name1.setMidInit("K.");You have the general idea, I think. You are just doing it backwards.
    You create and advisor and assign it to a student. But you don't give
    the advisor a name until after you assign it to the student.
    You should create an advisor, give the advisor a name and then add it to the student.
    //create the name
    Name name1 = new Name();
    name1.setFirstName("John");
    name1.setLastName("Smith");
    name1.setMidInit("K.");
    //create the advisor
    Advisor advisor = new Advisor();
    advisor.setAdvisorName(name1);
    //create the student
    Student student = new Student();
    //assign the advisor to the student
    student.setAdvisor(advisor);
    //now the student has an advisor named John K. Smith
    //What is the name of the advisor?
    String name = st.advisor.getAdvisorName().getFullName();
    //I know that line looks complicated...but that's how you have created your class structure.
    Instead you could have done:
    Class Student{
    private Advisor advisor;
    public String getAdvisorName(){
    return advisor.getFullName();
    class Advisor{
    private Name advisorName;
    public getFullName(){
    return advisorName.getFullName();
    This way, if you wanted to know the advisor's name you would go:
    String name = st.getAdvisorName();
    which is much easier.
    I think it would be much easier to help you if we were both in the same room, on the same computer :)

  • My iPod Classic is seen by Windows but not by iTunes.  I have reset it, gone to disk mode and it won't show up in iTunes.  There appears to be music on it in a file called MUSICSAVE.  How can I get this to work with iTunes again?

    My iPod Classic is seen by Windows but not by iTunes.  I have reset it, gone to disk mode and it won't show up in iTunes.  There appears to be music on it in a file called MUSICSAVE.  How can I get this to work with iTunes again?

    1. Update iTunes to the latest version. Plug in your iPod. If iTunes still can't recognize it, then in iTunes in the top left corner click help> run diagnostics. On the box that comes up, check the last two things. Click next and it should identify your iPod.
    2. Click on your windows start menu. Type in "services". Click on it and when it pops up, on the bottom of it click on "standard". Now Scroll down to find "Apple Mobile Device" Right click it when you see it and click on "Start". When it has started, close iTunes and replug in your iPod and it should show up.
    3. Check the USB cable
    4 Verify that Apple Mobile Device Support is installed
    5. Restart the Apple Mobile Device Service and verify that the Apple Mobile Device USB Driver is installed.
    6. If you just want to add some photos, songs and movies from computer to your devices, you can use an iTunes alternative to do the job
    7. Check for third-party software conflicts.
    <Link Edited By Host>

  • I am synching my ipad and iphone with icloud. Events put in calendar go to the iphone, but if i enter an event on the iphone, it does not go to the ipad. What do i do to get this to work both ways?

    I am synching my ipad and iphone with icloud. Events put in calendar on ipad  go to the iphone calendar,, but if i enter an event on the iphone calendar, it does not go to the ipad. What do i do to get this to work both ways?

    OK Vicky, good clues...
    See if this helps...
    Open Keychain Access in Utilities, use Keychain First Aid under the Keychain Menu item, then either check the Password under that item, change it, or delete it and start over. See if there are duplicates, should be one for Incoming & one for Outgoing.
    Resetting your keychain in Mac OS X...
    If Keychain First Aid finds an issue that it cannot repair, or if you do not know your keychain password, you may need to reset your keychain.
    http://support.apple.com/kb/TS1544

  • HT201322 Can't get this to work on iPad A1395 with iOS 6.1.2 - any suggestions?

    Can't get this to work on iPad A1395 with iOS 6.1.2 - any suggestions?

    If you mean hiding or unhiding apps, the article is incorrect since iOS 6 and the accompanying iTunes Store redesign were released. You can at this time only hide and unhide apps through iTunes on your computere.
    Regards.

  • Email messages from my icloud account update on all my devices showing if they have been read and if a reply has been sent.  This does not happen with my tinyworld (TalkTalk) email account.  Can I (how can I) get this to work with TinyWorld?

    Email messages from my icloud account update on all my devices showing if they have been read and if a reply has been sent.  This does not happen with my tinyworld (TalkTalk) email account.  Can I (how can I) get this to work with TinyWorld?

    You have to look at the email protocol being used.  the Apple email system uses IMAP, does Tinyworld use IMAP or POP?
    Does the email system permit delivery receipts to be requested?
    Just some of the things one needs to determine from the information provided by the email service provider.

  • HT201257 anyone actually get this to work with a machine with Lion pre installed? (mid iMac 2011)

    I tried getting this to work, but the machine just boots to the regular install.
    The system came with a BT keyboard, I hope Apple didn't overlook this problem.

    I just found out that the article lies about the keys to hold down.
    It's actually OPTION + D, not just D as the article states.
    *Come on* Apple.

  • HT200160 This solution does not seem to work when I upgraded from OS X 10.6 to OS X 10.8 (Mountain Lion).  I've tried all versions of this.  Any suggestions specific to getting this to work with Mountain Lion?

    Any suggestions for making this work with Mountain Lion?  I've tried all similar solutions on web.  I've been able to get this to work with Lion, and after upgrading to Mountain Lion it seems to hold true (doesn't make me implement again).  But when I went from OSX 10.6 to Mountain Lion and have to implement it on 10.8 - it isn't working. Thanks.

    Any suggestions for making this work with Mountain Lion?  I've tried all similar solutions on web.  I've been able to get this to work with Lion, and after upgrading to Mountain Lion it seems to hold true (doesn't make me implement again).  But when I went from OSX 10.6 to Mountain Lion and have to implement it on 10.8 - it isn't working. Thanks.

  • ICal Server email invitations - how to test and get this feature working

    iCal Server email invitations - how to test and get this feature working
    Thanks Apple for introducing this nice little feature into iCal but then completely neglecting to write any sort of useful manual that can explain what to do when it doesn't work after you set it up for the first time.
    At long, long last we have finally got there after about 6 months of fiddling on and off, so I thought I had better post up the process since many have similar issues and it is hard to ascertain what is going on.
    Using an external email server was just a waste of time and it still wouldn't handle the replies properly even though it was supposed to handle '+addressing'. In the end I set up a special gmail account for the iCal server and finally got it working. I list here the process of configuring and testing the system to check that each little stage is working.
    Set up a Gmail account in Apple Mail to access and test in the usual way for any email account (e.g. [email protected].);
    Set the iCal server email to access the same email using the following settings:
    IMAP
    SMTP
    [email protected]
    smtp.gmail.com
    Port: 993 [x] Use SSL
    Port: 587 [x] Use SSL
    User & Pwd
    Login
    User & Pwd
    To test the settings:
    send out a test email from Apple Mail to a non-server email address that you can access to check it has been received;
    send out a test email from your non-server email account to [email protected] and check that it is received;
    this tells you that the GMail account is setup correctly and working
    Testing iCal:
    I noted that iCal was deleting any emails that arrive in the inBox in Apple Mail as soon as they arrived (this is to be expected);
    test that the invites are being sent from iCal by setting an event in iCal and inviting your non-server address (you may not see any sign of this in Apple Mail but you should catch it in the iCal server log and possibly in the Gmail sent mail box);
    check that the invite is received at your non-server account and Accept it in iCal on another machine - the reply is automatically sent back;
    the replies appear in Apple Mail but are quickly deleted by iCal. But their record for you to see is left in Gmail under 'All Mail';
    Accepted invites appear as a notification button on the top left hand bar on iCal where you click to acknowledge them and then the attendee is shown as a green circled tick instead of a grey circled ?.
    this shows that iCal invitations are working correctly. Whenever an event is updated, all invitees should be updated by email automatically.
    I hope this helps anyone - I could certainly have done with something similar when I started with looking at this.
    Anatole
    The Error and Access logfile in the Server app under iCal server are very useful in determining any errors. I got lots of imip errors when I didn't quite have the settings right. The port is critical and it won't tell you this is the problem if it fails.

    iCal Server email invitations - how to test and get this feature working
    Thanks Apple for introducing this nice little feature into iCal but then completely neglecting to write any sort of useful manual that can explain what to do when it doesn't work after you set it up for the first time.
    At long, long last we have finally got there after about 6 months of fiddling on and off, so I thought I had better post up the process since many have similar issues and it is hard to ascertain what is going on.
    Using an external email server was just a waste of time and it still wouldn't handle the replies properly even though it was supposed to handle '+addressing'. In the end I set up a special gmail account for the iCal server and finally got it working. I list here the process of configuring and testing the system to check that each little stage is working.
    Set up a Gmail account in Apple Mail to access and test in the usual way for any email account (e.g. [email protected].);
    Set the iCal server email to access the same email using the following settings:
    IMAP
    SMTP
    [email protected]
    smtp.gmail.com
    Port: 993 [x] Use SSL
    Port: 587 [x] Use SSL
    User & Pwd
    Login
    User & Pwd
    To test the settings:
    send out a test email from Apple Mail to a non-server email address that you can access to check it has been received;
    send out a test email from your non-server email account to [email protected] and check that it is received;
    this tells you that the GMail account is setup correctly and working
    Testing iCal:
    I noted that iCal was deleting any emails that arrive in the inBox in Apple Mail as soon as they arrived (this is to be expected);
    test that the invites are being sent from iCal by setting an event in iCal and inviting your non-server address (you may not see any sign of this in Apple Mail but you should catch it in the iCal server log and possibly in the Gmail sent mail box);
    check that the invite is received at your non-server account and Accept it in iCal on another machine - the reply is automatically sent back;
    the replies appear in Apple Mail but are quickly deleted by iCal. But their record for you to see is left in Gmail under 'All Mail';
    Accepted invites appear as a notification button on the top left hand bar on iCal where you click to acknowledge them and then the attendee is shown as a green circled tick instead of a grey circled ?.
    this shows that iCal invitations are working correctly. Whenever an event is updated, all invitees should be updated by email automatically.
    I hope this helps anyone - I could certainly have done with something similar when I started with looking at this.
    Anatole
    The Error and Access logfile in the Server app under iCal server are very useful in determining any errors. I got lots of imip errors when I didn't quite have the settings right. The port is critical and it won't tell you this is the problem if it fails.

  • Negative (to inline a letter or to thin it) offset path does not work in Illus-CC 2014 (when preview is on- nothing happens). How can I get this to work like in previous versions.

    Negative (to inline a letter or to thin it) offset path does not work in Illus-CC 2014 (when preview is on- nothing happens). How can I get this to work like in previous versions.

    Thanks for your quick reply. I tried a number of different values. Usually when I do a negative offset they're very small values, like -.25 or -.5.
    An Update- I took the art work into Ai CS 6 and It still did not work, which is really strange. And I've used it hundreds of times with success in the past. Also I tried it with live type and outlines, ungrouped, un-compounded still could not get it to negative offset.
    Thanks for the help.

  • Need help to get serial part working

    i use this lap top to tune my race car because it has the serial port. every time i tun on my laptop i get " Your network adapter SMC IrCC (Infraded Communications Controller) (0007) is not working properly. You may need to set it up again. For more Information, see Network Troubleshooter in Windows Help." i have tried to look for the help and have tried to solved the problem but, i still get the same message when i start up the laptop. any help will be great.
    thank

    You said serial port, the nine pin port on the computer?  If so then just disable the infared port on the computer as most people don't use these.  Just get into Device manager on your computer through control panel, System.
    If you need the IRDA, infared port, then just try reloading drivers for it, or try rolling back the drivers. If you need mroe help then whatversion of windows are you running and what do you need help with?
    This signature left intentionally blank.

  • A Playlist idiot. Why can't I get this to work?

    In iTunes I have music Playlists set to shuffle (blue double arrow button) and audio books Playlist set no shuffle. I have been unable to get my iPod to follow these settings. A suggested work around is to use the iPod Settings to set the shuffle function to "songs" when playing music and then switching to “off’ for audio books. There has to be a better way. How do I set the Playlists on my iPod to function the same as it does on iTunes?

    LeftyLucy,
    Using your process are you able to set your iPod to shuffle then listen to the audio book without it shuffling the chapters? I have tried your suggestion with the iPod setting set to shuffle and the chapters shuffled. This is the issue from my original post. I want to listen to music with the shuffle function and listen to audio books (no shuffle) without having to change the settings every time I switch.
    Keep in mind that is not a purchased audio nor a imported book.
    Using a tip from the following post:
    Tom Graves, "A Playlist idiot. Why can't I get this to work?" #11, 05:26pm Sep 28, 2005 CDT
    I have attempted to make the audio book file into an authenticate file but that did not help.

  • HT1203 iTunes: How to share music between different accounts on a single computer - I tried to use the instructions to configure 2 different windows users sharing the same iTunes library.  I could not get this to work per the instructions.

    I tried to configure 2 windows users accounts using a single library per the instructions in HT1203.  My iTunes library is on an external drive.  I cannot get this to work.  Any suggestions?

    To give other users read-only access to your iTunes library, use the Sharing features of iTunes. Sharing works over the local network as well as on the same computer. See the built-in help for details.
    If you want to give full read/write access to more than one user, see the support article linked below.
    iTunes: How to share music between different accounts on a single computer
    There is a way to share the library without moving it to a secondary volume. If you really need to do that, ask for instructions.

  • After updating to Firefox 5 my Realplayer Recorder is not working due to that add on not being compatible. How do I get this to work again?

    After updating to Firefox 5 my Realplayer Recorder is not working due to that add on not being compatible. How do I get this to work again?

    Blue
    It sounds like you restored from an old back-up.  Did you back-up just before your software update?  It will use your last one and if your last back-up was a ywear old then it will use that one.
    In general, if you are getting these messages on your iPhones select logout (when you get that Apple Id request) and then log back in with your newer ID.
    Sorry for your losses.
    Cheers

Maybe you are looking for

  • To view the report in assending order

    Hi All, i am trying to load data from a  flat file to cube in BI-7. my char is sales id and key fields are sales,profit and cost price.But char sales id column contains data like s1,s2,s3,s4,s5.....................upto s15. i have also loaded the dat

  • VGA Splitter

    I just bought a VGA splitter and i hooked it up to my computer it displays both screens. I have a windows 8 HP Pavilion and when i go to devices it says that its a "Generic Non-PNP Monitor". It also doesnt turn up as a projected source. Please help..

  • IWeb 08 UPGRADE and now receive a "Publish Error"

    I am receiving a "An unknown Error occurred" Publish Error after I upgraded to iWeb 08. I cleaned out my iDrive directory, modified my website, etc, and still receive the same error. PLEASE HELP!

  • How to change the language in sqlplus

    Hi All, During the installation of oracle client, language was selected as 'Danish'. Because of which all the messages in the sqlplus are appearing in Danish. But i want to use the sqlplus in English. Is there any way to change the language setting o

  • Notification view?

    Hi all who read this :-) , My environment is Oracle9i Enterprise Edition Release 9.2.0.8.0. I need a query or view for the Notification workflow. I know the standard table is wf_notifications and the table wf_messages contain the notification message