Running a GUI program with no X?

Hi,
I want to run a GUI program on my server, which has no X installed. Of course, the program would normally not run since it needs X (GUI only). I don't really need to be directly using this software, it just needs to run. Anybody here knows if there is any way to fool it into thinking X is there, so it'll still run on my server, preferably as a service in the background?
PS
I probably need the same thing for sound too, no alsa or pulse either.
Any  help's appriciated.

I probably owe you guys an explanetion: The program in question is Skype. I'm sick and tierd of having skype steal recources when all my other IMing is done in bitlbee. That's why I came up with the following solution: I've done some reading, and turns out skype has a bitlbee plugin.
However, that plugin uses the skype API which means I can't get around having skype. So, I decided to try the following setup: Run a bitlbee server from my home server. Have skype sorta just run in there doing nothing, and use the bitlebee plugin so I can connect with my own computer and use skype with bitlbee (Note: this is so I can chat with friends, not so I can video / audio chat so I don't care about those features). Basicly that was my idea and i'm exploring the posibility. Skype sadly has no deamon mode, but it does offer a shell pipe login so I'll start skype in my server, and do that setup. Of course now that I see i'll need to install x no matter what i'm not sure if it's worth it. I don't need X on my server for any other purpuse and X will steal recources from my server. I do however love not needing a skype client nativly. Anyone has any experiance / ideas / advice about my idea?
Stalafin wrote:
Greenstuff wrote:
Hi,
I want to run a GUI program on my server, which has no X installed. Of course, the program would normally not run since it needs X (GUI only). I don't really need to be directly using this software, it just needs to run. Anybody here knows if there is any way to fool it into thinking X is there, so it'll still run on my server, preferably as a service in the background?
PS
I probably need the same thing for sound too, no alsa or pulse either.
Any  help's appriciated.
Wut? You want to output sound without anything that is able to output sound? Is it me or is that just plain weird....? o.O
I realize it sounds comfusing but Skype needs somewhere to dump sound apperantly (I found that out on my resharch). So I need a way to fool it into thinking there's such a device.
Last edited by Greenstuff (2009-11-03 21:24:29)

Similar Messages

  • How can i run my java program with out java language

    Hai to every one ..Iam new to java language ...am using windows xp operating system , i did not installed java language in my system .. how can i run a java program with out installing java language... Which files is requied to run java program..?
    any one can help me??

    Hai to every one ..Iam new to java language ...am
    using windows xp operating system , i did not
    installed java language in my system .. how can i run
    a java program with out installing java language...
    you ... can ... not ... do ... this
    Which files is requied to run java program..?
    any one can help me??a JVM. Download it from sun's website.
    [url http://java.sun.com/javase/downloads/index.jsp]Download JavaSE here

  • Progblems Running a C program with JNI on Linux

    Hi
    We are having a problem running a C program which uses JNI to start a virtual machine.
    We can compile it up ok and it finds all the correct libraries and everything is fine as far as we are aware but when we try to run the program the error we get is "command not found". Now when the same programm is compiled with out JNI stuff, so basically no java at all it compiles and runs ok.
    I was wondering if anyone else has had similar problems we are using sun jdk 1.3.1 and RedHat Linux 7.2.
    Thanks
    Iain

    Hi
    We are having a problem running a C program which uses
    JNI to start a virtual machine.
    We can compile it up ok and it finds all the correct
    libraries and everything is fine as far as we are
    aware but when we try to run the program the error we
    get is "command not found". Now when the same
    programm is compiled with out JNI stuff, so basically
    no java at all it compiles and runs ok.
    I was wondering if anyone else has had similar
    problems we are using sun jdk 1.3.1 and RedHat Linux
    7.2.
    Thanks
    IainHi !
    I think I had the same problem. But fortunately I found the solution.
    I tried to compile and run the standard sun example of invocation interface. My C file is main.c.
    Compilation:
    cc -I/usr/java/jdk1.3.1/include/linux -L/usr/java/jdk1.3.1/jre/lib/i386/classic/ -L/usr/java/jdk1.3.1/jre/lib/i386/native_threads/ -lpthread -lhpi -ljvm main.c
    after then You must create the environment variable LD_LIBRARY_PATH and point out Your JNI libraries location. That works with mine.
    LD_LIBRARY_PATH=/usr/java/jdk1.3.1/jre/lib/i386:/usr/java/jdk1.3.1/jre/lib/i386/native_threads:/usr/java/jdk1.3.1/jre/lib/i386/classic;export LD_LIBRARY_PATH
    Now it should work.

  • Why can't I run my Java program with just the JRE, the JDK is required?

    I've recently written 3 programs in Java using the Netbeans IDE with JDK 1.6 as the default Java platform. The compile-time libraries include the Swing Application Framework. I use BuildDesk from ProductiveMe to package the each program into a Windows installer.
    When I install the programs on a new computer without a JRE or JDK being present, and attempt to run them I get an error (as expected) stating that there is no JVM. The messages says that I need to install JDK 1.3 or higher. I downloaded the latest JRE onto the new computer and attempted to run the programs and I get the same error message. My question is, why can't I run these programs with just the JRE installed? Why do I need the JDK? When I install the JDK, the programs run fine. The typical user may not have the JDK on their system, but they likely have the JRE if they've run Java programs before.
    Is the answer as simple as there must be library functions being used by the programs that belong to the JDK, but not the JRE? I'd rather a user not have to install the JDK verses the JRE because they may also have to update some Windows environment variables.
    Thank you for any help on this issue.

    915088 wrote:
    Thanks for your replies. I further investigated BuildDesk and found an option which allows a JVM check but that check needs the JDK. I stopped the JVM check and rebuilt using BuildDesk and it now only requires the JRE to run the programs. The reason why I use BuildDesk is to package more than just the jar file for the user. BuildDesk allows me to create a installation folder structure as well as include any other files in the build. I could just as well zipped all this together for the user but decided against that method.I don't think anyone will question your usage of an installer tool; that is entirely up to you. But what is questionable is that you have problems with that installer tool and then go look for help in a Java programming forum. The next time, go look for help at the source. If there is no way to acquire help (support, a forum, a mailinglist, anything) then that is a very good reason to not use the product in question.

  • Running a java program with eclipse

    Hi,
    I'm trying to run this java program(below) in eclipse..when i go to the 'run' icon inorder to choose the option 'run as' then 'java application' , i have 'none applicable' as the only option available. is it possibly because the program uses threads?
    could someone using eclipse please try to execute this program and let me know if you succeed and how exactly you do it.
    package reseaux;
    import java.io.*;
    import java.net.*;
    import java.util.*;
         public class LeServeur extends Thread{
         Socket socket;
         BufferedReader in;
         PrintWriter out;
         Vector FlowList=new Vector(10);
         public LeServeur(Socket socket)throws IOException{
              this.socket=socket;
              in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
              out= new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
         public void run(){
              String s;
              synchronized(FlowList){
                   FlowList.addElement(this);
              try{
                   while(!(s = in.readLine()).equalsIgnoreCase("/quit")){
                        for(int i=0;i<FlowList.size();i++){
                             synchronized(FlowList){
                                  LeServeur monServeur=(LeServeur)FlowList.elementAt(i);
                                  monServeur.out.println(s + "\r");
                                  monServeur.out.flush();
              catch(IOException e){
                   e.printStackTrace();
         finally {
         try {
              in.close();
              out.close();
              socket.close();
         } catch(IOException ioe) {
         } finally {
              synchronized(FlowList) {
              FlowList.removeElement(this);
    thanks

    thanks...
    Infact, i wanted to run the main program called 'Serveur' but it uses 'LeServeur'( the code i sent before') and apparently it gives me an error msg that it doesnot recognise the 'LeServeur'...that's why i was thinking that i should probably first compile the 'LeServeur' so that it can be recognised in the 'Serveur' program.
    here is the 'Serveur' code that uses an instantiation of the LeServeur...
    package reseaux;
    import java.net.*;
    import java.io.*;
    public class Serveur {
              public int port;
              public ServerSocket skt;
              public Socket socket;
         public static void main(String[] args) {
              int port=8975;
              ServerSocket skt=null;
              Socket socket=null;
              try{
                   if(args.length>0)
                        port=Integer.parseInt(args[0]);
              catch(NumberFormatException n){
                   System.out.println("This port is used uniquely for listening");
                   System.exit(0);
              try{
                   skt= new ServerSocket(port);
              while (true){
                   socket =skt.accept();
                   LeServeur flow=new LeServeur();
                   flow.start();
         catch(IOException e){
              e.printStackTrace();
         finally{
              try{
                   skt.close();
              catch(IOException e){
                   e.printStackTrace();
    do you know have any idea why it doesnt recognise the 'LeServeur'?
    ps:they're in the same package
    thanks

  • GUI Programming with ABAP - Chapter 9

    I am working my way through the ABAP Objects  (Keller/Krueger) book, doing all the exercises, re-entering all the programs for learning purposes.  I get to Chapter 9, and the package I am working with has moved form Z_ABAP_BOOK to SABAPDEMOS.  There are examples there, but when I try to edit any of them, I get a "Register Object" dialog box, asking me for an Access Key for the Demosystem installation.  Where do I find this key?  Is this the SAP License key, or something else?

    Marcelo,
    Copy the program.  Of course.  I really appreciate someone trying to answer the question, and since you started, I hope you can help me until it is finished.
    Now, how exactly do I do that?  Copy the program?  And when I say 'exactly', I really, really mean specific.  Because, the only work I have ever done with SAP/ABAP is with the book and the downloaded software.  I have not worked with different 'packages'.
    Please, step by step.  Baby steps.
    Here's what I tried and what doesn't work.  I tried to right-click the program DEMO_DYNPRO in the SABAPDEMOS package.  One of the options is 'Copy'.  That brings up a dialog box, but looks as if it only copies the program within the same package.  If I try to go further, by making a unique 'to' program name, it asks me for the access key.  Same as my first problem.
    If I rightclick on the DEMO_DYNPRO program and go down to the 'Other Functions', there is 'Change Package Assignment' option.  This sounds hopeful, so I tried it.  I get a dialog box that says 'Reassign Object DEMO_DYNPRO'.  in the New Package field, I choose Z_ABAP_BOOK.  The error I get is 'Package in non-original system only modifiable with Organizer tools'. 
    I pull up the Long Text, and it tells me to use the Transport Organizer Tools.  Lucky for me, that message can be clicked and it actually OPENS the Transport Organizer Tools.  The message in the long text tells me to looks SPECIFICALLY for 'Change object directory entries of objects'.  There is no option with that SPECIFIC title.
    There is a 'Change Object Directory Entries' and a 'Change Object Directory Entries of Objects IN A REQUEST'.
    I tried the first one.  In the next screen that appears, I put DEMO_DYNPRO in the Program field, and put SABAPDEMOS both FROM and TO under Further Restrictions / Package and pressed F8 (execute).  This shows the entries in the SABAPDEMOS Package.  I can find the DEMO_DYNPRO in the list, and I can use the little icon that says Select/Deselect.  This highlights the program I want in yellow.  Looking around, I was able to find under the Objects Menu, there is an option to Change Object Directory Entry.  I change the Package to say Z_ABAP_BOOK and the Person Responsible to say BCUSER.  I press the save icon and the error I get is 'SAP object Prog DEMO_DYNPRO cannot be assigned to package Z_ABAP_BOOK.
    So, am I going about this totally incorrectly?  Or am I close?  Please tell me exactly what to do.

  • How to run a simple program with main?

    I have a simple class with main, something like the following:
    public static void main(String[] args) {
    Is it possible to run / execute this main from within workshop?

    In SP2 we've made it very easy to automatically set the main class name
    when you first try to run a class in a Java project that doesn't have
    already have debugging configured.
    More generalized ways to easily run a class with a main method are
    already on the list for the next release.
    Thanks for the feedback,
    Josh
    Carl wrote:
    Thanks, that worked:)
    Workshop should consider dealing with simple classes with main much
    simpler...
    "Josh Eckels" <[email protected]> wrote in message
    news:3f96f8c1$[email protected]..
    Yes, you can run and debug it, but it needs to be in a Java project. If
    it's not already in one, create a new Java project and copy in the
    source. Go to the Project Properties, and select the Debugger settings.
    Enter the class that contains the main method. If you'd like, you can
    set the checkbox for Build before Debugging so that you are always
    running off the current source code.
    You should then be able to run the project after building it.
    Josh
    Carl wrote:
    I have a simple class with main, something like the following:
    public static void main(String[] args) {
    Is it possible to run / execute this main from within workshop?

  • How to run GPIB based programs with visual basic 3

    I have a little test program to comunicate with a GPIB device in a similar way that MAX does.
    I type the address of the device, send the command *IDN?
    but nothing returns except an error message that says s$ duplicate definition. I'm not terribly familiar with VB 3.0 Does anyone know what this means and how to fix it?

    I'm assuming since you're using VB 3, I assume you're calling directly into gpib-32.dll - is that correct? Could you possibly post the VB code? Also, if it's possible for you to use a later version of VB, we have ActiveX controls for VB6 and .NET classes for VB.NET that would make GPIB-based I/O much simpler to do than it would be in VB 3.0

  • Trying to compile a GUI program with ActionEvent and Color/Graphics

    Hey, I am trying to compile a program that where I press a button it designs/displays a picture. I have the first part that shows the button, but I can''t get the second part of it. Any suggestions on what to do? Here is the part of the code that I am unsure about, the idea is to get that to design a picture:
    private class ButtonHandler implements ActionListener
              public void actionPerformed( ActionEvent event )
         }

    Heres the code in order to give a better idea of what I am trying to do:
    import java.awt.FlowLayout;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    public class Game extends JFrame
         private JLabel greeting; // greets user and gives initial instructions
         private JButton startGame; // start game button
         private JButton highScore; // displays high scores
         private JButton exitGame; // exits game
         // adds buttons to JFrame
         public Game()
              super( "Game" );
              setLayout( new FlowLayout() ); // set frame layout
              greeting = new JLabel( "Make selection..." );
              add( greeting );           
              startGame = new JButton( "Start Playing" );
              add( startGame );
              highScore = new JButton( "View High Scores" );
              add( highScore );
              exitGame = new JButton( "Exit Game" );
              add( exitGame );
              ButtonHandler handler = new ButtonHandler();
              startGame.addActionListener( handler );
         private class ButtonHandler implements ActionListener
              public void actionPerformed( ActionEvent event )
              public void paintComponent( Graphics g )
    super.paintComponent( g );
    g.setColor( Color.RED );
    g.fillOval( 10, 10, 200, 200 );
    }

  • Using LabView to run VB program with parameters

    Hi,
    It's my first message here so I hope I am doing things correctly. I tried to do some research before asking and I found a lot of good informations but right now, I seem to be stuck.
    I am quite new to LabView, I did few VIs here and there but nothing really "serious". I am currently working on a LabView interface that deals with VB, Excel macros and Data extraction from Text file.
    The VB program is in charge of a motor position, then, some Excel macros are used to do some measurement and the results are written in a text file that I use to plot some graphs.
    The VB program I made give the window I put in the picture in the attached files. Basically, you have to enter some values in those TextBox then click on Move and the motor will move. When you click on the button Home, the motor moves back to the position "0", no need of the two TextBox. In my labview interface, I created two ComboBox that contain all the possible values for both of the TextBox of my VB program. What I would like to do, when I click on my "Measure" button on LabView that initiates the VB program, is that it can fill the two TextBox from VB with the data entered in my LabView ComboBox and then run the program, simulating a "click" on the Move button.
    Right now, I found a VI (included in the attached files) that runs my VB program from LabView (I use it as a Sub-VI) but I still have to manually put the values in my VB program. My goal would be that when I click on my LabView button to start my measure, the motor moves but the VB program doesn't show up for the user to manually enter the values he wants.
    I hope I was clear but if you need any clarification.
    I did the the VB program myself.
    I can also link the LabView interface I already created if need be.
    Thanks for your help,
    Baptiste
    Attachments:
    Moteur.png ‏5 KB
    lancerEXE.vi ‏9 KB

    First, thank you for your answers.
    I know that I don't need to use VB or LabView. I just want for myself to be able to use LabView to manage a program in VB, one in VBA and use data from a text file. I know I could write everything in VBA and that would get the job done. The thing is I want to get away from VBA and Excel as much as I can. In the future, the plan would be to re-write my VBA program with LabView but as of now, I just want to use LabView to manage everything. I know I don't really need it but I want to learn how to do it and have something that works.
    So I would like to know if there is way to do what I wish to do, running my VB program with parameters coming from LabView.
    Thanks

  • Help! Running Fortran program with Xcode

    Hi all,
    I am developing a Fortran code for a class project, I understand Matlab, but very little of advanced programming like Fortran or C++, but have to learn some for my class (note: it is not a programming class). The professor gave us a code to run and modify it, the code is supposed to work (and in fact it is working on windows computers). I didn't know how to run Fortran on a mac so I followed the instructions given in these links:
    http://www.macresearch.org/xcodegfortran_contest_winner_damienbobillot
    http://lists.apple.com/archives/fortran-dev/2006/Mar/msg00011.html
    I installed Xcode 2.4, and gfortran. After I made my Project on Xcode (following the links above), I clicked Build and it was successful, but after I clicked Build and Go I got the following error:
    Warning:Array reference at (1) is out of bounds
    Command/usr/local/bin/gfortran failed with exit code 1
    I don't know what does that mean. Can anyone help me with this?
    I would like some easy-to-follow instructions to run a Fortran program with Xcode, starting from the basics.
    It is hard to find an easy compiler for mac, PC people have qFortran (for free at at school) and things like that where you just have to click compile and that is it.
    Thanks!
    lbml

    I'd need to see your code to give details, but the error you got says you declared an array with a certain number of elements and then you tried to talk to the array outside those elements.
    For example you say:
    integer myArray(5)
    and then try to index either myArray(0) or myArray (6).
    Does that make sense. I have never tried to get fortran working with Xcode, but I did get Pascal working, so it is probably better is someone else helps you, but I will try if no one steps up.

  • Run a qt program in arch

    I want to run a qt program in arch. Is it necessary to install KDE or GNOME desktop before that? or I can simply run it in console as well? considering that the program is a GUI program with OpenGL.
    if it is possible to run in console as well before tell me how, I have already installed xorg and start x works fine.

    saman_artorious wrote:
    x33a wrote:
    Many qt programs depend on some parts of KDE, so you may need to have those parts installed.
    If the program you need to run is present in the repos, simply install it and pacman will fetch all the required dependencies (i.e., any relevant part of KDE) by itself.
    To sum it up, you don't need to run the KDE suite, but you will have to install the relevant dependencies. The program itself should run fine with any WM or DE.
    what about if I do not download qt using pacman and instead install qt offline? in that case how will it know which dependencies it needs to download?
    1) Stop what you're doing.
    2) Think very carefully about what it is you want to accomplish.
    3) Explain in detail to the people here what it it is you are trying to accomplish, why you wish to do so, and what you've attempted so far in order to do so.
    So far, you've met every answer to one of your questions with yet another, seemingly unrelated question; you're just leading the folks here in circles with no clear goal. No matter what it is you happen to be doing, or when, or where, this is simply not an effective or efficient way to get things done. Arch is a Do-It-Yourself distribution and community; folks here will only remain patient for so long.

  • Client-Server side GUI programming

    I want to create a client-server side gui programming with java
    i read this web adress
    http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html
    for information but there are some parts that i didnt understand and wait for your help
    i m trying to build an online-help(live chat) system so when people press the start chat button a java page will appear but i wonder how this will connect to the person who is on server side
    i mean is it possible to 2 users connect the same port and chat with each other
    I mean when user press the chat button the online help supporter will be informed somebody wants to speak with him and they will start a chat
    how can i do something like that
    any help would be usefull thanks

    Below is an example of a client/server program.
    It shows how the server listens for multiple clients.
    * TriviaServerMulti.java
    * Created on May 12, 2005
    package server;
    * @author johnz
    import java.io.*;
    import java.net.*;
    import java.util.Random;
    * This TriviaServer can handle multiple clientSockets simultaneously
    * This is accomplished by:
    * - listening for incoming clientSocket request in endless loop
    * - spawning a new TriviaServer for each incoming request
    * Client connects to server with:
    * telnet <ip_address> <port>
    *     <ip_address> = IP address of server
    *  <port> = port of server
    * In this case the port is 4413 , but server can listen on any port
    * If server runs on the same PC as client use IP_addess = localhost
    * The server reads file
    * Note: a production server needs to handle start, stop and status commands
    public class TriviaServerMulti implements Runnable {
        // Class variables
        private static final int WAIT_FOR_CLIENT = 0;
        private static final int WAIT_FOR_ANSWER = 1;
        private static final int WAIT_FOR_CONFIRM = 2;
        private static String[] questions;
        private static String[] answers;
        private static int numQuestions;
        // Instance variables
        private int num = 0;
        private int state = WAIT_FOR_CLIENT;
        private Random rand = new Random();
        private Socket clientSocket = null;
        public TriviaServerMulti(Socket clientSocket) {
            //super("TriviaServer");
            this.clientSocket = clientSocket;
        public void run() {
            // Ask trivia questions until client replies "N"
            while (true) {
                // Process questions and answers
                try {
                    InputStreamReader isr = new InputStreamReader(clientSocket.getInputStream());
                    BufferedReader is = new BufferedReader(isr);
    //                PrintWriter os = new PrintWriter(new
    //                   BufferedOutputStream(clientSocket.getOutputStream()), false);
                    PrintWriter os = new PrintWriter(clientSocket.getOutputStream());
                    String outLine;
                    // Output server request
                    outLine = processInput(null);
                    os.println(outLine);
                    os.flush();
                    // Process and output user input
                    while (true) {
                        String inLine = is.readLine();
                        if (inLine.length() > 0)
                            outLine = processInput(inLine);
                        else
                            outLine = processInput("");
                        os.println(outLine);
                        os.flush();
                        if (outLine.equals("Bye."))
                            break;
                    // Clean up
                    os.close();
                    is.close();
                    clientSocket.close();
                    return;
                } catch (Exception e) {
                    System.err.println("Error: " + e);
                    e.printStackTrace();
        private String processInput(String inStr) {
            String outStr = null;
            switch (state) {
                case WAIT_FOR_CLIENT:
                    // Ask a question
                    outStr = questions[num];
                    state = WAIT_FOR_ANSWER;
                    break;
                case WAIT_FOR_ANSWER:
                    // Check the answer
                    if (inStr.equalsIgnoreCase(answers[num]))
                        outStr="\015\012That's correct! Want another (y/n)?";
                    else
                        outStr="\015\012Wrong, the correct answer is "
                            + answers[num] +". Want another (y/n)?";
                    state = WAIT_FOR_CONFIRM;
                    break;
                case WAIT_FOR_CONFIRM:
                    // See if they want another question
                    if (!inStr.equalsIgnoreCase("N")) {
                        num = Math.abs(rand.nextInt()) % questions.length;
                        outStr = questions[num];
                        state = WAIT_FOR_ANSWER;
                    } else {
                        outStr = "Bye.";
                        state = WAIT_FOR_CLIENT;
                    break;
            return outStr;
        private static boolean loadData() {
            try {
                //File inFile = new File("qna.txt");
                File inFile = new File("data/qna.txt");
                FileInputStream inStream = new FileInputStream(inFile);
                byte[] data = new byte[(int)inFile.length()];
                // Read questions and answers into a byte array
                if (inStream.read(data) <= 0) {
                    System.err.println("Error: couldn't read q&a.");
                    return false;
                // See how many question/answer pairs there are
                for (int i = 0; i < data.length; i++)
                    if (data[i] == (byte)'#')
                        numQuestions++;
                numQuestions /= 2;
                questions = new String[numQuestions];
                answers = new String[numQuestions];
                // Parse questions and answers into String arrays
                int start = 0, index = 0;
                   String LineDelimiter = System.getProperty("line.separator");
                   int len = 1 + LineDelimiter.length(); // # + line delimiter
                boolean isQuestion = true;
                for (int i = 0; i < data.length; i++)
                    if (data[i] == (byte)'#') {
                        if (isQuestion) {
                            questions[index] = new String(data, start, i - start);
                            isQuestion = false;
                        } else {
                            answers[index] = new String(data, start, i - start);
                            isQuestion = true;
                            index++;
                    start = i + len;
            } catch (FileNotFoundException e) {
                System.err.println("Exception: couldn't find the Q&A file.");
                return false;
            } catch (IOException e) {
                System.err.println("Exception: couldn't read the Q&A file.");
                return false;
            return true;
        public static void main(String[] arguments) {
            // Initialize the question and answer data
            if (!loadData()) {
                System.err.println("Error: couldn't initialize Q&A data.");
                return;
            ServerSocket serverSocket = null;
            try {
                serverSocket = new ServerSocket(4413);
                System.out.println("TriviaServer up and running ...");
            } catch (IOException e) {
                System.err.println("Error: couldn't create ServerSocket.");
                System.exit(1);
            Socket clientSocket = null;
            // Endless loop: waiting for incoming client request
            while (true) {
                // Wait for a clientSocket
                try {
                    clientSocket = serverSocket.accept();   // ServerSocket returns a client socket when client connects
                } catch (IOException e) {
                    System.err.println("Error: couldn't connect to clientSocket.");
                    System.exit(1);
                // Create a thread for each incoming request
                TriviaServerMulti server = new TriviaServerMulti(clientSocket);
                Thread thread = new Thread(server);
                thread.start(); // Starts new thread. Thread invokes run() method of server.
    }This is the text file:
    Which one of the Smothers Brothers did Bill Cosby once punch out?
    (a) Dick
    (b) Tommy
    (c) both#
    b#
    What's the nickname of Dallas Cowboys fullback Daryl Johnston?
    (a) caribou
    (b) moose
    (c) elk#
    b#
    What is triskaidekaphobia?
    (a) fear of tricycles
    (b) fear of the number 13
    (c) fear of kaleidoscopes#
    b#
    What southern state is most likely to have an earthquake?
    (a) Florida
    (b) Arkansas
    (c) South Carolina#
    c#
    Which person at Sun Microsystems came up with the name Java in early 1995?
    (a) James Gosling
    (b) Kim Polese
    (c) Alan Baratz#
    b#
    Which figure skater is the sister of Growing Pains star Joanna Kerns?
    (a) Dorothy Hamill
    (b) Katarina Witt
    (c) Donna De Varona#
    c#
    When this Old Man plays four, what does he play knick-knack on?
    (a) His shoe
    (b) His door
    (c) His knee#
    b#
    What National Hockey League team once played as the Winnipeg Jets?
    (a) The Phoenix Coyotes
    (b) The Florida Panthers
    (c) The Colorado Avalanche#
    a#
    David Letterman uses the stage name "Earl Hofert" when he appears in movies. Who is Earl?
    (a) A crew member on his show
    (b) His grandfather
    (c) A character on Green Acres#
    b#
    Who created Superman?
    (a) Bob Kane
    (b) Jerome Siegel and Joe Shuster
    (c) Stan Lee and Jack Kirby#
    b#

  • Sourcing : Error while Running Java Concurrent Program

    Hi All,
    Navigations:
    Application: Sourcing
    Responsibility : Sourcing Buyer
    Concurrent Program : Generate and Store Sourcing response spreadsheet
    I am trying to run
    Java Concurrent Program : Generate and Store Sourcing response spreadsheet in SRS Window,
    it completed with Error status.
    Please let me know How can I run this Concurrent Program with Normal status and able to view/save the Output.
    Please provide resolution on this.

    Thanks for your reply..
    Program: Generate and Store Sourcing response spreadsheet
    ShortName: PON_EXPORT_RESPONSE
    Application: Sourcing
    Executable: ExportResponseCp
    Method: Java Concurrent Program
    Responsibility : Sourcing Buyer.
    Has this ever worked? If yes, any changes been done recently?
    => No
    Is this the seeded concurrent program or a custom one?
    => Its seeded program.
    EBS: R12.1.3
    Login as Sourcing Buyer Responsibility :
    When you create RFQ and then Close RFQ and then create Surrogate quote and after you Export the Spreadsheet in SelfService Pages it generates the output.
    But if You run the concurrent program (Generate and Store Sourcing response spreadsheet) it errors out.
    Error : Exception in thread main java .lang.stringIndexOutOfBoundException:
    Thanks..

  • Java.lang.OutOfMemoryError when running java concurrent program

    Hi,
    i had written a java concurrent program to create the content items into Oracle Content Manager (OCM). Process the records from interface table and create the content items into OCM by calling the API IBC_CITEM_ADMIN_GRP.upsert_item().
    I run the concurrent program with 2000 records in interface table, it's an one to one process, 563 records are processed and 563 content items are created successfully in OCM. After 563 records continuously throws the Exception
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('EX - bundle validation others--');
    x_return_status := FND_API.G_RET_STS_ERROR;
    FND_MESSAGE.Set_Name('IBC', 'A_BUNDLE_ERROR');
    FND_MESSAGE.set_token('SITUATION', 'VALIDATION');
    FND_MSG_PUB.ADD;
    IF IBC_DEBUG_PVT.debug_enabled THEN
    IBC_DEBUG_PVT.end_process(
    IBC_DEBUG_PVT.make_parameter_list(
    p_tag => 'OUTPUT',
    p_parms => JTF_VARCHAR2_TABLE_4000(
    'x_return_status', '*** EXCEPTION *** [' || SQLERRM || ']'
    END IF;
    in IBC_CITEM_ADMIN_GRP.validate_attribute_bundle() API.
    Again running the concurrent program it process another 563 records. Can any one help me to fix this issue?
    i figured out the exception. When debug the error, i got the actual error message like this
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.OutOfMemoryError
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.ArrayIndexOutOfBoundsException: -2048 < 0
    for this issue i increased the heap memory size up to 1024MB. Still i have the same issue. Can any one help to fix the issue?

    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.NullPointerException
    ORA-29532: Java call terminated by uncaught Java
    exception: java.lang.ArrayIndexOutOfBoundsException:
    -2048 < 0Aren't the null pointer and arrayindexoutofbounds, the ones which you get when you are trying to read beyond your array? (example: when your loop tries to access the 563rd element in your array, since your array index starts from 0)?
    May be if you can try to write out your elements in the array, you might see what it is croaking about.
    Thanks,
    Chiru

Maybe you are looking for