WTK 2.2 hiccup (linux, java 1.4.2)

Hello
I have used WTK before.
I installed:
- debian testing
- j2SE 1.4.2.11 (via .bin-methode since the rpm is borked since about 3 years and 20 versions)
- WTK 2.2
I start the ktoolbar, open any sample project and click on "run". The emulator comes up and the display stays blank => http://img153.imageshack.us/img153/2923/wtk0en.jpg for 10 min. Closing the emu frezes both the emu and ktoolbar. Same thing with every other "Device".
After 10 min i get "Warning: Failed to initialize WMA message routing support". i guess waiting for another ... 2 hours will do the trick.
The PC is fast enough (dual 3 GHz), there is a lot of RAM (2 GB, 1.8 free) and there are no other progs running. I know java is slow, but this is way too much.
any thoughts ?
(Just got "Warning: Failed to initialize Bluetooth (JSR 82) support" ... it's getting closer...)

Hi Ken,
I m working on a CRM application and its uses struts framework. It is deployed on WAS 7.00.
What i feel is you have to specify in struts config files, you have to specify the name of the *.action to call any action file.
Also you need to the action class that is to be called when a particular action is requested.
Hope this help to resolve your query!!!!
Rgds,
Prashil

Similar Messages

  • Upgrading Linux java 1.4.2 AMD 64 bit edition with Daylight Saving Time

    I am running 64 bit version of Java 1.4.2 It is the linux blackdown version because at the time Sun did not support a 64 bit version. Now I would like to upgrade java to fix the possible problems with the Daylight Savings Time change.
    I have tried the tzupdater tool released by Sun but it did not work on my 64 bit machine, stating it could not find any tzone data to update.
    Next I looked into updating the JRE itself but it appears that Sun still does not offer a AMD 64 bit version for 1.4.2 linux. They only seem to have support for 64 bit in Java 5 and 6.
    Any ideas as to my best migration path? Should I consider taking the plunge and upgrading straight to Java 6 - although this will require updating Tomcat also and possibly breaking many of the 3rd party jar files we have in use.
    Message was edited by:
    Hatton

    My OS configuration is identical to your (save for the graphics card) and I do not experience these issues at all. I run pop-up blockers, firewalls, etc., etc., myself, and even mess around extensively with my browser settings (for debugging my own development), and have only EVER experienced an apparent lock-up under one condition:
    If an applet is signed, and pops up and dialog, OR if there is any other condition under which the PLUGIN displays a dialog box, and during this time your browser is no longer in focus, when you reactive the browser window, the dialog box does not appear in the front. What I'm saying is that there might be an active MODAL DIALOG box, but which is not being seen. These dialog boxes do not appear on the taskbar under windows (just like the calendar doesn't) but you can active it by using the Alt+Tab function of Windows. When I've experienced support calls regarding this sort of problem, I get the user to check Alt+Tab to check if there is a hidden dialog box (which is most often the case, since we used signed applets).
    I'm also a little confused by your reference to http://www.giga-byte.com - this site doesn't even load an applet when I open it.

  • Need to communicate c server on linux & java client on windows

    Hi!! I am new to socket programing in both C and Java.
    From let I downloaded some client server example for c and java and tried that to link !! (I allways learn this way , and I need to do that little urget )
    though cient server in linux is working perfectly fine and same for java. But problem is when I tried to communicate C server on linux and java client on windows, I end up with getting some junk characters. Though they are connected successfully.
    Here goes code for java client:
    package whatever;
    import java.io.*;
    import java.net.*;
    public class Requester{
         Socket requestSocket;
         ObjectOutputStream out;
         ObjectInputStream in;
         String message;
         Requester(){}
         void run()
              try{
                   //1. creating a socket to connect to the server
                   requestSocket = new Socket("192.168.72.128", 2006);
                   System.out.println("Connected to localhost in port 2004");
                   //2. get Input and Output streams
                   out = new ObjectOutputStream(requestSocket.getOutputStream());
                   out.flush();
                   in = new ObjectInputStream(requestSocket.getInputStream());
                   System.out.println("above do");
                   //3: Communicating with the server
                   do{
                        try{
                             System.out.println("in do");
                             //message = (String)in.readObject();
                             System.out.println("in try");
                             //System.out.println("server>" + message);
                             System.out.println("server>" + "message");
                             sendMessage("Hi my server");
                             message = "bye";
                             sendMessage(message);
                             System.out.println("try completed");
                        catch(Exception e){
                             e.printStackTrace();
                   }while(!message.equals("bye"));
              catch(UnknownHostException unknownHost){
                   System.err.println("You are trying to connect to an unknown host!");
              catch(IOException ioException){
                   ioException.printStackTrace();
              finally{
                   //4: Closing connection
                   try{
                        in.close();
                        out.close();
                        requestSocket.close();
                   catch(IOException ioException){
                        ioException.printStackTrace();
         void sendMessage(String msg)
              try{
                   String stringToConvert= "hello world";
                   byte[] theByteArray = stringToConvert.getBytes();
                      System.out.println(theByteArray.length);
                   out.writeObject(theByteArray);
                   out.flush();
                   System.out.println("client>" + msg);
              catch(IOException ioException){
                   ioException.printStackTrace();
              catch(Exception ex){
                   ex.printStackTrace();
         public static void main(String args[])
              Requester client = new Requester();
              client.run();
    And for C server
    / server
        #include <stdio.h>
            #include <sys/socket.h>
            #include <arpa/inet.h>
            #include <stdlib.h>
            #include <string.h>
            #include <unistd.h>
            #include <netinet/in.h>
            #define MAXPENDING 5    /* Max connection requests */
            #define BUFFSIZE 32
            void Die(char *mess) { perror(mess); exit(1); }
        void HandleClient(int sock) {
                char buffer[BUFFSIZE];
                int received = -1;
                /* Receive message */
                if ((received = recv(sock, buffer, BUFFSIZE, 0)) < 0) {
                    Die("Failed to receive initial bytes from client");
                /* Send bytes and check for more incoming data in loop */
                while (received > 0) {
                /* Send back received data */
                    if (send(sock, buffer, received, 0) != received) {
                        Die("Failed to send bytes to client");
    //            fprintf("%s",buffer);
                fprintf(stdout, "message Recieved: %s\n", buffer);
                    //Die("was not able to echo socket message");               
                /* Check for more data */
                    if ((received = recv(sock, buffer, BUFFSIZE, 0)) < 0) {
                        Die("Failed to receive additional bytes from client");
                close(sock);
        //     A TCP ECHO SERVER
        int main(int argc, char *argv[]) {
                int serversock, clientsock;
                    struct sockaddr_in echoserver, echoclient;
                    if (argc != 2) {
                      fprintf(stderr, "USAGE: echoserver <port>\n");
                    exit(1);
                /* Create the TCP socket */
                    if ((serversock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
                      Die("Failed to create socket");
                /* Construct the server sockaddr_in structure */
                    memset(&echoserver, 0, sizeof(echoserver));      /* Clear struct */
                    echoserver.sin_family = AF_INET;                  /* Internet/IP */
                    echoserver.sin_addr.s_addr = htonl(INADDR_ANY);  /* Incoming addr */
                    echoserver.sin_port = htons(atoi(argv[1]));      /* server port */
        // A TCP ECHO SERVER ENDS
        // A TCP ECHO SERVER BINDING AND LISTNING
      /* Bind the server socket */
                  if (bind(serversock, (struct sockaddr *) &echoserver, sizeof(echoserver)) < 0) {
                        Die("Failed to bind the server socket");
              /* Listen on the server socket */
                  if (listen(serversock, MAXPENDING) < 0) {
                  Die("Failed to listen on server socket");
        // A TCP ECHO SERVER BINDING AND LISTNING
        // SOCKET FACTORY
    /* Run until cancelled */
                while (1) {
                        unsigned int clientlen = sizeof(echoclient);
                          /* Wait for client connection */
                        if ((clientsock =
                          accept(serversock, (struct sockaddr *) &echoclient, &clientlen)) < 0) {
                            Die("Failed to accept client connection");
                          fprintf(stdout, "Client connected: %s\n", inet_ntoa(echoclient.sin_addr));
                          HandleClient(clientsock);
        // SOCKET FACTORY ENDSI know that it is not C forum but I found no better place to post it
    Thanks

    kajbj wrote:
    ManMohanVyas wrote:
    hii!! just trying to make it a little more explinatory
    1) what I am trying to accomplish by the above code is: - just need to echo/print from the Server , message send by the Client. I know code is not that good but should be able to perform this basic operation( according to me ).You are wrong. I told you that it won't work as long as you are using ObjectOutputStream and ObjectInputStream. You shouldn't write objects.
    2) Message sent by the client is "hello world"(hard coded).No, it's not. You are writing a serialized byte array.
    3) what I am getting at the client end is "*message recieved: ur*" (before that It shows the Ip of client machine)
    It should print "hello world ".See above.
    You are having a problem, and I have told you what the problem is.hey I dont know what went wrong but . I posted all this just next to my first post ...before you posted !!
    And hard coded byte array includes "hello world"...may be I am not able to explain properly.

  • Linux Java server

    I'm creating a socket server in java language on Linux System, and I would like to launch it as a demon; it means that I want my server to start automatically after a reboot and to be launched in a script localised in the /etc/rc.d/init.d directory
    I've already done that with a socket server written in C language (using fork() and dup() functions to "daemonize" my server), but I don't find equivalence in Java. I've tried to use the function "SetDaemon", but my server don't become a son of the init process ...
    Is it possible or not ?
    PS: sorry for my english ...

    Java can't demonize itself the same way as C programs do. Usually a shell script does that job. It sets all required variables (classpath & co) and starts the java process in the background (using &). Look at the way Tomcat does it for some hints.

  • JDBC for Postgresql(on Linux): java.lang.NullPointerExceptio--Please HELP!

    I'm trying to build a JSP web application with Apache Tomcat 4.0 on Linux, using PostgreSQL database.
    The test page for building a connection to the database is very simple.
    However, unfortunately, I always get the following error message from the web server.
    The code is also show below.
    I have another Tomcat server working on Window2000 with Oracle. So I change the JDBC driver to Oracle on that machine, and it works fine.
    I guessed I might have some problem with the Tomcat setting, but I'm not sure what I need to change.
    The directory of my web application is built under the webapps.
    And I've added JAVA_HOME, JAVA_HOME/lib/tool.jar, and JDBC for PostgreSQL to my CLASSPATH.
    Is there any other configuration that I missed?
    Please help if you see the problem.
    Thanks a lot in advance.
    Error message:
    type: Exception report
    message: Internal Server Error
    description: The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         at org.apache.jsp.index$jsp._jspService(index$jsp.java:231)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown Source)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
         at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
         at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
         at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
         at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
         at org.apache.catalina.valves.AccessLogValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown Source)
         at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
         at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
         at org.apache.catalina.connector.http.HttpProcessor.process(Unknown Source)
         at org.apache.catalina.connector.http.HttpProcessor.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:484)
    Here's my code:
    <%@ page language="java" import="java.io.*, java.sql.*, java.util.*, java.lang.*" %>
    <HTML>
    <HEAD>
    <TITLE>TEST</TITLE>
    </HEAD>
    <BODY>
    <b> City </b><br>
    <%
         Class.forName("org.postgresql.Driver");
         String sqlurl = "jdbc:postgresql://localhost:5432/customer";
         String username = "guest";
         String passwd = username;
         Connection conn = DriverManager.getConnection(sqlurl, username, passwd);
         Statement st = conn.createStatement();
         String queryStr = "select CITY from WEATHER";
         ResultSet rs = st.executeQuery(queryStr);
         if (rs != null){
              while(rs.next()){
                   String strCity = rs.getString(1);
    %>
    -- <%=strCity %> --<br>
    <%
         st.close();
         conn.close();
    %>
    </BODY>
    </HTML>

    Error is not there in the code what you are showing. Can you edit index$jsp.java and see what is there in line 231?
    You may find it in tomcat_home\work\your_application directory.
    Sudha

  • WTK 2.5.1on Linux

    Hi I am migrating my development enviroment from windows to linux but I am finding some problems, here are three issues I have seem:
    1 =======================
    The scripts run.sh does not work to solve this I had to:
    1. change permission chmod 755
    2. change the file where it says:
    DEMO=demos
    put
    DEMO=Demos
    2 =======================
    I am trying to test a jar file using jsr75 to access cell filesystem it works great on WTK2.5.1 on windows but it stops when reading a directory on Linux the emulator asks permission to read the user press yes it goes when it asks again to read the contents of that directory the user press yes and nothing happens. I have double checked permissions on the appd/filesystem/root1 permissions even with chmod 777 it does not work. See that this same .jar works well on Windows WTK2.5.1
    3 =======================
    In the games demo the push-puzzle when play a sound it sounds too strange, as it was played fast foward
    =======================
    I am using netbeans 5.5.1 and wtk2.5.1 that came with it on Ubuntu 7.04 with kernel 2.6.20-16 and java -version returns
    java version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
    ===============
    Thanks, hope to hear from you soon

    Hi Thanks for your answer the issue 1 was done with the Ktoolbar but issue 2 dtill not working even if i am using ktoolbar to create a project build and run it.
    Here is the KtoolBar console output:
    Warning: Cannot convert string "-b&h-luxi sans-medium-r-normal--*-140-*-*-p-*-iso8859-1" to type FontStruct
    Warning: Cannot convert string "-misc-ar pl shanheisun uni-medium-r-normal--*-*-*-*-p-*-iso10646-1" to type FontStruct
    /usr/share/themes/Human/gtk-2.0/gtkrc:71: Engine "ubuntulooks" is unsupported, ignoring
    /usr/share/themes/Human/gtk-2.0/gtkrc:241: Priority specification is unsupported, ignoring
    Running with storage root DefaultColorPhone
    Running with locale: pt_BR.UTF-8
    Running in the identified_third_party security domain
    Warning: To avoid potential deadlock, operations that may block, such as
    networking, should be performed in a different thread than the
    commandAction() handler.and here is my code:
    * MIDletAcessoFileSystem.java
    * Created on 9 de Junho de 2007, 16:24
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Enumeration;
    import javax.microedition.io.Connector;
    import javax.microedition.io.file.FileConnection;
    import javax.microedition.io.file.FileSystemRegistry;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    * Exemplo de utiliza&#65533;&#65533;o do FileSystem
    * @author Tadeu Ferreira Oliveira
    * @version 0.1
    public class MIDletAcessoFileSystem extends MIDlet implements CommandListener{
         * Uma lista para exibir o nome dos arquivos encontrados
        private List lista;
         * Comando para sair do programa
        private Command sair;
         *Acionado para exibir o conte&#65533;do de um diret&#65533;rio no sistema de arquivos
        private Command listarArquivos;
         * Versao da API FileConnection
        private String versao;
         * Construtor obtem o valor da vari&#65533;vel versao
        public MIDletAcessoFileSystem(){
            this.versao = System.getProperty("microedition.io.file.FileConnection.version");
         * Localiza todos os drives dispon&#65533;veis no aparelho
         * @return Retorna um Enumeration de String com o nome dos drives encontrados
        private Enumeration obterListaDeDrives(){
            Enumeration drives =  FileSystemRegistry.listRoots();                           
            return drives;
         * Localiza todos os arquivos em um determinado drive
         * @return Retorna um String[] com o nome dos arquivos encontrados
         * @param drive O drive que dever&#65533; ser listado sem barra no in&#65533;cio Ex.: root1/
        private Enumeration obterListaDeArquivos(String drive){
            Enumeration arquivos =  null;
            try {
                FileConnection fc = (FileConnection) Connector.open("file://localhost/"+drive, Connector.READ);
                arquivos = fc.list();
            } catch (IOException ex) {
                ex.printStackTrace();
            return arquivos;
        public List get_lista(){
            if (this.lista == null){
                String[] elementos = null;           
                lista = new List("Arquivos",List.EXCLUSIVE);
                lista.addCommand(get_sair());
                lista.addCommand(get_listarArquivos());
                lista.setCommandListener(this);
            return lista;
        public Command get_sair(){
            if(sair == null){
                sair = new Command("Sair",Command.EXIT,0);
            return sair;
        public Command get_listarArquivos(){
            if(this.listarArquivos == null){
                this.listarArquivos = new Command("Listar",Command.ITEM,1);
            return this.listarArquivos;
        public void startApp() {
            Display d = Display.getDisplay(this);
            if (versao != null){
                if (versao.equals("1.0")){
                    d.setCurrent(get_lista());
                String elem = null;
                Enumeration em = this.obterListaDeDrives();           
                while (em.hasMoreElements()) {
                    elem = (String) em.nextElement();
                    get_lista().append(elem,null);  
            }else{
                Alert alErro = new Alert("Erro","Aparelho sem suporte a arquivos",null,AlertType.ERROR);
                alErro.setTimeout(Alert.FOREVER);
                d.setCurrent(alErro,get_lista());
        public void pauseApp() {
        public void destroyApp(boolean unconditional) {
        public void commandAction(Command command, Displayable displayable) {
            if (command == get_sair()){
                this.destroyApp(true);
                Display.getDisplay(this).setCurrent(null);
                this.notifyDestroyed();
            }else{
                if(command == get_listarArquivos()){               
                    //obtem o drive selecionado no momento
                    int indice = this.get_lista().getSelectedIndex();
                    String drive = this.get_lista().getString(indice);
                    //limpar a lista
                    this.get_lista().deleteAll();
                    String elem = null;
                    Enumeration en = this.obterListaDeArquivos(drive);
                    //adicionar os arquivos na lista
                    while (en.hasMoreElements()) {
                        elem = (String) en.nextElement();
                        this.get_lista().append(elem,null);  
    }

  • Linux-Java Classpath

    I'm not new to Java, just new to Java in Linux. I installed the 1.3.1 jdk, but any time I try to compile or run something, I always get the same error:
    Couldn't find or load essential class `java.lang.Object' java.lang.NoClassDefFoundError java/lang/Object
    I figure it's because I don't have my CLASSPATH set, but I don't know how to do that or what to set it to. Please help!
    MagiTom

    Hi
    Most Linux machine's use bash as their shell, so you can try editing your ".bashrc" file which lies in the root of your profile directory (normally it would be something like "/home/username"
    If you want to make the changes for all users that log onto the machine you've got a couple of options - you can edit the ".profile" file under "/etc" , or you can run a script at a certain run-level; I normally choose run-level 3. OK, this last bit might sound like Greek to you, but it's also easy - have a look under "/etc" you'll find a dir called "rc.d" under that you'll find various dirs called "rc1.d", "rc2.d" etc; every dir contains scripts that execute when a certain run-level is reached. You can then just add a script that loads your environmental variables.
    Below is an example of how you could set you're environment variables in your ".bashrc" file:
    JAVA_HOME=/usr/lib/jdk1.3.1
    export JAVA_HOME
    TOMCAT_HOME=/opt/jakarta
    export TOMCAT_HOME
    PATH=/usr/lib/jdk1.3.1/bin:$PATH
    export PATH
    CLASSPATH=$JAVA_HOME/lib/tools.jar:.:/usr/lib/j2sdkee1.2.1/lib/j2ee.jar
    export CLASSPATH
    As you can see I set a number of variables - but that's just because I do a bit of J2EE dev every now and again
    Hope this helps - and welcome to the world of Linux!!!!!

  • Linux, java.lang.Process.getOutputStream() funniness

    Hi,
    I'm using RedHat 7.1, and Sun JDK 1.3.0_02 (on Intel).
    From my Java app, I'm trying to launch another process, and redirect my
    console in/out to the slave process's in/out.
    After launching the process (using Runtime.exec), I launch three
    background threads:
    1. Monitor the slave process's getInputStream and write all incoming
    bytes to my System.out
    2. Monitor the slave process's getErrorStream and write all incoming
    bytes to my System.out
    3. Monitor my System.in and write all incoming bytes to the slave
    process's getOutputStream
    The funniness I'm experiencing is in step 3 -- it seems that I have to
    press each keystroke TWICE, for it to register into the slave process.
    For example, as a test, I am launching "lynx http://www.cnn.com", and
    the lynx options "H" and "O" I have to press twice (H-H or O-O) to get
    the appropriate screen to pop up. In fact, the first keystroke I enter
    doesn't matter; it's as if every other keystroke is looked at.
    Here is my code for thread #3:
    // -------- Begin code fragment
    // Start an input thread
    Thread inThread = new Thread() {
       public void run() {
          OutputStream out = slaveProcess.getOutputStream();
          byte[] buffer = new byte[1024];
          int len;
          while (true) {
             try {
                len = System.in.read(buffer);
                if (len == -1) break;
                //System.out.println("Bytes read from keyboard: " + len);
                out.write(buffer, 0, len);
                out.flush();
             } catch (Exception e) {
                break;
          System.out.println("inThread exiting");
    inThread.start();
    // -------- end code fragment In reference to some older JVM bugs, I've tried inserting
    Thread.currentThread().sleep(1) at various points (in case there is a
    scheduler problem), but to no avail.
    Any help would be appreciated!
    Thank you,
    Bryan

    I would test it buy using three FileIn/OutputStreams
    instead of Syatem.in/out/err and if it worked at that
    point it would be the synchronization/blocking problem.
    Because I have used Process.getInputStream on linux on
    several occasions and never anything like you are
    talking about happened.

  • Linux, Java and Javax.usb

    Hello,
    I've spent 3 days trying to install the javax.usb package on my linux with the classical package and I finally found the javax.usb RPMs. I installed them and every thing seemed fine until I tried to run a java program.
    Now I'm unable to run any program.
    Completion does not work anymore e.g. when I'm in a directory with a .class file, the completion is unable to find it.
    That would not be a real problem but when I try to run a java program, I always end up with a ClassNotFoundException. Does anyone have a clue about what is happening to me.
    System : Mandriva 2009.0
    Linux Kernel 2.6

    Packages that begin with "java" are base packages.
    Packages that begin with "javax" are extensions to
    Java (hence the "x").
    AWT was the first UI package in Java. Swing came
    later and was added as an extension.
    %aha, right. cheers

  • Connecting to a RDBMS on Windows Platform from a Linux Java Client.

    Hi All,
    I want to connect to the SQL Server 7.0 (or for that matter of fact any RDBMS) running on Windows NT environment from my Java Client on Linux. From the web, i came to know that we can use ODBC Drivers on Linux but not sure how to implement this.
    Could you guys please help me in solving my problem ??
    Even links to the articles on the web would be great.
    Thanks,
    Gaurav.

    Use the JDBC driver for SQL Server from Microsoft at http://www.microsoft.com/SQL/downloads/2000/jdbc.asp. Alternatively, you can use the drivers from http://www.freetds.org and http://www.thinweb.com

  • Linux java and windows oracle

    Hi
    I have a linux server with apache tomcat installed. I want to connect to oracle which is installed in windows 2000 server. Can any one help me how to coonect to the oracle server from the java applicaton or plese tell me what other third party is needed.
    .

    Hi
    Just substitute the hostname (and port if necessary) that you would put in your connection URL for the host/port of the Windows 2000 server.
    I haven't used Oracle for ages now, but I think when you download the driver, it comes with a couple of examples of what the connection URL should look like (and indeed examples of making the connection itself). Make sure the relevant firewall ports are open though or you'll never get them talking ;-)
    Rgds

  • Embedded linux-java

    does any1 know of an easy to learn distro thats used for embedded saystems with java.(pref open source)
    also a pro distro name wud be useful for reference 2.

    In my oppinion 2) is not an option. Actually in most cases it requires even more memory compared to the traditional case.
    1) is ... well, I don't think that you will find enough good tool to seamlesly convert your code to C/C++. In all cases, there would be a lot of work needed after the 'conversion'
    3) is a reasonable option. You can use J2ME CDC - which is something like stripped down J2SE. But yes, it still includes collections, core lang, io, security, reflection and util classes. It just don't have the GUI libraries like AWT, Swing; which I don't think you need on that embedded device.
    So I bet on 3).
    Here is some example that it works:
    I had a HW - pentium/32RAM/floppy
    The software configuration was:
    Linux - monolitic kernel without modules loading support and only really required drivers compilled in.
    The chosen filesystem was minix
    The VM was J2ME CDC
    The system software was busybox - used to boot the linux, to start a shell and start the VM.
    The other software was: our embedded server - an OSGi Platform with minimal set of bundles, which included the HTTP & Telnet bundles.
    All that software was created in a in 8MB image, compressed with bzip to 1.7M and written, under linux to a floppy disk /yes, the regular floppy disk can handle up to 2MB/
    When the disk was ready, I placed it into the floppy and booted the machine. The system was up and running after some minutes because the floppy is really slow. At this time I had an HTTP server running and a remote console to the OSGi framework, so I can install remotely some other bundles. The 32MB memory was full almost to it's limit. But it already contained - a memory image of the disk == 8M, the linux kernel loaded, the virtual machine , the OSGi framework and the bundles (http, telnet & some other, ~ 10 bundles totaly).

  • LINUX Java Programming

    Hi this is Kashishs , i wanna know how to use swings in Linux as i have tried to run my java programmes on Linux and i am getting error that JFrame not found.
    What could be the reason please advise.
    [email protected]

    PLZ elaborate,
    how and where.
    I am new to linux platform

  • Localhost linux java.sql.SQLException: Io exception: The Network Adapter co

    I recently upgraded from Redhat 9 to Fedora Core 4, and am running an Oracle 9i on this machine.
    Since this upgrade, I'm unable to connect from the machine itself to the db, using the JDBC thin driver. This worked on Redhat 9.
    I'm also able to connect from any other machine to this db with the JDBC driver.
    Also, any ping, tnsping, sqlplus work from localhost and other machines.
    Only the JDBC connection from the localhost itself fails, with following exception:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at Jdbctest.main(Jdbctest.java:97)
    *** SQLException caught ***
    SQLState: null
    Message: Io exception: The Network Adapter could not establish the connection
    Error Code: 17002
    In following URL - jdbc:oracle:thin:@myserver:1521:mydb - I tried 'localhost', '127.0.0.1', 'dns name', 'ip address', but all fail.
    Any ideas would be highly appreciated (I'm searching for days now...)
    Thanks in advance,
    Tim

    EtherrealTake this with a grain of salt; I know a lot of the theory but don't have much hands on experience...
    Not a bad idea, but you need to understand more if it's going to work (it might not). Etherreal and most other sniffers work by capturing traffic at the network interface (NIC) level, this allows the NIC to be switched into "promiscuous" mode and capture all the network traffic "on the wire" in that network segment, even traffic destined for other machines.
    You can think of "networking" as an onion, or a stack of layers (see "OSI 7 laye model", Google or http://www.webopedia.com/quick_ref/OSI_Layers.asp for one theoretical approach), and etherreal works at pretty "outside" ot "low" level; the "internal" traffic that your interested in seeing either never gets to the level that Etherreal is monitoring, or is doing so in an area that is parallel to the one you're monitoring.
    It's possible that you might be able to configure etherreal to see the "loopback" traffic. I suspect that somewhere, you can specify which network interface is to be monitored, and you can change it to monitor the "local" network interface. If your Linux setup is typical, etherreal is probably monitoring interface "eth0" and you probably want to monitor "lo" to see local traffic.
    You can find out what interfaces you have with the command:
    ifconfig -a
    On the Red Hat Entrerprise that I have, that command is not in the default PATH, but is in /sbin; on other flavors of Unix I know it is found in /usr/sbin
    If you can get etherreal monitoring the local interface, you should be able to see the traffic generated by "ping 127.0.0.1"
    BTW, that command will also give you raw counts of the number of packets on all interfaces; if you have the machine to yourself, you might try a connection attempt and see which (if any) interfaces have packet numbers increase; if none do, then the connection attempt is failing before it gets to the packet level and Etherreal won't tell you anything.

  • DASE Linux - Java CLASSPATH

    Folks,
    I have set java path in /etc/profile.d as java.sh, following are it's content -
    #!/bin/bash
    JAVA_HOME=/usr/java/jdk1.2.2
    JMF_HOME=/usr/java/JMF1.1
    LD_LIBRARY_PATH=/usr/java/jdk1.2.2/jre/lib/i386
    PATH=$JAVA_HOME/bin:$JMF_HOME/bin:$LD_LIBRARY_PATH/bin:$PATH
    export PATH JAVA_HOME JAVA_JMF LD_LIBRARY_PATH
    #export CLASSPATH=.
    I have checked following things for java path - which javac, it's works and also in
    path where I am suppose to do ./configure, it's works.
    After doing make 2>&1 | tee log.mks I get following errors -
    Exception in thread "main" java.lang.NoClassDefFoundError: tools/simulation/DataGen
    make[1]: *** [test] Error 1
    make[1]: Leaving directory `/home/DASE/nist_ri/devkit'
    make: *** [make-install] Error 1
    I presume, that somehow there is an issue for setting the java CLASSPATH. My classpath
    has all jar files as asked in NIST DASE document - devkit.jar, stb.jar, dase.jar & libjreX.so.
    I would appreciate if I can get some clue to resolve above issues.
    Regards,
    Mukesh K Srivastava

    Hi
    Most Linux machine's use bash as their shell, so you can try editing your ".bashrc" file which lies in the root of your profile directory (normally it would be something like "/home/username"
    If you want to make the changes for all users that log onto the machine you've got a couple of options - you can edit the ".profile" file under "/etc" , or you can run a script at a certain run-level; I normally choose run-level 3. OK, this last bit might sound like Greek to you, but it's also easy - have a look under "/etc" you'll find a dir called "rc.d" under that you'll find various dirs called "rc1.d", "rc2.d" etc; every dir contains scripts that execute when a certain run-level is reached. You can then just add a script that loads your environmental variables.
    Below is an example of how you could set you're environment variables in your ".bashrc" file:
    JAVA_HOME=/usr/lib/jdk1.3.1
    export JAVA_HOME
    TOMCAT_HOME=/opt/jakarta
    export TOMCAT_HOME
    PATH=/usr/lib/jdk1.3.1/bin:$PATH
    export PATH
    CLASSPATH=$JAVA_HOME/lib/tools.jar:.:/usr/lib/j2sdkee1.2.1/lib/j2ee.jar
    export CLASSPATH
    As you can see I set a number of variables - but that's just because I do a bit of J2EE dev every now and again
    Hope this helps - and welcome to the world of Linux!!!!!

Maybe you are looking for