Jump to content
Excelsior Forums

xcr

Members
  • Content count

    0
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by xcr


  1. Hello,

    The applications is one exe and other jars compiled into DLLs.

    My question is if the size and amount of dependencies affect the startup time of the application?

    Yes, splitting an application into multiple components may reduce startup time due to loading the libraries.

    Also it may significantly reduce the effect of using the Startup Optimization Toolkit included with Excelsior JET.

    For more details, please see "Startup time optimization" chapter of the documentation.

    Best Regards,

    Svyatoslav


  2. I have 4 PC's running game clients and at least once a day one of them quits to desktop, and others just keep on running.

    Does the crash occurs on the same PC every time?

    If so, is there any differences in OS configurations of PCs?

    Which version of JET do you use?

    Does anything appear in dmesg output or syslog when the crash occurs?


  3. Hi,

    Could you please show your LD_LIBRARY_PATH value?

    (run

    echo $LD_LIBRARY_PATH

    in console)

    Also, please enable full stack trace support at page "Target" of JET Control Panel, re-compile, re-pack and re-install your application.

    Then please run it again and post a stack trace here.


  4. "resistance to SA_RESTART flag" is fact that application will not misbehave (will write correct number of bytes) when it receives SA_RESTART flag in signal.

    SA_RESTART flag itself does not make the application to misbehave,

    it actually helps to cut off possible problems caused by wrong handling of EINTR.

    The application misbehaves due to wrong handling of interruption.

    With disabled SA_RESTART flag the write issue can not disappear.

    But some new issues may pop up.

    I would like to know how can i send in automated way multiple number of signals to my application that will check correct handling of write interruption.

    Please try to stress test thread executing this native code with Thread.suspend()/resume().


  5. It is actually not a defect.

    The location of Special Windows Folders (like the Application Data, My Documents etc.) depends on installation type: Common or Personal. Special folder "Application Data", it is resolved by "CSIDL_APPDATA" or "CSIDL_COMMON_APPDATA" depending on installation type.

    CSIDL_APPDATA - The file system directory that serves as a common repository for application-specific data. A typical path is C:\Documents and Settings\username\Application Data.

    CSIDL_COMMON_APPDATA - The file system directory that contains application data for all users. A typical path is C:\Documents and Settings\All Users\Application Data. This folder is used for application data that is not user specific.

    You can select which type of installation better suits your needs from the "Installation type" combo box which is located on the page "Settings", tab "Install".

    The following options are available:

    Auto-detect - if the logged user has required administrative rights, the application will be installed as "Common" and will be available for all the users of that machine. Otherwise the application will be installed as "Personal" and will be available only for the user that installed it.

    User decide - if the user has administrative rights he will be prompted to select installation type. Otherwise, the application will be installed as "Personal".

    Common - the application will be available for all the users of that machine. If the logged user is not a member of the "Administrators" user group, he will be notified that administrative privileges are required to install the application.

    Personal - the application will be available only for the user that installed it. It is supposed that the installation does not require administrative privileges.

    So if you want your application to be installed to user's application data, please choose "Personal".


  6. What other calls apart from write can be interrupted? Can you refer me to some documentation?

    Please start with section "Interruption of system calls and library functions by signal handlers"

    at http://man7.org/linux/man-pages/man7/signal.7.html

    Note that we use SA_RESTART flag.

    How do you recommend us to fix/workaround 3rd party JNI libs for which we will never have the source code?

    The assumption that a system call from a native library will never be interrupted is wrong.

    It is not enforced by the Java specification, so using a system call without checking if it was interrupted is a bug.

    Even having the source code of Excelsior JET you can't do anything to reliably work around this bug in the library if you don't have its source code.

    So the only recommendation is to contact the authors of the library and ask them to fix it, because it is much easier to fix a library than to re-implement threading in VM.


  7. Implementation of threading in Excelsior JET VM differs from that of Oracle JVM.

    Although we use signal handling in our implementation for Linux, it still complies with the Java specification,

    which is also confirmed by the fact that Excelsior JET passes JCK.

    On the other hand, the behavior of write call when it writes only a part of data is expected and described in its documentation.

    Sometimes it happens that an application or native library works on Oracle JVM but does not work

    on Excelsior JET (and some other VMs too) due to relying on implementation features not enforced by the Java specification.

    You may find other examples of such problems in the pinned topics of "Defect Reports" on the forum.


  8. You are welcome!

    Also, this method requires to create a batch script, so it may be inconvenient.

    Here are the alternatives:

    1) You can build your application with fake empty audio.zip file, opting not to pack it in executable in JET Control Panel,

    then add it to the installation package on "Resources" page of JetPack II. So it will be included to the classpath.

    After installation the fake empty archive can be replaced by the real one.

    2) You can create multi-app executable by choosing the corresponding option on the "Target" page of JET Control Panel.

    This executable may take "java.class.path" property from its arguments.

    So then in JetPack II you can choose corresponding application shortcut on tab "Shortcuts" on page "Misc"

    and specify application classpath by adding "-Djava.class.path=<classpath>" to its arguments.


  9. Then you can do this by explicitly specifying classpath for deployed application before launching it by using environment variable JETVMPROP.

    You should add "-Djava.class.path=<classpath>" to it, where <classpath> should be replaced by classpath which your deployed application uses including path to audio.zip.

    For example:

    set JETVMPROP="-Djava.class.path=.\resources\audio.zip"
    App.exe
    

    Please try to do this and let us know if it helps.


  10. You can also try the following solution:

       public audio(String audioFile) {
           try
           {
               AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(audioFile));
    
               DataLine.Info info = new DataLine.Info( Clip.class, audioInputStream.getFormat() );
               final Clip clip = (Clip) AudioSystem.getLine(info);
    
               clip.addLineListener(new LineListener() {
                   public void update(LineEvent e) {
                       if (e.getType() == LineEvent.Type.STOP) {
                           synchronized(clip) {
                               clip.notify();
                           }
                       }
                   }
               });
               clip.open(audioInputStream);
    
               clip.start();
               synchronized (clip) {
                   clip.wait();
               }
               clip.drain();
               clip.close();
           }
           catch (Exception ex)
           {
               ex.printStackTrace();
           }
       }
    

    (based on http://www.ibm.com/developerworks/java/library/j-5things12/index.html#N101F8)

    It works well on my system.


  11. Hello,

    First of all, you should go to Excelsior JET directory (/excelsior/jet7.6-eval) and run

    . setenv

    This will add JET directories to your PATH environment variables.

    Then you can compile Tomcat with applications from command line using the following command:

    jc =tomcat /prd/rsp/tomcat6.0/

    Alternatively, you can create project file (.prj) using JET Control Panel on Windows, and then use on Linux

    jc =p your_project_file.prj

    You should run this command from the same directory, where the project file is located, and its relative path to Tomcat directory should be the same as on the system where you have created the project file.


  12. Do you use 64-bit CentOS?

    This may cause the problem, since JET is 32-bit.

    If your CentOS is 32-bit, the following is irrelative.

    Do you have 32-bit version of libnss_ldap.so.2 library in your system?

    It should be found at /lib or /lib32

    To ensure it is 32-bit, you may check it with "file -L":

    $ file -L /lib/libnss_ldap.so.2 
    /lib/libnss_ldap.so.2: ELF 32-bit ...
    

    Also, to check if a 32-bit program on your system may correctly get passwd info from LDAP directory,

    please compile the test program from my previos post in 32-bit mode and run it.

    If you do not have a 32-bit Linux machine to easily compile the program, you may use the following command:

    gcc -m32 test.c

    (Probably it requires to install additional packages with 32-bit development files).


  13. passwd: files ldap

    It looks correctly.

    Please run the following command in your terminal:

    getent passwd $(id -u)
    

    Does it output user info correctly, or silently exits?

    Also, if you can compile a C program, could you please build and run the following test:

    #include <stdio.h>
    #include <pwd.h>
    #include <unistd.h>
    #include <errno.h>
    
    int main() {
           struct passwd * pw = getpwuid(getuid());
    
           if(pw == NULL) {
                   printf("No user info found; errno=%d\n", errno);
           } else {
                   printf("name\t%s\nuid\t%d\nhome\t%s\n", pw->pw_name, pw->pw_uid, pw->pw_dir);
           }
    
           return 0;
    }
    

    Does it output your user info? If it does not, what message does it show?

×