JMS: simple program (urgent please)

I am quite new with the JMS. I am trying to have a simple program running in order to start from it towards the application I want to build.
I tried to run the sample program below:
package chat;
import javax.jms.*;
import javax.naming.*;
import java.io.*;
import java.io.InputStreamReader;
import java.util.Properties;
public class Chat implements javax.jms.MessageListener {
private TopicSession pubSession;
private TopicSession subSession;
private TopicPublisher publisher;
private TopicConnection connection;
/* Constructor. Establish JMS publisher and subscriber */
public Chat() throws Exception {
// Obtain a JNDI connection
Properties env = new Properties();
// ... specify the JNDI properties specific to the vendor
InitialContext jndi = new InitialContext(env);
// Look up a JMS connection factory
TopicConnectionFactory conFactory =
(TopicConnectionFactory) jndi.lookup("TopicConnectionFactory");
// Create a JMS connection
TopicConnection connection =
conFactory.createTopicConnection();
// Create two JMS session objects
TopicSession pubSession =
connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
TopicSession subSession =
connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
// Look up a JMS topic
Topic chatTopic = (Topic) jndi.lookup("anytopic");
// Create a JMS publisher and subscriber
TopicPublisher publisher =
pubSession.createPublisher(chatTopic);
TopicSubscriber subscriber =
subSession.createSubscriber(chatTopic);
// Set a JMS message listener
subscriber.setMessageListener(this);
// Intialize the Chat application
set(connection, pubSession, subSession, publisher);
// Start the JMS connection; allows messages to be delivered
connection.start();
/* Initialize the instance variables */
public void set(TopicConnection con, TopicSession pubSess,
TopicSession subSess, TopicPublisher pub) {
this.connection = con;
this.pubSession = pubSess;
this.subSession = subSess;
this.publisher = pub;
/* Receive message from topic subscriber */
public void onMessage(Message message) {
try {
TextMessage textMessage = (TextMessage) message;
String text = textMessage.getText();
System.out.println(text);
} catch (JMSException jmse) {
jmse.printStackTrace();
/* Create and send message using topic publisher */
protected void writeMessage(String text) throws JMSException {
TextMessage message = pubSession.createTextMessage();
publisher.publish(message);
/* Close the JMS connection */
public void close() throws JMSException {
connection.close();
/* Run the Chat client */
public static void main(String[] args) {
try {
Chat chat = new Chat();
// Read from command line
BufferedReader commandLine = new
java.io.BufferedReader(new
InputStreamReader(System.in));
// Loop until the word "exit" is typed
while (true) {
String s = commandLine.readLine();
if (s.equalsIgnoreCase("exit")) {
chat.close(); // close down connection
System.exit(0); // exit program
} else {
chat.writeMessage(s);
} catch (Exception e) {
e.printStackTrace();
But at the line
�TopicConnectionFactory conFactory =
(TopicConnectionFactory) jndi.lookup("TopicConnectionFactory");�
I got this exception:
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:640)
     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
     at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
     at javax.naming.InitialContext.lookup(InitialContext.java:347)
     at chat.Chat.<init>(Chat.java:24)
     at chat.Chat.main(Chat.java:94)
I realize that the problem is in the jndi setup. But, the problem is that I do not know where to go now and what should I do. I do not know how can I get the jndi.properties file and where and how to put it.
Please, kindly advise from your experience. I would appreciate clear steps to have this program running properly. Otherwise, if you do have a sample program that is already running, please provide it to me.

Thank you for your prompt reply.
I tried another example.
package test;
javax.jms.*;
import javax.naming.*;
public class SimpleTopicPublisher { /** * Main method. * * @param args the topic used by the example and, * optionally, the number of messages to send */
public static void main(String[] args) {
String topicName = null;
Context jndiContext = null;
TopicConnectionFactory topicConnectionFactory = null;
TopicConnection topicConnection = null;
TopicSession topicSession = null;
Topic topic = null;
TopicPublisher topicPublisher = null;
TextMessage message = null;
final int NUM_MSGS;
// if ((args.length < 1) || (args.length > 2)) {
// System.out.println("Usage: java " + "SimpleTopicPublisher " + "[]");
// System.exit(1);
topicName = new String("MyTopic");
System.out.println("Topic name is " + topicName);
if (args.length == 2) {
NUM_MSGS = (new Integer(args[1])).intValue();
} else {
NUM_MSGS = 1;
/* * Create a JNDI API InitialContext object if none exists * yet. */
try {
jndiContext = new InitialContext
} catch (NamingException e) {
System.out.println("Could not create JNDI API " + "context: " +
e.toString());
e.printStackTrace();
System.exit(1);
/* * Look up connection factory and topic. If either does * not exist, exit. */
try {
topicConnectionFactory = (TopicConnectionFactory) jndiContext.
lookup("TopicConnectionFactory");
topic = (Topic) jndiContext.lookup(topicName);
} catch (NamingException e) {
System.out.println("JNDI API lookup failed: " + e.toString());
e.printStackTrace();
System.exit(1);
/* * Create connection. * Create session from connection; false means session is * not transacted. * Create publisher and text message. * Send messages, varying text slightly. * Finally, close connection. */
try {
topicConnection = topicConnectionFactory.createTopicConnection();
topicSession = topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
topicPublisher = topicSession.createPublisher(topic);
message = topicSession.createTextMessage();
for (int i = 0; i < NUM_MSGS; i++) {
message
.setText("This is message " + (i + 1));
System.out.println("Publishing message: " + message.getText());
topicPublisher.publish(message);
} catch (JMSException e) {
System.out.println("Exception occurred: " + e.toString());
} finally {
if (topicConnection != null) {
try {
topicConnection.close();
} catch (JMSException e) {}
It is mentioned in SUN JMS tutorial that "When you use the J2EE SDK 1.3.1, your JMS provider is the SDK. " So I am using that and I did the follwoing:
--start the J2EE server as follows:
j2ee -verbose
Then I created the adminstrated object:
j2eeadmin -addJmsDestination MyTopic topic
But still getting this 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
So now where is the error?
Thank you in advance

Similar Messages

  • Help with a simple program (asap please!)

    I'm writing a program that assumes a user will input 4 positive integers, and outputs them in order from smallest to largest. For example... when inputting 3,5,2,6 - the program will output 2,3,5,6. I've gotten the smallest and largest figured out, but I am having trouble getting the middle two. Oh, there's a catch, only if, switch, else. Here is what I've written so far:
    package chapter4homework;
    import javax.swing.JOptionPane;
    public class C4E8 {
         public static void main(String[] args) {
              String response = null;
              int response1 = 0;
              int response2 = 0;
              int response3 = 0;
              int response4 = 0;
              int tempdigit1 = 0;
              int tempdigit2 = 0;
              int     digit1 = 0;
              int digit2 = 0;
              int digit3 = 0;
              int digit4 = 0;
              response = JOptionPane.showInputDialog("Enter a positive integer:");
                   response1 = Integer.parseInt(response);
              response = JOptionPane.showInputDialog("Enter a second positive integer:");
                   response2 = Integer.parseInt(response);
              response = JOptionPane.showInputDialog("Enter a third positive integer:");
                   response3 = Integer.parseInt(response);
              response = JOptionPane.showInputDialog("Enter a third positive integer:");
                   response4 = Integer.parseInt(response);
              //Beginning of finding the highest positive integer
              if (response1>response2 & response1>response3 & response1>response4)
                   digit4 = response1;
              if (response2>response1 & response2>response3 & response2>response4)
                   digit4 = response2;
              if (response3>response1 & response3>response2 & response3>response4)
                   digit4 = response3;
              if (response4>response1 & response4>response2 & response4>response3)
                   digit4 = response4;
              //End of finding the highest positive integer
              //Beginning of finding the lowest positive integer
              if (response1<response2 & response1<response3 & response1<response4)
                   digit1 = response1;
              if (response2<response1 & response2<response3 & response2<response4)
                   digit1 = response2;
              if (response3<response1 & response3<response2 & response3<response4)
                   digit1 = response3;
              if (response4<response1 & response4<response2 & response4<response3)
                   digit1 = response4;
              //End of finding the lowest positive integer
              //Beginning of finding the second highest positive integer (no idea if this is right)
              if (response1>digit1 & response1<digit4)
                   tempdigit1=response1;
              if (response2>digit1 & response2<digit4)
                   tempdigit1=response2;
              if (response3>digit1 & response3<digit4)
                   tempdigit1=response3;
              if (response4>digit1 & response4<digit4)
                   tempdigit1=response4;
              if (response1>digit1 & response1<digit4)
                   tempdigit2=response1;
              if (response2>digit1 & response2<digit4)
                   tempdigit2=response2;
              if (response3>digit1 & response3<digit4)
                   tempdigit2=response3;
              if (response4>digit1 & response4<digit4)
                   tempdigit2=response4;
              if (tempdigit1<tempdigit2){
                   digit2=tempdigit1;
              System.out.println(digit1);
              System.out.println(digit2);
              System.out.println(digit3);
              System.out.println(digit4);
    }

    DeLorean wrote:
    Thank you for replying, unfortunately, I am in the second week of a basic programming class, and I have no idea what you mean by recursion, or how to apply it using these simple statements.Hmm, then maybe they're trying to get you to do it the simplistic but hard way, in order to show you the advantages of doing it the proper way...
    Regarding the bubble sort, think of it this way: You have four numbers, and you can sort them in three "passes"
    First pass: Starting from the fourth number, keep comparing to the previous number and swapping if it is smaller. By the end of this pass, the smallest number will have bubbled to the bottom. This will take three comparison/swap operations.
    Second pass: Again, starting from the fourth number, keep comparing to the previous number and swapping if it is smaller. You will stop after comparing the second and third number, because the first number will already hold the smallest number. This will take two comparison/swaps.
    Third pass: Same as before, just one less comparison/swap.
    And you're done.

  • Forms and Print program  Urgent please!!

    I have created a copy from a standard form (F150_dunn_01) and a print program (SAPLF150). Now, Could you tell me how can I know if the form is assigned to the program? or How to assign the program to the form?
    I mean, assign to the Zform and Zprogram
    Thanks and regards.

    Hi .
        There are two ways to find out the corresponding   
        print program for a sapscript form .
    they are ,
    1.go to the change editor of ur sapscript form in transaction se78 ,place ur cursor  at any of ur screen field and goto ->print program ->symbol definition with dialog .
    here u can find out the print program of ur corrsponding form.
    2.when u r in ur main screen of tansaction se78 ,goto
    form->check->texts.
    here u can find out the print program of ur corrsponding form.
    these r the two ways in finding out ur print programs of sapscript form.
    reg any doubt reply me .
    with regs,
    karthik srinivasan

  • Urgent please help, this program should work

    Urgent please help.
    I need to solve or I will be in big trouble.
    This program works at my home computer which is not networked.
    The hard disk was put onto another computer at another location whihc is networked. Here my program worked on Monday 14 october but since for the last two days it is not working without me changing any code. Why do I receive this error message???
    Error: 500
    Location: /myJSPs/jsp/portal-project2/processviewfiles_dir.jsp
    Internal Servlet Error:
    javax.servlet.ServletException
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
    at jsp.portal_0002dproject2.processviewfiles_dir_1._jspService(processviewfiles_dir_1.java:162)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
    at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
    at org.apache.tomcat.core.Handler.service(Handler.java:235)
    at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
    at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
    at java.lang.Thread.run(Thread.java:536)
    Root cause:
    java.lang.NullPointerException
    at jsp.portal_0002dproject2.processviewfiles_dir_1._jspService(processviewfiles_dir_1.java:132)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java)
    at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
    at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
    at org.apache.tomcat.core.Handler.service(Handler.java:235)
    at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
    at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
    at java.lang.Thread.run(Thread.java:536)

    foolishmatt,
    The code is quit large.
    to understand the program I think all the code needs to be examined.
    I would need to send to you in an email.
    Here is my e-mail
    [email protected]
    if you contact me than I can send the code to you.
    Thank you in advance.

  • Please help me with simple program

    Can someone please write a simple program for me that opens up a webpage in the center of the screen , with a set size, and then asks the user where they would like to click on the screen. Then once the person clicks it asks how many times they would like to click there, and then once they enter the # the program opens up the webpage (in the center at the same spot as before, with the same set size) and automatically clicks on the predesignated spot , and then closes all open internet windows, and keeps doing it for however many times the person chose. PLEASE HELP ME WITH THIS!!! If you could, please post the source code here. Thank you so much to whoever helps me!!!!!!!

    If it's not to learn, then what is the purpose of
    this project?well, if it's not HW and its not for learning java, then why the hell would anyone like to have a program that may open a webpage and then repeatedly click on predefined place...
    let me see...
    now if he had asked for program that fakes IP as well, then i would suggest that he tryes to generate unique clicks, but now... i'm not sure... maybe just voting in some polls or smthing... though, i would not create a program that clicks on the link or form element, but rather just reload url with given parameters for N times...

  • How to Run a simple program using JMS Queue.!!

    Hi All,
    I am trying to run simple program on JMS Queue.
    Using SOA Suite 10.1.3.2
    I created a connection factory and queue using EM.
    Connection Factory => Domain : Queue JNDI Location : jms/sidConnectionFactory
    Queue Name : SidQueue JNDI Location : jms/SidQueue
    Tried running a simple java class to send the messages to queue.[Pls find the file attached].
    Getting this error
    javax.naming.NamingException: META-INF/application-client.xml not found (see J2EE spec, application-client chapter for requirements and format of the file)
    at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getRequiredClasspathResource(ApplicationClientInitialContextFactory.java:239)
    at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getArchive(ApplicationClientInitialContextFactory.java:161)
    at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:111)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    Can some one tell me how i need to create this file and where to place this[i.e is this need to be placed in  my project or some directory structure of <SOA-HOME>
    Thx,
    Siddhardha.
    Code:
    package demo;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Properties;
    import javax.jms.*;
    import javax.naming.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class JMSQueue {
        public static void main(String args[])
    QueueConnection queueConnection;
    QueueSession queueSession;
    //private MessageProducer producer;
    QueueSender queueSender;
    try {          
    String message = "Test";
    String connectionFactoryName = "jms/sidConnectionFactory";
    String destinationName = "jms/SidQueue";
    /*Do i need to use this .......
    * If so where is the error in below statements...
    * Properties env = new Properties( );
    // ... specify the JNDI properties specific to the vendor
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome");
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.evermind.server.ApplicationClientInitialContextFactory");
    env.put(Context.PROVIDER_URL,
    "ormi://localhost:23791");
    Context ctx = new InitialContext();
    // Get the connection factory.
    QueueConnectionFactory cf = (QueueConnectionFactory)ctx.lookup(connectionFactoryName);
    // Get the destination.
    Queue destination = (Queue) ctx.lookup(destinationName);
    // Use the connection factory to create a connection.
    queueConnection = cf.createQueueConnection();
    // Start the connection.
    queueConnection.start();
    // Use the connection to create a session.
    queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    // Use the session and destination to create a message producer and a message consumer.
    //producer = queueSession.createProducer(destination);
    queueSender = queueSession.createSender(destination);
    TextMessage msg = queueSession.createTextMessage(message);
    queueSender.send(msg);
    queueSession.close();
    queueConnection.close();
    catch (Exception ex) {
    ex.printStackTrace();
    * Attached following libraries to the Project
    * jms.jar
    * optic.jar
    * oc4jclient.jar
    */

    Hi,
    You need to change the INITIAL_CONTEXT_FACTORY to com.evermind.server.RMIInitialContextFactory.
    Regards,
    Sandeep

  • Ideas For a Simple Program?

    I need some ideas for a simple program for a project in class. Can anyone help me?

    Import Classes
    import java.io.*;
    public class tictactoe
    Define Variables
    public static InputStreamReader ISR = new InputStreamReader(System.in);
    public static BufferedReader BFR = new BufferedReader(ISR);
    public static String BOX[][] = new String[3][3]; //Integer Arry for tictactoe box
    public static String PName; //Moving Player's Name
    public static String P1Name; //Player 1 Name
    public static String P2Name; //Player 2 Name
    public static String InputPLY; //X or O
    public static String InputStr; //Player's Input
    public static boolean BreakLoop; //Set this to true in PlayGame() to exit
    public static void main(String args[]) throws IOException
    InputPLY = "O";
    BreakLoop = false;
    ClearBOXCache();
    PrintCredits();
    System.out.println("");
    System.out.println("PLEASE ENTER PLAYER 1 NAME");
    P1Name = BFR.readLine();
    System.out.println("PLEASE ENTER PLAYER 2 NAME");
    P2Name = BFR.readLine();
    System.out.println("");
    System.out.print("\nWelcome ");
    System.out.print(P1Name);
    System.out.print(" and ");
    System.out.println(P2Name);
    System.out.println("");
    System.out.println(P1Name + " = X");
    System.out.println(P2Name + " = O");
    PlayGame();
    PrintCredits();
    BFR.readLine();
    System.exit(0);
    public static void DrawGrid()
    This function is to draw the tictactoe grid.
    System.out.println("");
    System.out.println("\t/-----------------------------\\");
    System.out.println("\t|-------- TIC TAC TOE --------|");
    System.out.println("\t|-----------------------------|");
    System.out.println("\t| | | |");
    System.out.println("\t| " + BOX[0][0] + " | " + BOX[0][1] + " | " + BOX[0][2] + " |");
    System.out.println("\t| | | |");
    System.out.println("\t|-----------------------------|");
    System.out.println("\t| | | |");
    System.out.println("\t| " + BOX[1][0] + " | " + BOX[1][1] + " | " + BOX[1][2] + " |");
    System.out.println("\t| | | |");
    System.out.println("\t|-----------------------------|");
    System.out.println("\t| | | |");
    System.out.println("\t| " + BOX[2][0] + " | " + BOX[2][1] + " | " + BOX[2][2] + " |");
    System.out.println("\t| | | |");
    System.out.println("\t\\-----------------------------/");
    public static void PrintCredits()
    This function is to print credits. Intended for startup and ending
    System.out.println("");
    System.out.println("");
    System.out.println("\t-------------------------------");
    System.out.println("\t--------- TIC TAC TOE ---------");
    System.out.println("\t-------------------------------");
    System.out.println("");
    System.out.println("\t-------------------------------");
    System.out.println("\t---- MADE BY WILLIAM CHAN! ----");
    System.out.println("\t-------------------------------");
    public static void ClearBOXCache()
    This function is to clear the BOX's cache.
    It is intended for restarting a game     
    BOX[0][0] = " ";
    BOX[0][1] = " ";
    BOX[0][2] = " ";
    BOX[1][0] = " ";
    BOX[1][1] = " ";
    BOX[1][2] = " ";
    BOX[2][0] = " ";
    BOX[2][1] = " ";
    BOX[2][2] = " ";
    public static void CheckWin(String PLYW) throws IOException
    This function is to check if a player wins
    for (int X = 0; X < 3; X++)
    if (BOX[X][0].equals(PLYW) && BOX[X][1].equals(PLYW) && BOX[X][2].equals(PLYW))
    PrintWin(PLYW);
    for (int Y = 0; Y < 3; Y++)
    if (BOX[0][Y].equals(PLYW) && BOX[1][Y].equals(PLYW) && BOX[2][Y].equals(PLYW))
    PrintWin(PLYW);
    if (BOX[0][0].equals(PLYW) && BOX[1][1].equals(PLYW) && BOX[2][2].equals(PLYW))
    PrintWin(PLYW);
    else if (BOX[0][2].equals(PLYW) && BOX[1][1].equals(PLYW) && BOX[2][0].equals(PLYW))
    PrintWin(PLYW);
    else if (!BOX[0][0].equals(" ") && !BOX[0][1].equals(" ") && !BOX[0][2].equals(" ") && !BOX[1][0].equals(" ") && !BOX[1][1].equals(" ") && !BOX[1][2].equals(" ") && !BOX[2][0].equals(" ") && !BOX[2][1].equals(" ") && !BOX[2][2].equals(" "))
    ClearBOXCache();
    System.out.println("Tie Game!");
    BFR.readLine();
    System.out.println("Game has restarted");
    public static void PrintWin(String PrintWinner) throws IOException
    This function is to print which player won
    if (PrintWinner.equals("X"))
    System.out.println(P1Name + " wins!");
    System.out.println(P2Name + " loses!");
    else if (PrintWinner.equals("O"))
    System.out.println(P2Name + " wins!");
    System.out.println(P1Name + " loses!");
    BFR.readLine();
    ClearBOXCache();
    System.out.println("Game has restarted!");
    public static void PrintInstruction(String PLYINSTR)
    This function is to give instruction to the player
    if (PLYINSTR.equals("X"))
    PName = (P1Name);
    else if (PLYINSTR.equals("O"))
    PName = (P2Name);
    System.out.println("");
    System.out.println(PName + ":");
    System.out.println("PLEASE MAKE YOUR MOVE");
    System.out.println("");
    System.out.println("TL = TOP LEFT BOX, TM = TOP MIDDLE BOX, TR = TOP RIGHT BOX");
    System.out.println("ML = MIDDLE LEFT BOX, MM = MIDDLE MIDDLE BOX, MR = MIDDLE RIGHT BOX");
    System.out.println("BL = BOTTOM LEFT BOX, BM = BOTTOM MIDDLE BOX, BR = BOTTOM RIGHT BOX");
    public static void PlayGame() throws IOException
    This function is the main game function.
    It calls other game functions.         
    Define Variables
    while(true)
    if (InputPLY.equals("O"))
    InputPLY = "X";
    else if (InputPLY.equals("X"))
    InputPLY = "O";
    while(true)
    PrintInstruction(InputPLY);
    InputStr = BFR.readLine(); //Player's move
    Check player's move
    if (InputStr.equals("TL"))
    if (BOX[0][0].equals(" "))
    BOX[0][0] = InputPLY;
    break;
    else if (InputStr.equals("TM"))
    if (BOX[0][1].equals(" "))
    BOX[0][1] = InputPLY;
    break;
    else if (InputStr.equals("TR"))
    if (BOX[0][2].equals(" "))
    BOX[0][2] = InputPLY;
    break;
    else if (InputStr.equals("ML"))
    if (BOX[1][0].equals(" "))
    BOX[1][0] = InputPLY;
    break;
    else if (InputStr.equals("MM"))
    if (BOX[1][1].equals(" "))
    BOX[1][1] = InputPLY;
    break;
    else if (InputStr.equals("MR"))
    if (BOX[1][2].equals(" "))
    BOX[1][2] = InputPLY;
    break;
    else if (InputStr.equals("BL"))
    if (BOX[2][0].equals(" "))
    BOX[2][0] = InputPLY;
    break;
    else if (InputStr.equals("BM"))
    if (BOX[2][1].equals(" "))
    BOX[2][1] = InputPLY;
    break;
    else if (InputStr.equals("BR"))
    if (BOX[2][2].equals(" "))
    BOX[2][2] = InputPLY;
    break;
    else if (InputStr.equals("RESTART"))
    ClearBOXCache();
    System.out.println("");
    System.out.println("GAME RESTARTED!");
    System.out.println("");
    break;
    else if (InputStr.equals("QUIT"))
    BreakLoop = true;
    break;
    if (BreakLoop == true)
    break;
    DrawGrid();
    CheckWin(InputPLY);
    }

  • Hi All,Please send me abap-hr material .Its urgent please.

    Hi All,Please send me abap-hr material .Its urgent please.

    These are the FAQ's that might helps you
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm
    http://www.sapgenie.com/sapfunc/index.htm
    http://www.sap-img.com/abap/sample-hr-reports-allocate-petrol-allowance.htm
    http://www.sap-img.com/hr021.htm
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sap-img.com/human/finding-the-list-of-hr-module-tables.htm
    additional info......
    Download the ABAP e-book for HR in the below link under the section 'Free ABAP eBook Download'
    http://www.sap-img.com
    Also have a look at the following links-
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    http://planetsap.com/index.htm
    http://www.atomhr.com/library_full.htm
    http://www.sap-basis-abap.com/saphr.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/60/d8d8c7576311d189270000e8322f96/frameset.htm
    http://www.sapfriends.com/sapstuff.html
    http://www.atomhr.com/know_preview/Reading_Payroll_Results_with_ABAP.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Payroll
    http://www.sap-press.com/product.cfm?account=&product=H967
    http://www.sapdevelopment.co.uk/hr/payres_abap.htm
    http://www.sapdevelopment.co.uk/hr/payres_tcode.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    you can see some Standard Program examples in this one..
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification

  • Port number from 7777 to 8080 - URGENT please

    dear all,
    i'm using Apex 2.2,
    i wanted to change port number from 7777 to 8080,
    due to Security Reasons, i have to change the port from 7777 to 8080
    in which File i need to do the Changes & what are the Steps to be Followes,
    http://10.33.20.6:7777/pls/apex1/apex
    i wanted to change the same to
    http://10.33.20.6:8080/pls/apex1/apex
    please Help me out in this,
    its is Very URGENT PLEASE
    Many thanks

    This is unlikely to be any help becaue your URL specified 'pls' in the path indicating that you are using mod_plsql, but but you might like to check that you are not inadvertently servicing your Apex instance with the embedded PL/SQL gateway.
    Check to see if you are using EPG with the simple sql :
    SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
    If value returned is 7777 then you appear to be using EPG.
    Change the port using EXEC DBMS_XDB.SETHTTPPORT(8080);
    And then navigate your http://10.33.20.6:8080/pls/apex
    As I said it's unlikely to be any help but wort checking all the same.

  • Even a simple program is not working ?

    Hi there,
    I typed a simple program to display the customer details. The program goes like this :
    import java.lang.*;
    public class Customer
         String custname;
         String custID;
    public Customer()
         custname = "Bob";
         custID = "S20010";
    public void displaydetails()
         System.out.println("Customer name is " + custname);
         System.out.println("Customer ID is " + custID);
    public static void main(String a[])
         Customer cust = new Customer();
         cust.displaydetails();
    The compilation went right. But, when I executed the program the following error message is displayed :
    c:\>java Customer.java
    Exception in thread "main" java.lang.NoClassDefFoundError: Customer/java.
    Please help !!

    Don't cross-post.
    http://forum.java.sun.com/thread.jspa?threadID=576890&messageID=2891064#2891064

  • Hi guys urgent please help me ASAP my ipod touch 4g reboots/restarts over and over again and i cant enter DFU mode cause my home button is stuck/broken please help guys i cant enter itunes too cause it said it needs my passcode

    hi guys urgent please help me ASAP my ipod touch 4g reboots/restarts over and over again and i cant enter DFU mode cause my home button is stuck/broken please help guys i cant enter itunes too cause it said it needs my passcode the problem is i cant even enter my passcode in my ipod touch cause its rebooting over and over again help please guys

    - See if this program will place it in recovery mode since that erases the iPod and bypasses the passocode.
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    - Next try letting the battery fully drain. The try again.

  • Why can't there be a simple program to setup remote file sharing?

    If someone wants to take a crack at getting my Time Capsule available remotely (off network over internet), I would appreciate it.
    I am a graphic designer and use the other side of my brain. DNS, static IP, MAC address etc is very confusing.
    I purchased a neat little app called Connect360 for Mac that automatically configures music/video sharing to Xbox360 from MacBook Pro. Evrything is automatic. Brilliant. If someone could do that to configure internet file sharing, it would be worth $$$$$$.
    Thanks

    You cannot do a simple program with the multiplicity of internet connections, modem type, ISP types, authentication types. Also you notice that Apple decided everything should now happen from the cloud, so cancelled the mobileme service which did offer easier setup for something that is far more limited, at least for now.
    Also please note there are fridge mechanics who fix fridges and car mechanics who fix cars. Photographers who make a living taking better photos than I can, and computer technicians who do network setups. If you don't fix your car or the washing machine.. why do you need to fix your internet networking?? Pay someone to do it.. but Steve said computers are easy and you got a false impression that everything should just plug together and work.. well it doesn't. Find a tame Computer tech and let him/her carry that part of your business. Spend your time doing what earns you money instead of in frustration at fixing the fridge. (Being symbolic of the computer network).
    It is rather like when I (a computer technician) dabble in graphic design.. I do, and you laugh at the results.. !!
    Please note I no longer work in that field because the pay is miserable, the customers ring up day and night and scream at you that the network is down and it is all your fault, and want you to spend an hour on the phone helping them. No service fee of course. You should on the basis of a single job, help connect their computer to the printer over the phone for an hour, rather than pay you a service call. Since computers are easy and you should just donate your time and life really to helping them do what Steve and Bill said was so easy.

  • Simple programming on mobile

    Hi,
    I just wonder if there are any applications for my symbian anna phone (C7) which will allow me to write simple programs, please.
    I would like to write a program that asks for user input (numbers) and outputs a result after applying a formula.
    I should note that I want to write the program on the mobile, and not on a computer and transfer to the device. It is rather important that I am able to edit portions of the program using the handset, without the need of a desktop computer.
    I found that it is possible to install a python shell on the phone (PyS60) but I don't know if that will allow me to do what I want.
    Another alternative is to write the program in javascript language, save and run in browser, but I feel it may be quite difficult to achieve it.
    Any thoughts?
    Do you have any experience in doing this?

    Try any type of drawing or painting application. You'll find many at VersionTracker or MacUpdate.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • 8.0 applicatio​n builder problem- very simple programs will not install on non LV machine

    Newbie at this...
    1.  Created a simple project (just math) in LV 8.0
    2.  Did the build
    3.  Built an installer but Deselected  RTE installer as I told my customer to download LV RTE 8.0
    4.  The installer put everything into a file folder called VOLUME... (?)
    5.  Copied VOLUME over to non LV machine that had LV 8.0 RTE downloaded and installed.
    6.  Ran ithe NI nstaller on non LV machine.  Ran Ok.
    7.  However,  no files were installed (checked the PROGRAMS directory).
    This is a REAL simple program.  Can anyone point me to some simple/stupid thing I did wrong?
    frustrated in San Diego....
    John

    John:
    Looking at all your steps, it seems like you are doing all the right things and in the right order too. Couple of things that you may try:
    1. Make sure that in your installer properties, you specify "ProgramsFileFolder" in the Source Files tab if you want your installer files to be  
        placed under "...\Programs\" (Please take a look at the attached screenshot)
    2. Try building an executable and make sure that you can run on the customer's computer (since it already has the LabVIEW Run Time Engine)
    Let me know what you find.
    Regards,
    Rudi N.
    Attachments:
    Installer.JPG ‏52 KB

  • JMS Client Program

    Hi,
    I'm trying to run my JMS Client program to post a message to XI JMS Queue.
    But I'm getting the following exception... java.lang.ClassCastException
    at QueueConnectionFactory.
    Also tried to catch the name of the returned class name...
    com.sap.engine.services.jndi.persistent.UnsatisfiedReferenceImpl
    Can anyone has an idea what could be the possible solution?
    Any help is highly appreciated.
    Here are the details...
    SAP_NAMING_PROVIDER_URL = localhost:50204 (50200 being J2EE port)
    SAP_INITIAL_CONTEXT_FACTORY_IMPL = "com.sap.engine.services.jndi.InitialContextFactoryImpl"
    QueueConnectionFactory queueConnectionFactory =(QueueConnectionFactory) jndiContext.lookup("jmsfactory/default/QueueConnectionFactory")
    Queue queue = (Queue) jndiContext.lookup(
                      "jmsqueues/default/MyTestQueue")
    Thanks and Regards,
    Vijay

    Hi Archana,
    The link isn't working and giving a message as..."Error: Session expired!"
    By the way my code is an extract of the one that is available at... <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/44/efec3341ad67d8e10000000a155369/frameset.htm">help.sap.com</a>
    If you think this is different to the one that you intend to send, can you please send me the correct one?
    Thanks and Regards,
    Vijay Kalyan

Maybe you are looking for