Java Threads compilation problem

Hi everyone,
I've having problems getting a simple thread program to compile, the programs says " ; " expected when there is already one present. I've gone through the program many times and still can't put my finger on whats going wrong. If someone could take a quick look and if possible tell me where I am going wrong.
Many Thanks
Its class ThreadA that will not compile
***code********************************************
public class ThreadA extends Thread
private int id;
public ThreadA(int i) (id = i);
public void run()
for (int i=0}; i < 10; i++);
try {sleep(1000};)catch (InterruptedException e)();
System.out.println("Output from Thread " + id);
import java.io.*;
public class TestThreads1
public static void main (String args [] )
Thread t1 = new ThreadA (1);
Thread t2 = new ThreadA (2);
Thread t3 = new ThreadA (3);
t1.start();
t2.start();
t3.start();
**code***********************************************************

public class ThreadA extends Thread
private int id;
public ThreadA(int i) (id = i); // <-- problem
public void run()
for (int i=0}; i < 10; i++); // <-- two problems
try {sleep(1000};)catch (InterruptedException e)(); // <-- more problems
System.out.println("Output from Thread " + id);
}

Similar Messages

  • Exception in thread "main" java.lang.Error: Unresolved compilation problem

    The following code:
         public boolean find(MusbachJ_Person person,BstNode node)
              //p.l(person);p.l(node.intData);
              if(node.intData.compareTo(person)==0)
                   return true;
              if( node.leftNode != null ) find(person,node.leftNode );
              if( node.rightNode != null ) find( person, node.rightNode);
              else
                   return false;
         }returns the following compilation error:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
         This method must return a result of type boolean
         at MusbachJ_TreeNode.find(MusbachJ_TreeNode.java:32)
         at MusbachJ_PeopleTree.main(MusbachJ_PeopleTree.java:91)
    But I don't understand, the else statement is right there, what more does it want? Thanks! :)

    John_Musbach wrote:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem: Unresolved compilation problem is an error that you'll only ever see if you're using an IDE. If you used the javac compiler, then you would have seen that the code doesn't even compile.
    The reason (as others have pointed out) is, that some paths through your method don't return a value.
    I'll re-write your code in the code-style that I usually use, because then it might be easier for you to see the problem:
    public boolean find(MusbachJ_Person person,BstNode node)
         if(node.intData.compareTo(person)==0) {
              return true;
         if( node.leftNode != null ) {
              find(person,node.leftNode );
         if( node.rightNode != null ) {
              find( person, node.rightNode);
         else {
              return false;
    }There are two prolbems. I'll spell out the first and let the other one for you to find:
    1.) you don't do anything with the return-values of the find-methods you are calling. What do you want to do with them?
    2.) What do you return if the current node is not the one that you want and you've got a right node?

  • Problems with java Thread

    I'm reading book "JAVA THREAD" published by OREILLY.
    And on fifth chapter, it gives an example.
    one Thread's two method:
    private boolean done = false;
    public void run()
    while(!done)
    foo();
    public void setDone()
    done = true;
    it says, the run method will be compiled as machine code:
    Begin method run
    load register r1 with memory location 0xff12345
    Label L1:
    Test if register r1 == 1
    If true branch to L2
    Call method foo
    Branch to L1
    Label L2:
    End method run
    setDone method will be compiled like:
    Begin method setDone
    Store 1 into memory location 0xff12345
    End method setDone
    And it says " because Run method will never reload 0xff12345 to register r1(in while loop), so setDone method will never lead to run stop.
    I'm so puzzled with this. I have test this code on windows platform, run method can stop after another Thread call setDone method !.
    but I think "JAVA THREAD" should have error on this, so why ?

    If the book says it will happen like that, then the book is wrong.
    I think what they meant--and what would be correct to say--is that that is an example of what could happen if you don't synchronize all access to the run variable.
    The point is this: Threads can have local copies of variables, that are separate from other threads' local copies and separate from the "master" copy. The spec doesn't define where those local copies live--the implementation can put them anywhere it wants--but the most natural and sensible thing would be to store the local copies in CPU registers, rather than in main mem.
    The example the book gave shows what might happen if that VM stores threads' local copies in registers. There's no guarantee that the problem they described will happen, but it could, so you have to guard against it.
    You guard against it by declaring that shared variable volatile, which requires that the threads use the master copy rather than their local copies, or by synchronizing every access to that thread. Syncing requires reading from the master copy on entering the sync block (or on first access) and writing out to the master copy upon leaving the sync block.

  • Java Threads Problem

    Hi, I am trying to write a simple java threads program where in one thread reads a file and another thread writes the data into a second file....
    Here is my code, although i think i am correct, my program still runs in a sequential fashion help help help!!!
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    class MyThread extends Thread{
    private int a;
    private int c;
    FileInputStream in;
    FileOutputStream out;
    public MyThread(int a){
    this.a = a;
    public void run(){
    if(this.a==5)
         try {
         in = new FileInputStream("Britney.txt");
    } catch (FileNotFoundException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    try {
         while((c=in.read())!=-1)
              a = (char) c;
              System.out.println(a);
    catch (IOException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
    if(this.a==10)
         try {
              out = new FileOutputStream("romi.txt");
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         for(int i = 0;i<50;i++)
              try {
                   System.out.println(c);
                   out.write(c);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    class MainMyThread{
    public static void main(String args[]){
    MyThread thr1, thr2;
    thr1 = new MyThread(5);
    thr2 = new MyThread(10);
    thr1.start();
    thr2.start();
    }

    Encephalopathic wrote:
    malcolmmc wrote:
    ... Chances of getting any kind of reply except "me too" can be pretty remote. ....there's actually a better chance of getting a reply on a general forum like this one, ....Can't you just post in both the narrow and the general forum, but include links one to the other in each thread? Or is that against the forum rules/etiquette? Most people here are ok with a crosspost IF those links are included.
    I would also ask that the OP designate one of those threads as the real discussion thread and just direct folks there from the other threads, so that we have one coherent discussion. If he does that, there's no problem with trying to reach out to as broad an audience as possible.
    I would figure that if the poster were upfront about what they are doing, folks wouldn't mind, but I could be wrong.I think that's generally the case. As long as the discussion is confined to one thread (and pointed there from the crossposts) or at the very least all the participants can see all the discussions, I think most people don't have a problem with it. It's when we waste our time answering when he's already got the answer elsewhere that's annoying.

  • A blocking problem of java thread.

    Hi!
    I would like to execute native thread concurrently in the Java Native Interface.
    When a Java thread called a native thread to use java native interface, Java thread is blocking for processing native thread.
    So, other java threads don't execute because they are blocking.
    Why do these problems occur at JVM(personal basis profile:CVM)?
    Regard.
    Message was edited by:
    peeppeep

    you need to explaing the problem more clearly, maybe post the code?

  • Java compiling problem, very important ??

    Hi,
    When I will compile my java code (see source) I get the following message
    java.lang.NullPointerException
    at table1.main(table1.java:95)
    The problem is in line 95 : values[k] = (String)vals.nextElement();
    What have I done wrong ?????
    When any one has a solution, thanks in advance
    regards, mkasel
    source:
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class table1 {
    public static String MY_SEARCHBASE = "l=ASA";
    public static String MY_FILTER = "cn=*";
    // Specify which attributes we are looking for
    public String MY_ATTRS[] = {"sn", "telephoneNumber","givenName"};
    Enumeration vals;
    Hashtable list= new Hashtable();
    public static void main (String args[]){
    try {
    // Binding
    // Hashtable for environmental information
    Hashtable env = new Hashtable();
    // Specify which class to use for our JNDI Provider
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    // Specify the host and port to use for directory service
    env.put(Context.PROVIDER_URL, "ldap://scd2ldap.mens.net:389/ou=ICN,o=MENS,c=FR ");
    DirContext ctx = new InitialDirContext(env);
    // Begin search
    // Specify the scope of the search
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the actual search
    // We give it a searchbase, a filter and the constraints
    // containing the scope of the search
    NamingEnumeration results =ctx.search(MY_SEARCHBASE, MY_FILTER, constraints);
    // Now step through the search results
    while ( results != null && results.hasMore() ) {
    SearchResult sr = (SearchResult) results.next();
    String dn = sr.getName() + "," + MY_SEARCHBASE;
    System.out.println (/*"Distinguished Name is " +dn*/);
    // Code for displaying attribute list
    Attributes ar = ctx.getAttributes(dn, MY_ATTRS);
    // Has no attributes
    if (ar == null) {
    System.out.println(" Entry "+ dn );
    System.out.println(" has none of the specified attributes\n");
    } else {
    // Has some attributes
    // Determine the attributes in this record.
    Hashtable elements=new Hashtable();
    for (int i=0; i<MY_ATTRS.length; i++) {
    Attribute attr = ar.get(MY_ATTRS<i>);
    if (attr != null) {
    vals=attr.getAll();
    String[]values=null;
    int k=0;
    while(vals.hasMoreElements()) {
    values[k] = (String)vals.nextElement();
    k++;
    elements.put(MY_ATTRS<i>,values);
    list.put(dn,elements);
    // End search
    // end try
    catch(Exception e) {
    e.printStackTrace();
    System.exit(1);
    P.S. IMPORTANT <> means []

    Hi again,
    I didn't understand you well, could you tell me what I
    have to change in the code to solve the problem
    Thanks,
    mkasel
    Well it is very simple
    String[]values=null;
    you have a pointer that can point to a string array but currently is pointing to null
    values[k] = (String)vals.nextElement();
    Now you try to access the String array but it doesn't point to an array of strings but to null that's why you get a java.lang.NullPointerException.
    You first have to let the pointer point to an array for example by creating a new String array like:
    values = new String[100];
    in your case the best thing to do is get the amount of elements you have in your enumeration and use that instead of 100

  • Java Reflection API problem... Please HELP!

    Hi,
    I'm writing a Client-Server program set where the Server class receives a Java file, along with some parameters, from the Client class/computer.
    The Server class then invokes a certain method from the Java file it received (depending on the parameters received).
    My Server program keeps giving me a ClassNotFoundException, and I'm going crazy.. I've been trying to fix it for a long time now... but with no avail.
    Here's the Server program.. but I doubt you need to read it all. Please just scroll down to "// The line below is what give me problems:".
    package remoterun;
    import java.net.*;
    import java.io.*;
    import java.lang.reflect.*;
    * <p>Copyright: Copyright ms2000 (c) 2005</p>
    public class Server2 {
        public static void main(String args[]) throws Exception {
            int numParameters;
            int port = 6789;
            boolean isThere = false;
            String className, methodName;
            Object[] parameters;
            ServerSocket welcomeSocket = new ServerSocket(port);
            for (; ; ) {
                 * Create a new socket, called connectionSocket, when some client knocks
                 * on welcomeSocket. This socket has the same port number. TCP then
                 * establishes a direct virtual pipe between the client socket and
                 * connectionSocket at the server so the client and server can send bytes
                 * to each other over it.
                Socket connectionSocket = welcomeSocket.accept();
                // Get number of parameters
                DataInputStream in = new DataInputStream(new BufferedInputStream(
                        connectionSocket.getInputStream()));
                numParameters = in.readInt();
    // Get the parameters for the method to be invoked.
                parameters = new Object[numParameters];
                ObjectInputStream objStream = new ObjectInputStream(
                        connectionSocket.getInputStream());
                for (int i = 0; i < numParameters; i++) {
                    parameters[i] = objStream.readObject();
                // read the class
                File program = (File) objStream.readObject();
                System.err.println(program); // It prints the program name correctly, e.g. Class2.java
    // Receiving some String parameters...
                            BufferedReader inFromClient = new BufferedReader(new
                        InputStreamReader(connectionSocket.getInputStream()));
                className = inFromClient.readLine();
                methodName = inFromClient.readLine();
                // The line below is what give me problems:
                Class classDefinition = Class.forName("remoterun." + className + ".java");
                Object object = classDefinition.newInstance();
                Method[] theMethods = classDefinition.getMethods();
                for (int i = 0; (i < theMethods.length) && (!isThere); i++) {
                    if (theMethods.getName().equals(methodName)) {
    isThere = true;
    theMethods[i].invoke(object, parameters);
    The Client code just sends the stuff to the Server, and it works fine. The code is below if it may help:
    package remoterun;
    import java.net.*;
    import java.io.*;
    public class Client2 {
        public static void main(String[] args) throws Exception {
            int result;
            int port = 6789;
            int num1 = 5;
            int num2 = 6;
            int numParameters = 3;
            String hostIP = "127.0.0.1";
            String className = "Class2";
            String methodName = "add";
            Object[] parameters;
            Socket clientSocket = new Socket(InetAddress.getByName(hostIP),
                                             port);
            // Send numParameters, className, methodName
            DataOutputStream out = new DataOutputStream(new BufferedOutputStream(
                    clientSocket.getOutputStream()));
            out.writeInt(numParameters);
            out.flush();
            Integer num3 = new Integer(num1);
            Integer num4 = new Integer(num2);
            parameters = new Object[] {num3, num4, InetAddress.getLocalHost()};
            File program = new File((className + ".java"));
            ObjectOutputStream output = new ObjectOutputStream(clientSocket.
                    getOutputStream());
            for (int i = 0; i < numParameters; i++) {
                output.writeObject(parameters);
    output.writeObject(program);
    output.flush();
    DataOutputStream outToServer = new DataOutputStream(clientSocket.
    getOutputStream());
    outToServer.writeBytes(className + '\n');
    outToServer.writeBytes(methodName + '\n');
    outToServer.flush();
    clientSocket.close();
    The error I get from the Server class is:
    java.lang.ClassNotFoundException: remoterun.Class2.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at remoterun.Server2.main(Server2.java:94)
    Exception in thread "main"
    (I also get a dialog box saying sthg like, "A fatal exception occured.. will exit now".)
    It's really odd, becuase there were rare times when it works although I don't change the program...
    I tried changing the problem line to stuff like:
                Class classDefinition = Class.forName(className + ".java");or
       Class classDefinition = Class.forName(className);but with no use. Same error. Can someone please pinpoint the problem?
    I'm sure the program does get to the Server, because it can print out the file name.
    PS: Sometimes it works when I use the same PC as the client/server, sometimes it doesn't.... Help :-(
    I'd appreciate some assistance in this.
    Thank you.

    What's this dot-java stuff? Are you sending a source file? If so, that isn't going to work. You need to compile the file and send the dot-class file.
    I'll try that. However, can I make the Client program complie the .java file? For example. something like Class2.compile()? Is this feature available, or do I have to open Class2.java and compile it from there?
    And in the server you need to either store that somewhere in the server's classpath....
    Isn't it automatically stored there? If not, how do I make it stored in the same file as the Server source file (I assume that's what you mean by classpath)?
    Thanks for your help... !!!

  • Unresolve compilation problems

    I have narrowed a bug down to three lines of code. I do not see what is wrong with this code. In fact I am so sure of the code I was wondering if it may be a bug in 1.5
    I get the error:
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         Syntax error, insert "AssignmentOperator Expression" to complete Assignment
         Syntax error, insert ";" to complete Statement
         LVN cannot be resolved
         foo cannot be resolved
         e cannot be resolved
    on the the last line of :
    if (useLVN)
             for(Enumeration e = ilocGen.getRoutines().elements(); e.hasMoreElements();)
                  LVN foo = new LVN((BasicBlock) e.nextElement());LVN is a class who's constructor takes a BasicBlock as an argument. iloc.getRoutines() returns a vector and useLVN is a boolean that is set earlier in the program. The program was fully functional until I inserted these three lines. if I replace the body of the for loop with ";" the code will still execute.
    Has anyone seen this kind of error before? Can someone clue me into what I am doing wrong? or is this something that should be taken to a bug report of some kind?

    I recreated the issue. The error appears in the last line of source code. Below is the full source code for all of the classes. As a note I am using jre1.5.0_06 and eclipse 3.2.1 as my IDE. The operating system I am currently using is Windows XP Pro. (Obviously not that it should matter based on the language in question.)
    File:
    BasicBlock.java
    public class BasicBlock {
         public String str;
         public BasicBlock(String in){
              str = in;
    IlocGenerator.java
    import java.util.Vector;
    public class IlocGenerator {
          Vector routines = new Vector();
          public Vector getRoutines() {
                  return routines;
          public void addRoutine(IlocRoutine in){
              routines.add(in);
    LVN.java
    public class LVN {
         public LVN(BasicBlock in){
              System.out.println(in.str);
    IlocRoutine.java
    import java.util.*;
    public class IlocRoutine {
         private Vector Blocks;
         public IlocRoutine(){
              Blocks = new Vector();
         public void addBasicBlock(BasicBlock in){
              Blocks.add(in);          
         public Vector getBasicBlocks() {
             return Blocks;
    MainProg.java
    import java.util.Enumeration;
    public class MainProg {
         public static void main(String[] args) {
              boolean useLVN = true;
              IlocGenerator ilocGen = new IlocGenerator();
              IlocRoutine iR = new IlocRoutine();
              BasicBlock bB = new BasicBlock("one");
              iR.addBasicBlock(bB);
              bB = new BasicBlock("two");
              iR.addBasicBlock(bB);
              ilocGen.addRoutine(iR);
              iR = new IlocRoutine();
              bB = new BasicBlock("three");
              iR.addBasicBlock(bB);
              bB = new BasicBlock("four");
              iR.addBasicBlock(bB);
              ilocGen.addRoutine(iR);
             if (useLVN)
                  for(Enumeration e = ilocGen.getRoutines().elements(); e.hasMoreElements();)
                       for (Enumeration f = ((IlocRoutine) e.nextElement()).getBasicBlocks().elements(); f.hasMoreElements();)
                            LVN foo = new LVN((BasicBlock) f.nextElement());
    }Message was edited by:
    mtu9000 (added environment information)

  • JSP Compilation Problems With JSTL tags

    My JSP worked well when I used JSP expressions, scriptlets, .... I tried to use JSTL instead and encountered some compilation problems. I am unable to see my mistakes and need help:
    Problme #1:
    int offset = 0;
    try
       <c:set var="offset" value="${requestScope.offset}" />
    catch ( Exception e )
        // do nothing
    }The above code has two compilation errors:
    Generated servlet error:
    [javac] Compiling 1 source file
    illegal start of expression
    <c:set var="offset" value="${requestScope.offset}" />
    ^
    Generated servlet error:
    ';' expected
    <c:set var="offset" value="${requestScope.offset}" />
    ^
    Problem #2:
    <c:set var="threadBean" value="${requestScope.ThreadBean}" />
    int threadID_int = ParamUtil.getParameterInt( request, "thread" );
    <c:if test="${threadBean.threadID} != threadID_int">
        throw new AssertionException( "The two threadID are not the same." );
    </c:if>Generated servlet error:
    illegal start of expression
    <c:if test="${threadBean.threadID != threadID_int}">
    ^

    I have deleted the Java code around the JSTL tags. Now, what is wrong with this <c:if test=" ... "> tag? It seems that I have problems to get JSTL tags right.
    It seems that I have problems to get JSTL tags right....
    <c:if test="${attachBean.attachMimeType.startsWith('image/')}">
         <html:img page="getattachment?attach=<c:out value='${attachBean.attachID}' />" alt="<c:out value='${attachBean.attachFilename}' />" title="<c:out value='${attachBean.attachFilename}' />" border="0" />
    </c:if>error message:
    74: tag = 'if' / attribute = 'test': An error occurred while parsing custom action attribute "test" with value "${attachBean.attachMimeType.startsWith('image/')}": Encountered "(", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||"]

  • IRC compilation problem

    import org.jibble.pircbot.*;
    import com.sun.speech.freetts.*;
    import com.sun.speech.freetts.audio.*;
    import javax.sound.sampled.*;
    import java.io.File;
    public class SpeechBot extends PircBot {
        private Voice voice;
        public SpeechBot(String name) {
            setName(name);
            // Choose the voice for the speech synthesizer.
            String voiceName = "kevin16";
            VoiceManager voiceManager =
    VoiceManager.getInstance();
            voice = voiceManager.getVoice(voiceName);
            if (voice == null) {
                System.out.println("Voice not found.");
                System.exit(1);
            voice.allocate();
            // Set up the output format.
            AudioPlayer voicePlayer = new JavaClipAudioPlayer();
            voicePlayer.setAudioFormat(new AudioFormat(8000,
    16, 1, false, true));
            voice.setAudioPlayer(voicePlayer);
        public void onMessage(String channel, String sender,
    String login, String hostname, String message) {
            // Send all IRC messages to the voice
    synthesizer.
            message = message.trim();
            String input = sender + " on " + channel + "
    says: " + message;
            voice.speak(input);
        public static void main(String[] args) throws
    Exception {
            if (args.length < 2) {
                System.out.println("Usage: java SpeechBot
    <server> <channel>");
                System.exit(1);
            SpeechBot bot = new SpeechBot("SpeechBot");
            bot.connect(args[0]);
            bot.joinChannel(args[1]);
    }This is my code,i have downloaded all the jar files needed for it,but its not getting compiled
    please tell me the correct statement of the compilation.......

    In your last thread (which you crossposted around) I told you that you need to spend some time with the networking tutorials. Perhaps you really need to spend time with the basic Java tutorials instead?
    There are a bunch of problems with this post anyway like
    1) It doesn't belong in this forum, but most likely New to Java or Java Programming. Simple compilation problems go into those forums.
    2) You didn't provide the most important information anyway. The statement "its not getting compiled" tells us nothing. It's totally useless.
    3) Posting about problems with third-party libaries as you are here is also discouraged. You should ask the people/person who wrote the class for help
    But again, based on both this and your previous thread, it seems pretty clear to me that you are attempting to bite off far more than you can know chew. If you are student trying to learn, again I urge you to stop and spend a good amount of time with the basic Java tutorials. Learn how basic Java code is structured and how to solve simple classpath and syntax compilation errors. If you are employed then you got this job by lying so my advice to you would be to quit. You're at least 6 months away from being safe to let work on any code.

  • Java Threads not being released after loggin off

    Hello everyone,
    We are seeing a weird problem in our PI 7.0 box.
    Once I logout from the XI box (both ABAP and Java stck) my basis tem still sees Java threads aginst my id still open. Our system does not seem to be realeasing Java threads.
    Is this a know problem? What are the remidition steps.

    Hi,
    Are there existing HTTP sessions only?
    The following might be helpful.
    http://help.sap.com/saphelp_nw73/helpdata/en/c7/5ee440ba994fa3b187ff2f050cfe7c/content.htm
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/Sessionnotendingafterlogoff
    Regards,
    Varun

  • Java threads monitoring

    I am using Java threads in my Java program, running on Windows Professional 2000. I am monitoring the threads using Windows Performance Monitor (WPM). However, even running a small Java program which creates only 2 threads, results in many (at least 10) instances of Java threads being reported by the WPM. Problem is, in WPM, there is no way to determine which threads in the WPM are the threads that I programmatically created. Any ideas on how to determine this?
    Thanks.
    Rhodie

    Hi Dmirty ,
    To handle large asynchronous message   in queues you can use  message packaging where multiple message are processed in one package . to make it applicable you have to perform these simple steps
    1. go to SXMB_ADM add one RUNTIME parameter PACKAGING and value 1
    2 GO TO transaction SXMS_BCONF set delay time 0 message count 100 messages and package size 1000 KB
    with these setting your improvement will increase .secondly also put  IN SXMB_ADM monitor category parameter QRFC_RESTART_ALLOWED TO 1
    this will automatically start your queue . Only thing you have to take care if you enable packaging them don't keep too many parallel queue i.e EO_INBOUND_PARALLEL and EO_OUTBOUND_PARALLEL should be less than 20
    Regards,
    Saurabh

  • Java thread not working in windows 7

    I have a Java app that runs just fine on Windows XP. However, on Windows 7 there is a problem related to a job being done via a Java thread.
    Background: The app spawns a separate job via a Java thread and continues on while the spawned job executes. In other words, 2 things happen at once.
    Problem: On Windows 7, when the app spawns the job, Windows sits and waits for the spawned job to complete before it continues on. In other words, 2 things DO NOT happen at once.
    It's as if Java threading does not work in Windows 7. Any input would be greatly appreciated. Thanks.

    l_sleven wrote:
    Thanks for the input, guys. From now on I'll be sure to include a SSCCE.
    I'm beginning to believe this is actually my ignorance of threading in SWT, and XP was more forgiving than 7.
    I would include a SSCCE, but of the 4 different ways I tried to get this to work I wouldn't know which to include since all failed to fix the problem.
    If you want to identify a link to a web page identifying 'best practices' for SWT threading, that would be great. Be aware though that there's a good chance I've already googled the page.
    A programmer smarter than me once said, "The road to best practices is a bumpy ride".[Concurrency in Swing|http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html]

  • Compilation problem in a JSP page

    Hi all,
    I'm trying to write a jsp page and some java stuff in it.
    It goes something like this -
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1255"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1255"/>
        <title>Michael</title>
      </head>
      <body>
    <%
              String strError="";
    %>
    </body>Now the problem is that I get compilation problem about the use in java -
    "String cannot be resolved to a type"
    I know for sure that in other computers it's work, the question is what I'm missing?
    I have Java VM installed and I've downloaded and installed the latest JDK, what else?
    thanks,
    Michael.

    Michael4488 wrote:
    BalusC wrote:
    Then you should be using JSTL/EL.I don't familiar with this technology, any way - Its work on one computer so in my understanding it should work on the other as well.It is not related to the actual problem. It was just a comment on your code. Using scriptlets is considered as bad practice.
    I understand that of course, but I don't use any configuration file or set any special parameters in my computer.
    What exactly does the compiler need in order to recognize the Java code in the JSP page? If i manually add the JAVA_HOME environment variable it will work?
    where should I refer it to? "..\Java\jre1.6.0_07\lib" will do?It must point to the root installation directory of the JDK (thus not the JRE!).

  • I want to execute other java thread in the JNI.

    Hi!
    I would like to execute other java native thread concurrently in the Java Native Interface.
    When a Java thread called a native thread to use java native interface, Java thread is blocking for processing native thread.
    So, other java threads don't execute because they are blocking.
    Why do these problems occur at JVM(personal basis profile:CVM)?
    I hope you explain this reason in detail.
    Regard.
    Message was edited by:
    peeppeep

    Cross post
    http://forum.java.sun.com/thread.jspa?threadID=786857&messageID=4471999#4471999

Maybe you are looking for

  • How do you erase email from "trash" folder???

    Is there some way to erase email from the "trash" folder beside having to delete each one singularly.  That means to get rid of email you have do each one TWICE.  On my I touch there is a button to erase all at once.  Not on PALM that I can find. Pos

  • HT4972 I updated to my iPad and now my apps won't open. What can I do?

    I updated my iPad operating system and now my apps won't open. How can I fix this?

  • Config file from tftp at startup (6509 with Sup720)

    Hi together I will download the config file for my 6509 with Sup720 from a TFTP Server. I have configerd the GigabitEthernet 5/2, so I can ping the tftp-server. Also I'm able to down&upload files to the tftp-server. The configuration looks like: host

  • 10046 trace event - Missing privileges

    Hi, Version 11201 Please advice what privileges are missing : SQL> ALTER SESSION SET events '10046 trace name context forever, level 12'; ERROR: ORA-01031: insufficient privileges Thanks

  • PDFSaveOptions - can't control file size

    I am trying to automate the saving of all my layers as PDFs.  Yet, I am getting different results when I try to automate the saving process.  For example, I can save a file manually using "SaveAs..." in the menu, then setting my options using the tab