Problem using Java Webstart to kick off CORBA Client

Dear all,
I am currently having a problem in using the Java Webstart to kick off
the CORBA Client, I set up the JNLP file jvm properties as following:
<resources>
<j2se version="1.4*" java-vm-args="-Xms64m -Xmx256m -verbose -esa
-Xnoclassgc -client -Dswing.useSystemFontSettings=false ">
     <resources>
     <property name="vbroker.orb.initRef"
value="NameService=corbaloc::10.35.55.82:20005/NameService"/>
</resources>
</j2se>
</resources>
The problem I have is that when the webstart starting the client, the
client just simply dies during the startup and I find the log message
following:
org.omg.CORBA.ORBPackage.InvalidName
     at com.inprise.vbroker.orb.ORB.resolve_initial_references(ORB.java:943)
So it is showing that there is problem with the vbroker.orb.initRef
setting, know that if I don't use the webstart to start the client and
simply use the windows batch file, using the jvm properties as:
java -Dvbroker.orb.initRef=NameService=corbaloc::10.31.51.80:20001/NameService
It would work perfectly.
Could you tell if I miss anything when configuing the webstart jnlp
file on this regard? Currently, I think that the only way I can set
the JVM properties in the JNLP file is to use its properties tag to
set the system properties for the application.
Thanks heaps in advance for any help you can give here !!!
Victor

Hi, Andre,
No, I have tried both of your suggestion and there was no joy. I still have the following error and the client jvm just crashes during starting up:
org.omg.CORBA.ORBPackage.InvalidName
     at com.inprise.vbroker.orb.ORB.resolve_initial_references(ORB.java:943)
I believe it is still related to the jvm properties:
<property name="vbroker.orb.initRef" value="NameService=corbaloc::10.35.55.82:20005/NameService"/>
And know that when I used "-Dvbroker.orb.initRef=NameService=corbaloc::10.35.55.82:20005/NameService" in the windows batch file, the client runs ok.
Is this indicating that there is the limitation of using the webstart to invoke CORBA client?
Any further help would be very appreciated!
Victor

Similar Messages

  • Jar files download problems in Java Webstart with JRE 1.6

    We have encountered a few problems in Java Webstart with JRE 1.6
    In JRE 1.5, the jar files are getting downloaded onto the client
    machine with it's original names.
    Example :
    Server File Name : acm.jar
    Client File Name : RMacm.jar
    But in JRE 1.6, the jar files are getting downloaded with improper file names.
    Example :
    Server File Name : acm.jar
    Client File Name : 4fb074cc-66fc7407
    Moreover the path itself seems to be invalid.
    Example Path :
    JRE 1.5 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\javaws\https\D17.16.23.11\P443\DMtest\DMwebStart
    JRE 1.6 path:
    C:\Documents and Settings\Administrator\Application
    Data\Sun\Java\Deployment\cache\6.0\12
    Due to this, we are facing Classpath problems.
    What changes do we have to make to the code, for Java
    Webstart to work ?
    We are using JBoss 4.0.4 and JDK 1.5 in the Server
    On the client machine, we have IE 6 and JRE 1.6.01
    Help would be appreciated.

    Ask your Java Web Start question at:
    http://forum.java.sun.com/forum.jspa?forumID=38

  • How to use Java WebStart with EJB ?

    hi forum...
    how to use Java WebStart with EJB ? examples ?
    thanks
    mindu

    Greetings,
    hi forum...
    how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
    thanks
    minduRegards,
    Tony "Vee Schade" Cook

  • Strange Corba performance problem using java 1.6

    I have a java server talking to java and C++ clients using CORBA and moved from java 1.4.2 to 1.6.
    Using java 1.4.2 for a large block of data, the client consistently refreshes in about 28-32 seconds.
    Using Java 1.6 the times vary between 19 and 135 seconds.
    After restarting the server all clients consistently take a simlar amount of time (usually between 32-35 seconds). But sometimes when the server is started the clients see a time between 19-25 seconds, sometimes between 50-55 seconds, and very occassionally over we see times of over 100 seconds.
    Once started, the server seems to pick up some setting or behaviour that causes it to run at a fairly fixed rate.
    We have tried adjusting the GIOP fragment and block size, which can change the performance, but no mater what size we use, we still see this strange behaviour where the server sometime runs in "fast" mode and sometimes in "slow" mode.
    The server side cpu usage is higher when it is in "fast" mode. Client side cpu is higher in slow mode. Amount of data transfered does not appear to change.
    Server runing on Linux RedHat Ent 4u5 - client Linux RedHat 9, RedHat Ent 4u5.
    I see a similar behaviour even when I run the client and server on the same machine.
    Any thoughts on where I should look next anyone?
    Write a simple corba server/client that shows the problem.
    Investigate Other Corba networking settings
    measure the client server packet size and performance.
    Thanks

    3 forums is not enough to post this in, I mean, it is such a HUGE problem,
    you should post it in at least another 20 forums.

  • Java Applet not kicking off thru "Self Service"

    Cloned New Application Environment using production alike environment, I could login and navigate and view forms for various application users.
    But After login thru self service and click on any options under right panel, it hangs with out kicking off Java Applet and next screens.
    Any help is highly appreciated.
    Regards
    Rao

    sorry, I could login and navigate and view forms for various application users using normal login "host:8582/dev60cgi/f60cgi?" But not thru self service.
    Thanks

  • Deploying JClient App using Java Webstart

    I've got a BC4J/JClient app that I'm ready to deploy. I read the May 2004 white paper "Deploying Oracle ADF JClient Applications with Java Web Start" by Frank Nimphius. In the white paper it says that you must sign the jar files in order for the webstart deployment to the client to succeed. Since this will be an intranet only application, my plan is to use the Oracle Certificate Authority to generate my trusted certificate chain for code signing. I've figured out how to generate code signing certificates using OCA and I've signed code in the past using Sun's keytool utility. However, when I use keytool to generate my certificate request(CSR) and use OCA to approve it, I can't import it back into the keystore. I am assuming that I need to include the "-provider" switch on the "-import" command for keytool. If I'm correct, does anyone know what the provider is for OCA?
    I also thought about not using keytool and generating a new CSR using Oracle Wallet Manager. I'm guessing that wallet mgr should already know about the OCA certificate formats. Since a wallet file is just a PKCS#12 keystore, I'm assuming that the jarsigner utility shouldn't have any problems using it as a code signing certificate store. My problem with wallet mgr is that I can only find it on the machine that has 10gAS installed on it. Is there any way I can install just the wallet mgr on another PC?
    Thanks,
    Mark Brown

    Thanks Frank. I posted the question here:
    Signing Java Webstart apps with Oracle Certificate Authority
    for anyone who wants to follow the progress.
    Mark

  • Problem using Java Mail API with WLS 7.0

    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
         public static void main(String args[])
              try
                   //Context ic = getInitialContext();
                   InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
                   Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
                   Properties props = new Properties();
                   props.put("mail.transport.protocol", "smtp");
                   props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
                   props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
                   Session session2 = session.getInstance(props);
                   Message msg = new MimeMessage(session2);
                   msg.setFrom();
                   msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
                   msg.setSubject("Test Message");
                   msg.setSentDate(new Date());
                   MimeBodyPart mbp = new MimeBodyPart();
                   mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(mbp);
                   msg.setContent(mp);
                   Transport.send(msg);
              catch(Exception e)
                   e.printStackTrace();
         }//end of main
    public static Context getInitialContext()
         throws NamingException
              Properties p = new Properties();
              p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
                   p.put(Context.SECURITY_PRINCIPAL, "weblogic");
                   p.put(Context.SECURITY_CREDENTIALS, "weblogic");
              return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah

    You can use InitialContext ic = new InitialContext() only if you are using a startup class, servlet or a JSP i.e
    server side code.
    If you are using a java client you need to use Context ic = getInitialContext();
    Try this code
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try {
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, "t3://localhost:7001");
    Context ic = new InitialContext(h);
    Session session = (Session) ic.lookup("testSession");
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    props.put("mail.from", "[email protected]");
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse("[email protected]",false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    }//end of class
    We have shipped a javamail example in the samples\server\src\examples\javamail folder.
    Jimmy Shah wrote:
    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try
    //Context ic = getInitialContext();
    InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
    Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
    props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    public static Context getInitialContext()
    throws NamingException
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
    p.put(Context.SECURITY_PRINCIPAL, "weblogic");
    p.put(Context.SECURITY_CREDENTIALS, "weblogic");
    return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah--
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Problems using java.xml.xpath - How to get values from DTMNodeList?

    Sorry for the waffle in the subject title, but I was unsure what to call it. I hope this thread is in the correct forum.
    I'm having problems using xpath to parse some data from an XML file. I am able to create an expression which obtains the elements I wish to retreive, but I'm unsure on how to go about getting their values. So far I have..
    public int getTerms(int PMID)
              String uri = "http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id="
                           + PMID + "&retmode=xml";
              // Create an XPath object with the XPathFactory class
              XPathFactory factory = XPathFactory.newInstance();
              XPath xPath = factory.newXPath();
              // Define an InputSource for the XML article
              InputSource inputSource = new InputSource(uri);
              // Create the expression
              String expression = "/PubmedArticleSet/PubmedArticle/MedlineCitation/MeshHeadingList/MeshHeading/DescriptorName";
              // Use this expression to obtain a NodeSet of all the MeSH Headings for the article
              try
                   DTMNodeList nodes = (DTMNodeList) xPath.evaluate(expression,
                         inputSource, XPathConstants.NODESET);
                   int length = nodes.getLength();
                   String[] terms = new String[length];
                   // Test mesh terms are being stored.
                    *for (int i=0; i<length; i++)*
    *                    System.out.println(i + ": " + nodes.item(i).getNodeValue());*
                                                    return nodes.getLength();
              catch (XPathExpressionException e2)
              { System.out.println("Article with PMID " + PMID + " has no associated MeSH terms");}
              // return a default
              return 0;
         } The part in bold is the problematic code. I wish to retreive the values of each of the nodes I have taken into my DTMNodeList using a for loop to iterate through each node, and use the getNodeValue() method from the Node class which should return a string. However, the values I retreive are NULL. In the test document I use, the elements do have values.
    Here is a snippet of the XML file I am reading in:
    <MeshHeadingList>
      <MeshHeading>
      <DescriptorName MajorTopicYN="N">Binding Sites</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Chromatium</DescriptorName>
      <QualifierName MajorTopicYN="Y">enzymology</QualifierName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="Y">Cytochrome c Group</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Electron Spin Resonance Spectroscopy</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Flavins</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Heme</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Hydrogen-Ion Concentration</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Iron</DescriptorName>
      <QualifierName MajorTopicYN="N">analysis</QualifierName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Magnetics</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Oxidation-Reduction</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Protein Binding</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Protein Conformation</DescriptorName>
      </MeshHeading>
    - <MeshHeading>
      <DescriptorName MajorTopicYN="N">Temperature</DescriptorName>
      </MeshHeading>
      </MeshHeadingList>Any help would be appreciated.. thanks :-)

    Answered my own question....
    The element value is actually the child of the node I am current at, so instead of doing:
    i + ": " + nodes.item(i).getNodeValue()); I should have really done:
    i + ": " + nodes.item(i).getChildNode().getNodeValue());

  • Problem Using Java Store Procedure (java class) to connect to sybase

    Hi, I'm trying to use a java class to obtain some data from another databse (SYBASE) in another server.. here are the code
    package pkg;
    import com.sybase.jdbcx.SybDriver;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class clsTest
    public clsTest()
    public static void main(String[] args)
    testConn("");
    private static void testConn()
    Connection _con= null;
    String host = "XXX";
    String port= "XXX";
    String url = host + ":" + port;
    Statement _stmt= null;
    int timeout = 10;
    boolean needsReconnect = true;
    SybDriver sybDriver = null;
    try
    Class c = Class.forName("com.sybase.jdbc3.jdbc.SybDriver");
    sybDriver = (SybDriver) c.newInstance();
    DriverManager.registerDriver((Driver) sybDriver);
    catch (Exception e)
    System.err.print("Unable to load the Sybase JDBC driver. "
    + e.toString());
    e.printStackTrace(System.out);
    if (needsReconnect)
    try
    if (_con != null)
    _con.close();
    url="jdbc:sybase:Tds:BDSERVER:PORT/BD";
    System.err.println("Trying to connect to: " + url);
    DriverManager.setLoginTimeout(timeout);
    con = DriverManager.getConnection(url,"usrquery","mundial");
    _stmt = _con.createStatement();
    boolean results = _stmt.execute("select count(*) from TABLA");
    if (results)
    ResultSet rs= _stmt.getResultSet();
    rs.next();
    System.err.println(rs.getString(1));
    _con.close();
    catch (SQLException sqle)
    System.err.println(sqle.toString() + " Restart connection.");
    return;
    catch (Exception e)
    e.printStackTrace();
    System.err.println("Unexpected Exception: " + e.toString());
    return;
    When I run the proyect using the IDE JDeveloper I have no problem, but when I make de use loadjava I receive these error message
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    Error while creating resource META-INF/MANIFEST.MF
    ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler
    creating : class pkg/clsTest
    loading : class pkg/clsTest
    creating : resource jconn3.jar
    loading : resource jconn3.jar
    Error while creating resource jconn3.jar
    ORA-29547: Java system class not available: oracle/aurora/rdbms/Compiler
    granting : execute on class pkg/clsTest to public
    Error while computing shortname of pkg/clsSybaseLAE
    ORA-06550: line 1, column 13:
    PLS-00201: identifier 'DBMS_JAVA.SHORTNAME' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    resolving: class pkg/clsTest
    errors : class pkg/clsTest
    ORA-29521: referenced name java/lang/StringBuffer could not be found
    ORA-29521: referenced name java/lang/Class could not be found
    ORA-29521: referenced name com/sybase/jdbcx/SybDriver could not be found
    ORA-29521: referenced name java/sql/Driver could not be found
    ORA-29521: referenced name java/sql/DriverManager could not be found
    ORA-29521: referenced name java/lang/System could not be found
    ORA-29521: referenced name java/lang/Exception could not be found
    ORA-29521: referenced name java/io/PrintStream could not be found
    ORA-29521: referenced name java/sql/Connection could not be found
    ORA-29521: referenced name java/sql/Statement could not be found
    ORA-29521: referenced name java/sql/ResultSet could not be found
    ORA-29521: referenced name java/sql/SQLException could not be found
    ORA-29521: referenced name java/lang/Object could not be found
    ORA-29521: referenced name java/lang/String could not be found
    synonym : pkg/clsTest
    The following operations failed
    resource META-INF/MANIFEST.MF: creation
    class pkg/clsTest: resolution
    resource jconn3.jar: creation
    exiting : Failures occurred during processing
    Please some one help me!.. Thank's a lot

    Thanks, you was right, but I have another problem
    The following operations failed
    class cl/bcch/clsSyBase: resolution
    source cl/bcch/clsSyBase: creation (createFailed)
    oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:1057)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:124)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:53)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:98)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:503)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:381)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:300)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$Action$1.run(StoredProcProfileDt.java:598)
    #### Export incomplete. #### 09-01-2008 02:28:39 PM
    *** Note ***
    One possibility for the database export failure is that the target Database may not support JDK version 1.4. Updating your Project Properties compiler Source & Target to an earlier release could fix this problem.
    ************

  • Problem using java String.split() method

    Hi all, I have a problem regarding the usage of java regular expressions. I want to use the String.split() method to tokenize a string of text. Now the problem is that the delimiter which is to be used is determined only at runtime and it can itself be a string, and may contain the characters like *, ?, + etc. which are treated as regular expression constructs.
    Is there a way to tell the regular expression that it should not treat certain characters as quantifiers but the whole string should be treated as a delimiter? I know one solution is to use the StringTokenizer class but it's a legacy class & its use is not recommended in Javadocs. So, does there exist a way to get the above functionality using regular expressions.
    Please do respond if anyone has any idea. Thanx
    Hamid

    public class StringSplit {
    public static void main(String args[]) throws Exception{
    new StringSplit().doit();
    public void doit() {
    String s3 = "Dear <TitleNo> ABC Letter Details";
    String[] temp = s3.split("<>");
    dump(temp);
    public void dump(String []s) {
    System.out.println("------------");
    for (int i = 0 ; i < s.length ; i++) {
    System.out.println(s);
    System.out.println("------------");
    Want to extract only string between <>
    for example to extract <TitleNo> only.
    any suggestions please ?

  • Problem using Java under Vista - Need help, please

    Hi everybody, I'm looking after a solution to resolve following problem : for one of my customer who's needing to use a secure access to a HTTPS URL, after Java is started, I receive the Java logo but it must be followed by an authentification screen where it's needed to enter a login + password. Sometimes it work (I think only when I force to reload the HTTPS certificate) but each time, the application freeze on this screen that I can see in the Task Bar but I can only close it and impossible to access it for the next step of the process. It's working on an original Windows Vista Home Premium pre-installed on a Sony Vaio Laptop and I've already use the application on another computer with Vista Business without any problem. Thanks in advance.

    Thanks for your answer. I've just tried on my XP Laptop. Here are the steps : after several windows, the Java start into a blank window and I receive then the logo at the left side of the window. After, in this case I'm asked to accept the HTTPS certificate and remember it if I want. When accepted, I receive then new "little" window (like a dialof box) with "Authentifaction request" when I need to enter again a login + password. If I recieve this last window, it mean that all is going fine but in my "problem" case, after the Java window, I see only this authentification request onthe task bar but no way to open it or to see it on the screen but no error message except ont the java window (no answer). Perhaps one more information, indication, it appaers "Oracle Application Server Forms Services" into the title bar.

  • My iPad disconnects everyone else on the router when in use. It actually kicks off everyone else that is using the same router connection periodically.

    Yes. Not that my iPad gets disconnected, it actually might be causing everyone else to disconnect from the router, including itself.
    Whenever I connect my router to this wifi at work or home at periodic intervals it actually causes everyone, including wifi and 'hard-line' users to receive no connection to the local network and internet.
    When the iPad stops connecting to the wifi, the problem stops for the duration it stays off, Tested it at durations of no iPad connection of 4 hours with no problems. And when connected it causes everyone on the network to drop (for all users) every 5-15 minutes.
    Why does ithis happen and how do I make it stop?

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router. Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Help...problems using java comm API

    Hi all
    im using Fedora Core and in order to list all the available serial ports for my computer i'm using the classic program TestEnumeration, but when running from jbuilder 2005 not from shell i received the following errors:
    Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
    Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver
    Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
    Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver
    warning: no ports found - make sure javax.comm.properties file is found
    i have followed all the instruction to install comm API but i received the same error i need help plz if someone can
    thx

    import java.io.*;
    import java.util.*;
    import javax.comm.*;
    import java.lang.*;
    import java.Buff.*;
    public class SimpleRead implements Runnable, SerialPortEventListener
         static CommPortIdentifier portId;
         static Enumeration portList;
         InputStream inputStream;
         SerialPort serialPort;
         Thread readThread;
         public static void main(String[] args)
         {//System.out.println("hello");
              portList = CommPortIdentifier.getPortIdentifiers();
              while (portList.hasMoreElements())
                   portId = (CommPortIdentifier) portList.nextElement();
                   if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL)
              if (portId.getName().equals("COM1"))
                   // if (portId.getName().equals("/dev/term/a")) {
              SimpleRead reader = new SimpleRead();
         public SimpleRead()
         try
              serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
         catch (PortInUseException e)
                                  System.out.println(e);
         try
         inputStream = serialPort.getInputStream();
         catch (IOException e)
                        System.out.println(e);
                   try
    serialPort.addEventListener(this);
                   catch (TooManyListenersException e)
                        System.out.println(e);
         serialPort.notifyOnDataAvailable(true);
         try
         serialPort.setSerialPortParams(9600,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
              catch (UnsupportedCommOperationException e)
                        System.out.println(e);
    try {
    out = new OutputStreamWriter(serialPort.getOutputStream());
    out.write("ATQ0V1E0");
    out.flush();
    out.write("ATQ0V1E0");
    Out.close();
    //System.out.println("ATQ0V1E0");
    catch (IOException e) {}
    try {
    int line;
    int result ;
    InputStream = serialPort.getInputStream();
    int num= inputStream.available();
    InputStreamReader reader = new InputStreamReader(inputStream);
    System.out.println(reader.ready());
    while ((line = reader.read()) <= 0)
    result =reader.read();
    System.out.println("Success " + result);
    reader.close();
    catch (IOException e) {}
    readThread = new Thread(this);
    readThread.start();
    try {
    OutputStream = SerialPort.getOutputStream();
    catch (IOException e) {}
              System.out.println("ATQ0V1E0");
    public void run()
         try
    Thread.sleep(500);
    catch (InterruptedException e)
                   System.out.println(e);
    public void serialEvent(SerialPortEvent event)
    switch(event.getEventType())
    case SerialPortEvent.BI:
    case SerialPortEvent.OE:
    case SerialPortEvent.FE:
    case SerialPortEvent.PE:
    case SerialPortEvent.CD:
    case SerialPortEvent.CTS:
    case SerialPortEvent.DSR:
    case SerialPortEvent.RI:
    case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
    break;
    case SerialPortEvent.DATA_AVAILABLE:
    byte[] readBuffer = new byte[20];
    try
    while (inputStream.available() > 0)
    int numBytes = inputStream.read(readBuffer);
    System.out.print(new String(readBuffer));
    catch (IOException e)
                        System.out.println(e);
    break;
    hi friends am getting these errors
    C:\programs>javac SimpleRead.java
    SimpleRead.java:115: illegal start of expression
    public void run()
    ^
    SimpleRead.java:159: ';' expected
    ^
    2 errors
    please help me....
    its very urgent....this is the first program of mine.... am so tensed..
    i should finish this soon... please help me...
    this is my mail ID
    [email protected]

  • Charset problems using java applet.

    Im running a java applet where the text is displayed in a JEditorPane.
    When running the applet locally the charset is all fine, but when i push the applet into a webserver the charset is displayed incorrectly.
    Anyone have any thoughts why this can happen?

    Actually this was caused because I signed the jarfiles running on the server. Why does that happen?

  • Problem using java crypto class... Please help me

    Hi, i'm trying to do application that send information via socket, and i have to send the data encrypted,
    i`m trying to implemented the RC4 algorithm.... I read an article that said that the java sdk 1.4 has already
    implemented the securities classes. So I made this little program:
    import javax.crypto.spec.*;
    import javax.crypto.*;
    import java.security.*;
    import java.io.*;
    public class MicroRC4
    public void encriptaClavePublica(String trama)
    Cipher rc4Cipher;
    byte[] rc4KeyByte;
    SecretKey rc4Key;
    String keyStr;
    String messageEncryp;
    byte[] messageEncrypByte;
    rc4Key = null;
    messageEncryp = trama;
    // Clave para encriptar el mensaje
    keyStr = new String();
    keyStr = "12345678";
    rc4KeyByte = new byte[8];
    messageEncrypByte = new byte[255];
    for(int i=0; i < 8; i++)
    rc4KeyByte[i] = (byte)keyStr.charAt(i);
    try
    for(int i=0; i < messageEncryp.length(); i++)
    messageEncrypByte[i] = (byte)messageEncryp.charAt(i);
    rc4Key = (SecretKey)new SecretKeySpec(rc4KeyByte, "RC4");
    rc4Cipher = Cipher.getInstance("RC4");
    rc4Cipher.init(Cipher.ENCRYPT_MODE, rc4Key);
    byte[] result = null;
    result = rc4Cipher.doFinal(messageEncrypByte);
    System.out.println("Usage:"+result);
    catch(Exception e)
    System.out.println(" Error: " + e.getMessage());
    System.out.println("\n........................................\n");
    I don't know what is wrong but when i run the application it show me the following message :
    Error: Algorithm RC4 not available
    Does anybody know what is wrong ??
    Does anybody can help me ??
    or tell me when can i find some source code that implement de RC4 algorithm
    Thank's in advance..
    Alejandro.

    Hi Alejandro,
    In the ends i decided to implement the algorithm by
    myself, i did it... any way thank's again.... If
    anybody want to see the code, send me a mail......
    AlejandroCan I also get the source code? my email id is [email protected]
    Thanks a lot!
    Srik.

Maybe you are looking for

  • No audio streaming movies with iTunes 10.2.1 and iOS 4.3

    I upgrade to iTunes 10.2.1 and to iOS 4.3 and now I can´t listen audio on my movies with 6 channels audio. With two channels (stereo) there is no problem. With multichannel I just can see the video, but can´t listen. The problem is with my iPad and m

  • How do you install zipped files

    I have downloaded a zipped file and when I open it to install it I can't find where it goes. I have ended up saving it about ten times. I am new with the apple but this is the first time I have not been able to install a download. Thanks for your hel

  • Harddrive upgrade

    well i currently have a 120gb hd in my mac book pro , i want to upgrade it, there just a few questions i have: is it easy to do? should I be doing this to my lovely mac? what brand name hd should be going in there? and is it easy to reinstall the mac

  • Update 4.2.1 didnt do anything at all.

    hi, I just updated my ipods software to the new 4.2.1 version and looked it up to find all the stuff it should have added. But my ipod has NONE of the "new" stuff it was supposed to add. It shows on the apple.com website that a ipod touch 3rd generat

  • Find CD Code

    I am trying to find a way to have my application look for a file on the program cd before it launches the main program. I have tried the Find Cd KO and the read extfile function. These are being used in conjunction with the jumpout and/or Quit functi