Is Java Compiler a part of JVM or JRE but not JVM? ?

hi friends... i need clarification....I am completely confused about how things go about from d time v compile to execution...Please can anybody give me a complete description

Ok fine.....thanks....But suppose now i take a
compiled program from 1 m/c to another....Now JIT
comes into picture....So JIT must understand
bytecodes....So does JIT belong to JRE ....Correct me
if i am wrongJIT belongs to the JVM.
Could you please have the courtesy of not typing like a seven-year-old girlie?

Similar Messages

  • Why are Java SASLFactories missing when called via PL/SQL but not from JRE?

    Hi
    This may be quite a technical point about SASL and JCE Providers etc OR it may just be a question about how Oracle PL/SQL interfaces with Java.
    The background is that I am trying to get a Java opensource library to run in Oracle DB - this is for specialized communication from Database to other servers.
    The library uses a SASL mechanism to authenticate with the server and this (appears) to rely on JCE Providers installed and provided by the JRE.
    I have some Java code working which uses the library - this runs OK in NetBeans/Windows environment and also using Linux/Oracle JRE directly such as:
      +# $ORACLE_HOME/jdk/bin/java -classpath "./MyMain.jar:./OtherSupport.jar" package.TestClient+
    However it refuses to work (throws a NullPointerException) when called from PL/SQL.
      +FUNCTION send_a_message (iHost IN VARCHAR2,+
         iPort IN NUMBER,
        +iLogin IN VARCHAR2,+
        +iPasswd IN VARCHAR2,+
         iRecipient IN VARCHAR2,
         iMessage IN VARCHAR2) RETURN NUMBER
       AS LANGUAGE JAVA
       NAME package.TestClient.sendATextMessage(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String) return int';
    In the Java code this is:
       public static int sendATextMessage(String iHost,
         int iPort,
         String iLogin,
         String iPasswd
         String iRecipient,
         String iMessage)
    I've tracked the issue down to there being no SaslClientFactories (via Sasl.getSaslClientFactories()) showing when called from PL/SQL whereas 3 are available when run from within Java directly. This via:
       Enumeration<SaslClientFactory> facts = Sasl.getSaslClientFactories();
       System.out.println("Found Sasl Factories [" & (facts != null)  & "] size[" & Collections.list(facts).size() & "]");
    So, is there some aspect of Java initialisation that I'm missing when calling from PL/SQL (which means SASL factories aren't getting loaded into JRE) or is there something different in SASL setup?
    Any pointers appreciated.
    Thanks
    Dave

    Ok, after a bit of reading and general hacking about I have got this working.
    What I hadn't initially understood/remembered is that for a Stored Procedure the JVM installed on file system with Oracle isn't actually used - java code is loaded into the database and hence a different set of base functions are available. The following is a good explanation of this http://docs.oracle.com/cd/B14117_01/java.101/b12021/appover.htm#BGBIBDAJ
    So "out of the box" the Oracle Database appears to come loaded with only two of the Sun security providers i.e. no com.sum.security.SASL
    >
    OBJECT_NAME             OBJECT_TYPE     STATUS   TIMESTAMP
    com/sun/security/auth/NTSid  JAVA CLASS    VALID   2013-02-14:14:08:57
    com/sun/security/jgss/GSSUtil    JAVA CLASS    VALID   2013-02-14:14:08:57
    >
    This is from:
    >
    SELECT
      object_name,
      object_type,
      status,
      timestamp
    FROM
      user_objects
    WHERE
      (object_name NOT LIKE 'SYS_%' AND
       object_name NOT LIKE 'CREATE$%' AND
       object_name NOT LIKE 'JAVA$%' AND
       object_name NOT LIKE 'LOADLOB%') AND
       object_type LIKE 'JAVA %' AND
       object_name LIKE 'com/sun/security%'
    ORDER BY
      object_type,
      object_name;
    >
    My solution (which may well be a work-around) is the following:
    1) Downloaded JDK Source and extracted "com.sun.security.sasl" java code to my project
    2) Added following code to my Stored Procedure ()
    >
    Enumeration<SaslClientFactory> saslFacts = Sasl.getSaslClientFactories();
    if (!saslFacts.hasMoreElements()) {
      System.out.println("Sasl Provider not pre-loaded");
      int added = Security.addProvider(new com.sun.security.sasl.Provider());
      if (added == -1) {
        System.out.println("Sasl Provider could not be loaded");
        System.exit(added);
      else {
        System.out.println("Sasl Provider added");
    >
    3) Built my JAR file with the sasl package embedded (note: could only find Java 6 code, so had to comment out some GSS lines - but wasn't intending to use these)
    4) Loaded JAR to oracle via "loadjava".
    5) Add permissions (only found this out after a couple of failed runs)
    >
    call dbms_java.grant_permission('XMPP', 'SYS:java.security.SecurityPermission', 'putProviderProperty.SunSASL', '' );
    call dbms_java.grant_permission('XMPP', 'SYS:java.security.SecurityPermission', 'insertProvider.SunSASL', '' );
    >
    6) Run gives the following:
    >
    Sasl Provider not pre-loaded
    Sasl Provider added
    ...etc...
    >
    It works!. I confess I'm not sure of the implications of this for multiple calls/performance and if it will need to be added for each stored procedure call - may post back.
    For completeness I should point out that after my load the Security providers look like this:
    >
    OBJECT_NAME             OBJECT_TYPE     STATUS   TIMESTAMP
    com/sun/security/auth/NTSid    JAVA CLASS    INVALID  2013-02-15:09:11:36
    com/sun/security/jgss/GSSUtil    JAVA CLASS    INVALID  2013-02-15:09:11:37
    com/sun/security/sasl/Provider    JAVA CLASS    VALID    2013-02-15:10:03:21
    >
    i.e. the original couple are "INVALID" !
    Dave
    Edited by: 946763 on Feb 26, 2013 2:35 AM

  • Portal Web parts work fine on server but not Windows 7 Machines

    Hi
    I was testing the Service Manager Portal on the server and couldn't get the web parts to load.
    I followed the steps here in this blog:
    http://www.code4ward.net/main/Blog/tabid/70/EntryId/139/Service-Manager-2012-Self-Service-Portal-not-working-blank.aspx
    Where I added FQDN to the URL.
    The webparts appear now when the page is loaded directly on the server.
    But from a client Windows 7 machines the Portal is still blank with all the web parts not loading?
    Any ideas?

    The most common reason for the silverlight parts not loading is a certificate issue on the web content service.  you might also check
    This blog Post for troubleshooting options.

  • FF plugin checking reports java applet plugin vulnerable on OS X Lion but not Snow Leopard?

    On Firefox 10.0.1 running on OS X 10.7.3, the mozilla.org plugincheck tells me that my Java Applet Plug-in is Vulnerable while running the same check on FF 10.0.1 on my Mini running 10.6.8 indicates that the Java Plu-in 2 for NPAPI Browsers is ok. The version of Java on both systems is the same (version 1.6.0.29). Why the discrepancy? Is there something I need to fix on the 10.7.3 system?

    No because Java on OS X comes from Apple, not Oracle and is updated whenever Apple gets around to it.

  • Our business require to download & install SAP Java GUI 720. Able to download it but not to install due to "security preferences" restriction. Any suggestion?

    GE Energy requires us to use SAP for business. I downloaded the SAP Java GUI 720, can see it in the download window. But once I try to install it, the following message is shown: "SAP Java GUI 720 MacOSX.JAR” can’t be opened because it is from an unidentified developer. Your security preferences allow installation of only apps from the Mac App Store and identified developers."
    Please let me know if there is a way to change the security settings in order to install SAP on MacBook Air.

    Hello,
    To change the security settings go to:
    '''System Preferences''' >''' Security & Privacy'''.
    On the '''General Tab''' click the '''little lock''' in the lower left corner to '''unlock the general preference pane'''. Then select the ''''Anywhere'''' radio button beneath "'''Allow applications downloaded from'''" then confirm.
    If you need more assistance just ask for it :)
    Sincerly,
    Black Thunder.

  • I just bought an ipod classic and synched with itunes.  The main part showed up on ipod but not the playlists.  How can I get playlist to appear on ipod.  Thanks!

    I bought a new ipod classic.  When attempting to synch it made me update itunes to the latest version (there may be a more current one now.)  I did this and when I synched to ipod everything showed up except the playlists.  How do I get the playlist to synch to ipod as well?  Thanks!

    Connect it to your computer and restore it as a new device. Then chose what music you want to sync with it and do so just like your Touch does.

  • Oracle Java Compiler 11g - JVM ERROR

    Hi Jdev Team,
    I have an issue to report,
    Sometimes when run a project and navigate through the pages, i get the following error message:
    Oracle Java Compiler 11g
    Unable to create an instance of the Java Virtual Machine
    Located at path:
    H:\jdevstudio1111\jdk\jre\bin\client\jvm.dll
    The only way to solve this is delete the settings of the Jdev and the Jdev from the PC, and install again, with the associated waste of time as consecuence. Please you can give a light to resolve this issue? Thanks
    Well i correct what i just said.
    The problem doesn´t fix, with the erase of the jdev program folder or settings folder in windows user docs and settings. What else i can do!?, out of ideas in here.
    Regards,
    Leo
    Message was edited by:
    LCJ

    Solution (workaround):
    Re: ADF table and filtering
    Pedja

  • Compiling Java compiler code?

    Hi..
    I came to know that java compiler itself is written in Java language. If i am wright then please tell me what is the compiler used to compile and produce *"javac"* executable file.

    ejp wrote:
    Originally, i.e. in about 1994, there had to be a compiler written in another language, probably C++, but that would have been dropped immediately there was a working Java version.Just for the record: IBM produced a Java compiler written in C++, called Jikes. It was a very active project and actively used in many places. It was the fastest Java compiler there was at the time (remember: JVMs weren't always as optimized as they are these days), which made it the primary compiler for many developers. At some point, however the Java compilers written in Java started to get as fast as Jikes (at least partially because the JVM got faster) and the advantage of Jikes was reduced. These days I hardly ever see Jikes used in actual development.
    Also, don't confuse Jikes with the [Jikes RVM|http://jikesrvm.org/], which is a Java virtual machine written in Java. So to summarize: Projects containing "Jikes" in their name seem to focus on implementing Java-related infrastructure parts using the "wrong" language.
    Edited by: JoachimSauer on Jul 8, 2010 10:30 AM

  • IS a thread scheduler part of JVM or OS ?

    Hi Folks,
    Just curious if the thread scheduler is a part of the JVM or OS, or either or both ?
    I tried few thread pages in JLS,but couldnot locate the exact sentence describing this.
    However some other resources have given me contradicting information.
    For example, [Reference1|http://www.deitel.com/articles/java_tutorials/20051126/JavaMultithreading_Tutorial_Part3.html] states that it is a part of the OS,whereas [Reference2|http://book.javanb.com/java-threads-3rd/jthreads3-CHP-9-SECT-1.html] states that it is a part of both.(I am not sure about the authority of these links.)
    So assuming, thread scheduling is done by JVM it is a part of the JVM only or it uses the underlying OS for support.
    Thank you for the consideration.

    This statement:
    The JVM ... operates like a mini OS and schedules its own threads regardless the underlying operating system.flatly contradicts this statement:
    In some JVMs, the java threads are actually mapped to native OS threads.They cannot both be true.
    Therefore we can say that Threads are part of JVM and OS bothRubbish. There's no 'therefore' about it. You can't draw valid logical inferences from contradictions.
    Guesswork and invalid inferences aside, the fact of the matter is that the semantics of Java threads are specified in the JLS but the execution mechanism is not. 'Any execution strategy that generates only allowed behaviors is an acceptable execution strategy.'
    I am not sure about the authority of these linksNil. They are extracts from books by third parties. Use at own risk. The JLS is where the authority is.
    Reference 2 is particularly poor, as it contradicts itself numerous times.
    For the record, Reference 2 also makes the following claims which as far as I can see are entirely baseless, for the reasons given:
    A Java virtual machine is required to implement a preemptive, priority-based schedulerThe word 'pre-emptive' does not appear in the JLS.
    The Java virtual machine never changes the priority of a thread, even if the thread has been running for a certain period of timeCan't find that anywhere either.
    the contract between the Java virtual machine and the underlying operating system is that the operating system must generally choose to run the Java thread with the highest priorityThe 'contract' is between the Java code and the JVM, not the JVM and the O/S.
    That's what we mean when we say that Java implements a priority-based schedulerJava isn't required to 'implement' a scheduler at all.
    This scheduler is implemented in a preemptive fashion, meaning that when a higher-priority thread comes along, that thread interrupts (preempts) whatever lower-priority thread is running at the time.This appears nowhere in the JLS.
    The contract with the operating system, however, is not absolute, which means that the operating system can sometimes choose to run a lower-priority thread.In other words it's not pre-emptive. Make up your mind.
    Java's requirement for a priority-based, preemptive scheduling mechanism ...Which is nowhere to be found.
    A Java thread can have one of 11 prioritiesMIN_PRIORITY is 1, MAX_PRIORITY is 10: that makes 10, not 11.
    In fact, preemption means only that a higher-priority thread runs instead of a lower-priority oneNo it doesn't. It means that when a higher-priority thread becomes ready it pre-empts the execution of any lower-priority threads that are currently executing regardless of time-slice etc. This is a feature of real-time systems that Java is not required to implement.
    Summing up, the words 'pre-emptive' does not appear in the JLS, and the word 'scheduler' only appears in reference to sleep() and yield(), without any implication that the JVM has to implement one itself.

  • Java Compilation

    Hi ,
    I want to know how the JAVAC and JAVA command works internally. And also the JVM and JDK architecture to understand the java compilation and execution process. Can anybody help me out .
    Thanks
    Raghav

    raghav1212 wrote:
    Hi ,
    I want to know how the JAVAC and JAVA command works internally. And also the JVM and JDK architecture to understand the java compilation and execution process. Can anybody help me out .Well time to study generic compiler theory then. Its a fun fun world of abstract syntax trees, lexical analysis, etc. etc. Your question is not Java programming related in any case and certainly not something to pose in a forum - perhaps you can find a good book on compiler theory. Its very complex material, I warn you.

  • Java Compilation Process and how it relates to portability

    I need to know more about the java compilation process, how it achieves porability and its drawback and benifits. Can anyone help me with a link or an answer?
    Help would be much appriciated!

    javac, the Java compiler, is written in Java itself. It generates .class
    files from your .java source files. Those .class files are loaded by the
    JVM (the Java Virtual Machine) and executed. The javac compiler
    itself consists of just a bunch of those .class files and the compiler
    doesn't even know on what platform it is running while compiling
    your .java files.
    If you simply carry over the tools.jar file (and some other .jars) in which
    the package com.sun.tools.javac resides to another platform where a
    JVM is installed you can compile your .java files on that other platform
    too. And those compiled classes will run on that platform too ;-)
    kind regards,
    Jos

  • 32-bit JVM receiving Java objects from 64-bit JVM

    Hi folks,
    Question is: will there be problems for 32-bit JVM receiving Java objects from 64-bit JVM? and vice versa.
    Our application client is running on 32-bit JVM, our server is running on 64-bit JVM. Client will send Java objects to server, and vice versa.
    My past experience suggested when sending Java objects between client and server, both client and server needs to be compiled under the same JVM version. Any advice?
    Christy

    My past experience suggested when sending Java
    objects between client and server, both client and
    server needs to be compiled under the same JVM
    version. Any advice?This is only a case if you omit explicit serialVersionUID. My advice is to ALWAYS specify it for classes you want to serialize over the wire or put into persistent storage. It is way too tricky to rely on default one to fail half a year later when some new programmer adds one new public method to a class.
    Unless you need to deserialize already existing resources, there is no need to put any magic number in serialVersionUID - just put 1 for every class you create and possibly increase it by 1 every time you want to make incompatible version (which is not happening so often, as in real world you often try to stay as compatible as possible)

  • Tomcat/Java Compiler crash

    The following issue is running on a HP/UX 11i V2 Itanium Superdome server.
    We have a vendor application being deployed with Tomcat. The versions of Tomcat and java are:
    Tomcat is 5.0.28 (required by vendor)
    java is 1.4.2.10 (required by vendor)
    Tomcat is randomly crashing with the following:
    SIGSEGV 11* segmentation violation
    si_signo [11]: SIGSEGV 11* segmentation violation
    si_errno [0]: Error 0
    si_code [2]: SEGV_ACCERR [addr: 0xc00]
    Aborting...
    Unexpected Signal : 11 occurred at PC=0xC56EF780
    Function=_ZN7RegMask3ANDERKS_
    Compiler thread crashed while compiling a method!
    Compiled method class=ibi.broker.util.RCDES
    Compiled method name=getStringFromHexString
    Compiled method signature=(Ljava/lang/String;)Ljava/lang/String;
    Library=/opt/java1.4/jre/lib/IA64N/server/libjvm.so
    Current Java thread:
    "CompilerThread0" daemon prio=7 tid=00064c50 nid=9 lwp_id=3017 runnable [0x00000
    000..0x6a4001f8]
    This is a problem with java compiling a method out of a class/jar file, correct? So, I added the following directive in the catalina.sh file for the JAVA_OPTS:
    -XX:CompileCommand= exclude,ibi/broker/util/RCDES,getStringFromHexString
    This should prevent the suspect method from getting compiled. And it does. The catalina.out file has
    ### Excluding compile: ibi.broker.util.RCDES::getStringFromHexString
    which verifies this.
    Well, then vendor thinks this is a problem with either Tomcat or Java.
    So, does anyone think this is really a Tomcat or Java problem or a problem with the vendors method? I was able to find the jar file with the class file that contains this method. Since this is in a class file, is there a way to manually compile this method to see if I can reproduce the problem?

    The JVM should never segfault. Unless you are using JNI it shouldn't be possible to write code that causes this sort of behaviour.
    So when you see a segfault it usually boils down to (in no particular order) one of:
    1. Hardware problem
    2. JNI (mis)use
    3. JVM bug.
    Check with the vendor to see if their app includes any JNI logic. If not, try it on known good hardware. If it still falls over, raise a bug with Sun.

  • The best Java compile platform

    Anybody can provide the best Java platform specification?
    I am thinking an IBM compatible PC which can compile big java file in the very fast speed. This compile platform must be able to save much time of programming. But what kind of CPU, RAM, OS can make this ture? If you are experienced this, please provide your excellent ideas, thanks a lot~!
    CPU
    RAM
    OS
    Compile Software
    Let's speed up~!

    Big Java files aren't as common as you would think. Any file which gets too big should be split into smaller ones. :-)
    But anyway .. the machine I use at work is a P3-450 with 256Mb RAM, running Windows 2000. My IDE is IntelliJ IDEA, set up with IBM's Jikes compiler.
    At home, I use a P2-300 with 64Mb RAM, running Linux, also with Jikes .. which runs slower than the first setup (no surprises there.) I also have a Celeron 600@900 with 384Mb RAM, running a beta of Windows XP, set up like the work system with IDEA and Jikes .. which is the fastest of the lot ..
    .. but even though the third system is the fastest, I'd say you only need about a P3-450 to run Java compilation fast enough to use .. especially when you have Jikes as the compiler, which can speed up compilation of things like JSP 10-fold. The RAM is important for running, though, as the JVMs can be a memory hog (particularly when you use a fat, memory-intensive IDE like IDEA.)

  • Run time java compiler

    Last year I researched oracle spatial technology and created prototype using oracle 9i, standalone oc4j. In order to start oc4j, i had to download java 1.4.2 from sun site. everything worked fine.
    Now I am expanding on the prototype on different machine but am using oracle 10g. I followed the same steps (installed 10g, oc4j, downloaded j2se 1.4.2 and installed). When I start oc4j by following command
    java -jar oc4j.jar, I get
    error message stating Error loading package at file:/E:/oracle_downloads/oc4j/j2ee/home/applications/admin_ejb.jar, javac.exe no
    t found under F:\oracle\product\10.1.0\db_1\jre\1.4.2, please use a valid jdk or
    specify the location of your java compiler in server.xml using the <java-compil
    er .../> tag.
    I am not sure how do I specify location of java compiler in server.xml file sysntactically. I do not not recall this step with oracle 9i.
    I edited server.xml and http-wev-site.xml as per instructions in my spatial class for mapviewer application but I need help on how to enter the location of java compiler file in server.xml file.
    Thank you

    You cannot use the JRE java to start oc4j. Must install a complete 1.4.2 J2SDK (not JRE) then use the java binary under its bin directory to start oc4j (not the one under jre/bin directory).
    lj

Maybe you are looking for

  • How to get list view on numbers? Yosemite

    Hi, How can I get my spreadsheets as a list view in the left top corner of numbers?

  • Centro Freezes Upon Incoming Calls and Doesn't Register When Trying to Make a Call

    I am currently on my second Centro since March 18th and both have had the same issues. Sporadically when receiving incoming calls the phone likes to freeze up. I have tried waiting it out to see what happens, but the screen stays. The only way I have

  • Am I supposed to go for rmic again ?

    I am having server side class, which extends UnicastRemoteObject & implements Remote interface. My doubt is, whenever I change this class, after this I execute, rmic -v1.2 ServerClass gives me stub & I place them at both client as well as server. As

  • How to define a new parameter

    Hi, I want to improve a search by defining a new parameter. This parameter will replace (1,2,3,4) which is show below. .. documentid IN (1,2,3,4) Is it possible to define such parameters in APEX/SQL? if so, how can I do it? (I have tried some possibl

  • XML Component FileNotFoundException Error

    I am using 9iAS r2 and am trying to use the XML Component. The source for my XML is a URL, this point to Oracle Reports and is working an produces valid XML, the XSL is static (entered in the dialog box). When I try and run the XML Component I get th