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).

Similar Messages

  • Can we use JCE embedded into JAVA 1.5 outside USA and Canada?

    Hello all,
    in the old JCE 1.2.2 (http://java.sun.com/products/archive/jce/) where was a restriction: RESTRICTED TO THE UNITED STATES AND CANADA. If you do not reside in the United States or Canada, you will not be able to download this software.
    Is there the same restriction also in the embedded JCE into java 1.5 ?
    I can not see any restriction. is it correct?
    Could you give me the link where I can find the restriction or the license and term of use about JCE embedded in JAVA 1.5?
    Thanks
    Matteo

    Those restrictions were lifted during the Clinton administration.

  • Embedded Tomcat Java Application

    Hi
    I am using an Embedded Tomcat Java Application.
    I am getting the following Exception when i run the program.
    java.lang.NullPointerException
         at org.apache.catalina.startup.DigesterFactory.register(DigesterFactory.java:174)
         at org.apache.catalina.startup.DigesterFactory.registerLocalSchema(DigesterFactory.java:130)
         at org.apache.catalina.startup.DigesterFactory.newDigester(DigesterFactory.java:92)
         at org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:435)
         at org.apache.catalina.startup.ContextConfig.createWebDigester(ContextConfig.java:422)
         at org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:499)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:623)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:846)
         at EmbeddedTomcat.startTomcat(EmbeddedTomcat.java:77)
         at EmbeddedTomcat.main(EmbeddedTomcat.java:135)
    could anyone tell me how to solve this problem
    Thanx & Regards
    Faisal

    Hi
    R u able to resolve the problems.... If yes please provide me the info... I'm also facing the same problem...
    REgards
    siddhu

  • Addopt embedded LV to embedded Linux - what do I have to do?

    Hello.
    I'm a student doing my thesis work in sweden and I'm quite new to LV.
    I read the manual for porting emb.LV Runtime but don't have an idea where I have to start with.
    my platform is an microcomputer (NetDCU8) with an ARM 9 prozessor, touchscreen, Network, serial ports, SD-Card and ADC's running embedded Linux (Emlix).
    The graphic part I allready programmed in C/C++ and it could be running as a thread.
    This is what I need to programm within LV:
    - starting the graphicfunction as a thread
    - reading values from ADC's and store them into global Arrays every 60 seconds
    - doing some calculations with those values
    - storing values into logfiles onto Networkfolder and SD-Card (both mounted when the target start up Linux)
    I'm able to do all this stuff in C/C++. But as a part of my thesis work, I have to make emb. LV useable for programming for my target.
    The BSP is only for Linux-Computers.
    I'm not very familar with operating systems and have zero experience in porting anything.
    But if there are some good hints, where I have to look at and what I maybee can use, that's already done, then I think I have a chance to manage it.
    ...I have only 1 month left for my work.... 
    Best regards from Göteborg,
    Tobias

    Hi!
    I got the first "Hello world" to run!!!
    Jiiiiiiiihhhhhhhhhhaaaaaaaaaaa! 
    I edited LVGenRTInit.c and removed all unneeded includes and corrected the Makefile:
    /* CODE START */
    APPLICATION = "/nfsroot/testcomp"
    CC = "arm-linux-gcc"
    LD = "arm-linux-gcc"
    CFLAGS =  -DVAR_WAIT_ON_EXIT -DCHeadless=1 -I.  -O3 -fomit-frame-pointer -Dlinux  -w
    LFLAGS =  -lm -lpthread -lnano-X -L"/2compile/"
    OBJS = /2compile/linux_tryout.o /2compile/LVUnixInit.o /2compile/LVCGenRTInit.o /2compile/lvEmbeddedMain.o
    INCLUDES = -I"/2compile"
    LIBS = "/Targets/NI/Embedded/embLinux/libs/lvanlys.a" "/Targets/NI/Embedded/embLinux/libs/libaalcore.a"
    %.o: %.c
        $(CC) -c $(CFLAGS) $(INCLUDES) -c -o $@ $<
    $(APPLICATION): $(OBJS)
        $(CC) -o $(APPLICATION) $(LFLAGS) $(OBJS) $(LIBS)
    /* CODE END */
    Now I can work with the inline-C-node. the next step will be a timed loop. and also bringing the old dir-structure back from my actual header-soup....
    Microwindows is the old name of Nano-X. Fortunetly I didn't have had to compile it for mz target. The libraries were readymade delivered....
    so I can just show you some parts of my code to create windows and stuff in the attached file...
    Maybee this can help you on your first tryarounds, when you have compiled nano-x for eCos.
    I will post again, when the timed loop works.
    have a nice day!
    Tobias
    Attachments:
    nx_short_demo.txt ‏2 KB

  • Run LabVIEW in embedded Linux

    Hello,
    My application platform is ARM 2410, the OS is embedded Linux extract from Red Hat Linux 9. I want to use LV to construct a HMI , which will use inter-process to communicate with other processes. I'd like to know which LV families product or module should be attached? Can port the LV application which develop on the Windows OS to the embedded system? Thanks.
    David

    DavidLee wrote:
    Hello,
    My application
    platform is ARM 2410, the OS is embedded Linux extract from Red Hat
    Linux 9. I want to use LV to construct a HMI , which will use
    inter-process to communicate with other processes. I'd like to know
    which LV families product or module should be attached? Can port the LV
    application which develop on the Windows OS to the embedded system?
    Thanks.
    David
    The only
    solution for this would be LabVIEW embedded development system. It's a
    special version of LabVIEW where you get part of the LabVIEW system in
    source code and allows you to port the LabVIEW embedded kernel to your
    32bit processor of choice. I'm not sure if ARM2410 is already as one of
    the provided platforms, otherwise you would have to spend some time
    porting various things to your platform. Apart from that you also need
    the entire C toolchain of your target platform run on your LabVIEW host
    system.
    LabVIEW embedded development system is definitely not for the faint at
    heart and substantial C programming knowledge will be mandatory in
    order to make the system work for your platform. And it costs quite
    some bucks >10000$.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Embedded linux with arm9

    hello all,
    what i'm trying to do is install apache tomcat and apache derby on this embedded linux box that i'm working on. but the problem is that the jvm i have installed on the linux box is ibm's j9. can some one please point me in the right direction as how i can get both server's running?
    ps. the device have only 32mb for me to work with, clearly installing sun's jdk is not an option :( unless i some how manage to reduce the jdk's size.
    thanks
    canucks604

    Yocto embedded distributions can upgrade just like any other Linux distro, and probably in a few ways more than that. Your question doesn't really apply to Yocto in particular.
    Simplest is to use the package mechanism and have devices upgrade themselves. From there, you can take it further, e.g. using signed packages, dual-boot systems, etc.
    You'll have to be way more specific if you want to get specific solutions to your specific problem.

  • Embedded Linux – mechanism for deploying firmware updates?

    I am considering developing on the Yocto project for an embedded Linux project (an industrial application) and I have a few questions for those with experience with embedded Linux in general -- Yocto experience a bonus. Just need to get an idea of what is being commonly done in firmware updates.
    I have a few requirements, that being authentication, a secure communications protocol, some type of rollback if the update failed. Also, if there is a way to gradually release the patch across the fleet of devices then that would also be interesting as I want to avoid bricked devices in the field.
    How do you deploy updates/patches to field devices today – and how long did it take to develop it? Are there any other considerations I am missing?

    Yocto embedded distributions can upgrade just like any other Linux distro, and probably in a few ways more than that. Your question doesn't really apply to Yocto in particular.
    Simplest is to use the package mechanism and have devices upgrade themselves. From there, you can take it further, e.g. using signed packages, dual-boot systems, etc.
    You'll have to be way more specific if you want to get specific solutions to your specific problem.

  • May LV for Linux run in embeded linux system with ARM9 ?

    Hello All,
    May LV for Linux run in embeded linux system with ARM9 ?
    Tks and best regards!
     Bright

    No, it will only run on Intel compatible processors.
    You'll need LV Microprocessor SDK for that (AKA LVEmbedded). But you'll lose
    the MMI. And you need to build toolchains yourself (although there is a
    cygwin example shipped, and converting it to any gcc toolchain is not that
    difficult).
    There is a special LV MSDK for ARM processors, but not for all of them.
    Regards,
    Wiebe.

  • 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.

  • Problems with WLST embedded in java app.

    Hi,
    I have a problem with the WLST embedded in a java app.
    I want to programatically create or reconfigure a domain from a java application. Following is a simple example of what I want to do.
    import weblogic.management.scripting.utils.WLSTInterpreter;
    public class DomainTester {
      static WLSTInterpreter interpreter = new WLSTInterpreter();
      private void processDomain() {
        if(domainExists()) {
          System.out.println("Should now UPDATE the domain");
        } else {
          System.out.println("Should now CREATE the domain");
      private boolean domainExists() {
        try {
          interpreter.exec("readDomain('d:/myDomains/newDomain')");
          return true;
        }catch(Exception e) {
          return false;
    }The output of this should be one of two possibles.
    1. If the domain exists already it should output
    "Should now UPDATE the domain"
    2. If the domain does not exist it should output
    "Should now CREATE the domain"
    However, if the domain does not exist the output is always :
    Error: readDomain() failed. Do dumpStack() to see details.
    Should now UPDATE the domain
    It never returns false from the domainExists() method therefor always states that the exec() worked.
    It seams that the exec() method does not throw ANY exceptions from the WLST commands. The catch clause is never executed and the return value from domainExists() is always true.
    None of the VERY limited number of examples using embedded WLST in java has exception or error handling in so I need to know what is the policy to detect failures in a WLST command executed in java??? i.e. How does my java application know when a command succeeds or not??
    Regards
    Steve

    Hi,
    I did some creative wrapping for the WLSTInterpreter and I now have very good programatic access to the WLST python commands.
    I will put this on dev2dev somewhere and release it into the open source community.
    Don't know the best place to put it yet, so if anybody sees this and has any good ideas please feel free to pass them on.
    Here is the wrapper class. It can be used as a direct replacement for the weblogic WLSTInterpreter. As I can't overload the actual exec() calls because I want to return a String from this call I created an exec1(String command) that will return a String and throw my WLSTException which is a RuntimeException which you can handle if you like.
    It sets up stderr and stdout streams to interpret the results both from the Python interpreter level and at the JVM level where dumpStack() just seem to do a printStackTrace(). It also calls the dumpStack() command should the result contain this in its text. If either an exception is thrown from the lower level interpreter or dumpStack() is in the response I throw my WLSTException containing this information.
    package eu.medsea.WLST;
    import java.io.ByteArrayOutputStream;
    import java.io.PrintStream;
    import weblogic.management.scripting.utils.WLSTInterpreter;
    public class WLSTInterpreterWrapper extends WLSTInterpreter {
         // For interpreter stdErr and stdOut
         private ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
         private ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
         private PrintStream stdErr = new PrintStream(baosErr);
         private PrintStream stdOut = new PrintStream(baosOut);
         // For redirecting JVM stderr/stdout when calling dumpStack()
         static PrintStream errSaveStream = System.err;
         static PrintStream outSaveStream = System.out;
         public WLSTInterpreterWrapper() {
              setErr(stdErr);
              setOut(stdOut);
         // Wrapper function for the WLSTInterpreter.exec()
         // This will throw an Exception if a failure or exception occures in
         // The WLST command or if the response containes the dumpStack() command
         public String exec1(String command) {
              String output = null;
              try {
                   output = exec2(command);
              }catch(Exception e) {
                   try {
                        synchronized(this) {
                             stdErr.flush();
                             baosErr.reset();
                             e.printStackTrace(stdErr);
                             output = baosErr.toString();
                             baosErr.reset();
                   }catch(Exception ex) {
                        output = null;
                   if(output == null) {
                        throw new WLSTException(e);
                   if(!output.contains(" dumpStack() ")) {
                        // A real exception any way
                        throw new WLSTException(output);
              if (output.length() != 0) {
                   if(output.contains(" dumpStack() ")) {
                        // redirect the JVM stderr for the durration of this next call
                        synchronized(this) {
                             System.setErr(stdErr);
                             System.setOut(stdOut);
                             String _return = exec2("dumpStack()");
                             System.setErr(errSaveStream);
                             System.setOut(outSaveStream);
                             throw new WLSTException(_return);
              return stripCRLF(output);
         private String exec2(String command) {
              // Call down to the interpreter exec method
              exec(command);
              String err = baosErr.toString();
              String out = baosOut.toString();
              if(err.length() == 0 && out.length() == 0) {
                   return "";
              baosErr.reset();
              baosOut.reset();
              StringBuffer buf = new StringBuffer("");
              if (err.length() != 0) {
                   buf.append(err);
              if (out.length() != 0) {
                   buf.append(out);
              return buf.toString();
         // Utility to remove the end of line sequences from the result if any.
         // Many of the response are terminated with either \r or \n or both and
         // some responses can contain more than one of them i.e. \n\r\n
         private String stripCRLF(String line) {
              if(line == null || line.length() == 0) {
                   return line;
              int offset = line.length();          
              while(true && offset > 0) {
                   char c = line.charAt(offset-1);
                   // Check other EOL terminators here
                   if(c == '\r' || c == '\n') {
                        offset--;
                   } else {
                        break;
              return line.substring(0, offset);
    }Next here is the WLSTException class
    package eu.medsea.WLST;
    public class WLSTException extends RuntimeException {
         private static final long serialVersionUID = 1102103857178387601L;
         public WLSTException() {
              super();
         public WLSTException(String message) {
              super(message);
         public WLSTException(Throwable t) {
              super(t);
         public WLSTException(String s, Throwable t) {
              super(s, t);
    }And here is the start of a wrapper class for so that you can use the WLST commands directly. I will flesh this out later with proper var arg capabilities as well as create a whole Exception hierarchy that better suites the calls.
    package eu.medsea.WLST;
    // Provides methods for the WLSTInterpreter
    // just to make life a little easier.
    // Also provides access to the more generic exec(...) call
    public class WLSTCommands {
         public void cd(String path) {
              exec("cd('" + path + "')");
         public void edit() {
              exec("edit()");
         public void startEdit() {
              exec("startEdit()");
         public void save() {
              exec("save()");
         public void activate() {
              exec("activate(block='true')");
         public void updateDomain() {
              exec("updateDomain()");
         public String state(String serverName) {
              return exec("state('" + serverName + "')");
         public String ls(String dir) {
              return exec("ls('" + dir + "')");
         // The generic wrapper for the interpreter exec() call
         public String exec(String command) {
              return interpreter.exec1(command);
         private WLSTInterpreterWrapper interpreter = new WLSTInterpreterWrapper();
    }Lastly here is some example code using these classes:
    its using both the exec(...) and cd(...) wrapper commands from the WLSTCommand.class shown above.
        String machineName = ...; // get name from somewhere
        try {
         exec("machine=create('" + machineName + "','Machine')");
         cd("/Machines/" + machineName + "/NodeManager/" + machineName);
         exec("set('ListenAddress','10.42.60.232')");
         exec("set('ListenPort', 5557)");
        }catch(WLSTException e) {
            // Possibly the machine object already exists so
            // lets just try to look it up.
         exec("machine=lookup('" + machineName + "','Machine')");
    ...After this call a machine object is setup that can be allocated later like so:
         exec("set('Machine',machine)");Regards
    Steve

  • Embedding The "Java DB" in a JNLP app

    Has anyone embedded Sun's "Java DB" in a JNLP application? See http://developers.sun.com/prodtech/javadb/ if you are unfamilar, though the answer would be no in your case.
    I have a JNLP system 3/4 complete using HSQL, http://hsqldb.org/ , with 20 tables, views, & about 80 mb of data uncompressed. I take HSQL from source code, and put it right into my signed jar. After removal of the database manager utility & obfuscation, it takes about 300k. While I am happy, I just want to make sure I have made the right choice. Java DB says it's "ideal" for embedding, yet does not even mention Java Webstart. Not confidence inspiring.
    The one thing I am interested in that Java DB says it does, but HSQL does not, is datafile encryption.
    The things that concern me are:
    - Is 2mb, Java DB's jar sizes, cause problems for downloading a jar file?
    - Does the encryption turn it into a dog?
    - Has anyone ever run both for the same application, and formed an opinon?
    I know, I would need to sign Sun's jars for this to have access to the file system. Any other thoughts that would keep me from wasting a week to find out?
    Thanks,
    Jeff

    I am responding to this because I have an interest in
    JWS launched D/B's (embedded or otherwise) and
    recently began doing some initial experiments using
    the Apache Derby D/B. My experimetns have not
    actually progressed to JWS launch of the D/B quite yet.
    As such, I cannot comment on most of the things you
    asked, however..
    The things that concern me are:
    - Is 2mb, Java DB's jar sizes, cause problems for
    downloading a jar file?For who? The end user?
    'It depends'. I would be very angry to be an end-user
    that downloads 2 Meg. of data just to have 'scrolling
    messages' drift across the screen.
    OTOH, if the D/B is vital to my job, a 3-4 minute
    download (of classes that are installed and
    cached locally) is 'no big deal'.
    I know, I would need to sign Sun's jars for this to
    have access to the file system. Not necessarily. Web-start offers other mechanisms
    for JWS untrusted applications to gain access to local
    files (e.g. FileOpenService/FileSaveService).
    The code to utilise these JNLP API services is
    quite different to the code you might use in the
    J2SE though, so it is more a strategy you might
    pursue for new a project, where all that code is
    yet to be written.
    For an existing desktop application that is about to
    be wrapped in web-start, it is usually difficult, if
    not impossible, to translate what it does into
    equivalent JNLP API services, and a lot easier to
    sign it and request either 'all-permissions' or
    'j2ee-application-client' permissions in the JNLP.
    If you need to sign it, Ant makes a light task of it.

  • 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.

  • OpenGL embeded in Java

    I new in OpenGL and Java.
    So, I want to ask a following question:
    1. Is openGL library file which used in Java same with in C++?
    If not, where I can get that OpenGL file?
    2. Is use OpenGL in Java same with in C++?
    But in C++ some of file OpenGL is embeded in C++ directory like include and lib,
    How about in Java? Where I can get a procedure for that?
    Thank you very much

    This question would probably get better replies at the gaming forum, but I've heard some people use JOGL to interface OpenGL from Java https://jogl.dev.java.net/

  • 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

Maybe you are looking for

  • Now can't get back to my first question for you! Hate new Firefox - how to revert?

    Well, I just asked a question about bookmarks - they are lost after updating Firefox. Now can't even find them anywhere. My computer switched to Yahoo! and I want to use original Yahoo. Strongly dislike new toolbar - where is print, etc.? I can't get

  • E3000 file and printer sharing issues

    Yes, there is at least one other thread on this but it looked a bit stale. Last Friday I replaced my BEFSR41 router and WRT54G wireless access point (which had gone brick on me) with an E3000.The E3000 is configured as a DHCP server at 192.168.168.65

  • Process flow problem

    I have a process flow in dev A---->B--->C----->D--->Send Success Email. This is running fine in dev. But I exported it and imported in my test env. Now my process flow is not behaving correctly. It runs A and D together parallelly and it does not run

  • Oracle Management Server Service not created

    Hello, I created a Management Server Repository using OEMCA and an existing SID. According to the details displayed at the end of the wizard I assume that the process was finished successfully: (NT-Service OracleOraHome81 ManagementServer is started.

  • Bug in Track Naming when importing folder?

    Hey All- Hopefully this is an easy problem to fix! I just imported my entire mp3 collection which on my HD labeled like this: D:\mp3\Artist - Album\01 - Track Name.mp3 ... and so forth. I have spent alot of time making sure all my tags are correct; e