Results 1 to 4 of 4

Thread: Java and Simba

  1. #1
    Join Date
    Mar 2012
    Posts
    201
    Mentioned
    8 Post(s)
    Quoted
    74 Post(s)

    Default Java and Simba

    Basically, all I'm asking is:

    Can Java API's be invoked in simba; I understand that simba does have facility to interact with Java directly as that is how smart works. Just curious as to how it's done?

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by fish1328 View Post
    Basically, all I'm asking is:

    Can Java API's be invoked in simba; I understand that simba does have facility to interact with Java directly as that is how smart works. Just curious as to how it's done?

    JNI. Simba can load a module and that module can spawn a JVM with the application running. Invoke application functions using jni.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Expanding on this:

    Java creates, unlike most other languages/compilers, no native code which can be read by a computer itself. Where FreePascal or Microsoft visual C++ creates an executable or library with compiler instructions, java creates a different kind of instruction set. They call it bytecode. Similar to the native instructions, but different.

    Java has to be installed on the user their computer if they want to run java programs. This is called the JRE(Java Runtime Environment), basically a combination of a library, framework and bytecode to native instruction translator. It reads the java program and displays it on the user. There is an JRE for windows, mac, linux and tons of other devices. It contains tools to mimics an simple/basic computer capable of running the java program. And output the program to the real computer. All programs will look the same on various devices, it will work on all processors that got an JRE written for.

    If you want to run and communicate with a java program you can't do it directly as you can do with an .dll(library). The java program has to be run with the jre. This can be done by creating an JVM(Java Virtual Machine) to run the program. This is similar to what SMART does, but also how your browser works.

    If you then want to communicate with that program you need to use the JNI(Java Native Interface). This will function as the interface between your native application(SMART or whatever) and the java program.

    I don't think there is another way.
    Working on: Tithe Farmer

  4. #4
    Join Date
    Mar 2012
    Posts
    201
    Mentioned
    8 Post(s)
    Quoted
    74 Post(s)

    Default

    There isn't another way... I assumed that simba files were compiled to java bytecode and then ran in a jvm haha; not compiled to machine code

    Err, I'm useless at simba. Say I had a executable jar file in the simba installation folder; how would I run it (No interaction is needed; it only needs to run)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •