Java and JVM relation and specification

Hello,
There's something I don't understand, the Java specification doesn't seem to have a new version each new java version, and it's seems to be the for the jvm. So i have some questions :
- When does the spec change? I suppose that it is only when the core language change. Does it means that from Java 5 to Java 6, the API has change but nothing in the language?
- The link between the JVM and java is the class file. The JVM spec hasn't change since 1999... Does this mean that the .class hasn't change since 1999 while the java core language has change?
Thanks in advance for your answer

thibaultdelor wrote:
Hello,
There's something I don't understand, the Java specification doesn't seem to have a new version each new java version, "Java version" would refer to the release of the Sun VM presumably. And presumably you are referring to the Java Language Specification (JLS.)
The JLS represents the java language and nothing more.
The Sun VM represents the VM, Java API and associated tools. The Java API, with the exception of a very few classes in java.lang, is not part of the JLS. Thus an major update to the Java API could be, and is, cause for a version update to the Sun VM. A JLS change would be as well.
- When does the spec change? I suppose that it is only when the core language change. Does it means that from Java 5 to Java 6, the API has change but nothing in the language?I believe that is correct. I am pretty sure, Generics, memory model and enums were added in 1.5. I believe there were language changes being considered for 1.7 as well.
- The link between the JVM and java is the class file. The JVM spec hasn't change since 1999... Does this mean that the .class hasn't change since 1999 while the java core language has change?Depends on what you mean. The structure hasn't changed. The data in the structure as changed.
You might also note that the Java Native Interface Specification has changed as well.

Similar Messages

  • Error when accessing Java and JVM section

    I'm getting the following error when accessing the Java and
    JVM section of the CF Administrator:
    "Element JDKPATH is undefined in FORM"
    I've searched a lot and there's very little on the topic. On
    this forum there are two posts and one got no answer, on the other
    it was suggested it might be the jvm.config file. I've looked at
    mine but I really have no idea what could be wrong. Also, there are
    two jvm.config files in my install, one in jrun4/bin and another in
    jrun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/runtime/bin
    folder (I did multiserver installation).
    I've already tried a bunch of things and no luck, any help is
    appreciated on this.

    quote:
    Originally posted by:
    ke4pym
    What is your path? Make sure you're using forward slashes.
    ie: d:/java/jdk1.6.0_12/bin/blah/blah/blah
    What path are your referring to? My actual PATH environment
    variable? Or are you referring to something else. Btw, here's what
    my config file looks like right now.
    # VM configuration
    # Where to find JVM, if {java.home}/jre exists then that JVM
    is used
    # if not then it must be the path to the JRE itself
    java.home=C:/JRun4/jre
    # If no java.home is specified a VM is located by looking in
    these places in this
    # order:
    # 1) bin directory for java.dll (windows) or
    lib/<ARCH>/libjava.so (unix)
    # 2) ../jre
    # 3) registry (windows only)
    # 4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre)
    # Arguments to VM
    java.args=-server -Xmx512m -Dsun.io.useCanonCaches=false
    -XX:MaxPermSize=192m -XX:+UseParallelGC
    -Dcoldfusion.rootDir={application.home}/
    # commas will be converted to platform specific separator and
    the result will be passed
    # as -Djava.ext.dirs= to the VM
    java.ext.dirs={jre.home}/lib/ext
    # where to find shared libraries
    java.library.path={application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusi on/lib,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/jintegra /bin,{application.home}/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/jintegra/b in/international
    system.path.first=false
    # set the current working directory - useful for Windows to
    control
    # the default search path used when loading DLLs since it
    comes
    # before system directory, windows directory and PATH
    java.user.dir={application.home}/../lib
    # JVM classpath
    java.class.path={application.home}/servers/lib,{application.home}/lib

  • Can somebody explain to me how java and xml are related?

    Hi guys
    im new to java and xml.Been reading a lot regarding java and don't seem to have a problem with it...
    the problem is the xml part...im doing a simple GUI project using swing(online store) and i have to convert it to xml
    I have absolutely NO IDEA why i must convert my java to xml and have no idea how to do that.I been reading on the net that xml is a exten~ markup language and it is better and useful.
    Can somebody explain to me in layman terms
    1)how is java and xml related in?
    2)why do ppl want to convert java to xml when they can just stick to java
    3)what is actually xml...
    4)Do i need a program to create xml like i need jcreater to create java application
    5)How do we actually convert?is there any links that you guys could tell me?
    thank you
    tomleo

    im new to java and xml.Been reading a lot regarding
    java and don't seem to have a problem with it...Okay.
    the problem is the xml part...im doing a simple GUI
    project using swing(online store) and i have to
    o convert it to xmlYou have to? So presumably somebody in a position of authority told you that?
    I have absolutely NO IDEA why i must convert my java
    to xml and have no idea how to do that.I been reading
    on the net that xml is a exten~ markup language and
    it is better and useful.I have no idea either (besides which, it doesn't make sense). But why ask us? Somebody told you to do that, ask them why.
    Sure, XML is useful. But it isn't a programming language so it can't be used as a substitute for Java.
    Can somebody explain to me in layman terms
    1)how is java and xml related in?They aren't related, except perhaps in that they are both used in computers.
    2)why do ppl want to convert java to xml when they
    can just stick to javaThey don't.
    3)what is actually xml...Start here for numerous definitions:
    http://www.google.ca/search?hl=en&lr=&oi=defmore&q=define:XML
    4)Do i need a program to create xml like i need
    jcreater to create java applicationNo, XML is just text. But then Java code is just text too.
    5)How do we actually convert?is there any links that
    you guys could tell me?You don't convert Java to XML. My guess is that because you don't know much about Java or XML, you have misinterpreted something that somebody told you.

  • Multiple kernel panics related to java and NTFS

    Over the past week, I have experienced at least three separate kernel panics, but only two have had their event recorded by the System Diagnostic Reports.  I was wondering if there are any known issues that could cause kernel panic, such as the ones my system has received.  I have attached the result of the most recent panic below.
    Please note that I am running OS X 10.7.4 on a Mac Pro (early 2008) with 14GB RAM.  At the time the panics occurred, CrashPlan was in the process of backing up files (to CrashPlan Central) from my Boot Camp partition, which has Windows XP installed on a NTFS drive.  I mention this, because the fault appears to be related to NTFS and Java.  My understanding is that CrashPlan uses Java, and I don't believe I have many other (if any) applications running on it typically.
    I should also mentioned that I may have had Parallels Desktop running at the same time, and had a Windows XP virtual running the CrashPlan client for Windows that was overseeing the backup on my Synology DiskStation NAS.  At this time, I do not believe this is related to the panic, as I have been using Parallels in such a manner for weeks prior, and never received a panic.  Also, while the CrashPlan client in Windows also uses java, due to the VM sandbox, I believe the java is handled internally by Parallels, and doesn't utilize any java thread outside of Parallels.
    As I mentioned earlier, I have two recorded panics apparently caused by the same issue, having occurred in the "java" thread and related to "ntfs_attr_record_move_for_attr_list_attribute()".  I noticed that the other report also includes a section at the bottom for "System Profile" with information, such as:
    Model: MacPro3,1, BootROM MP31.006C.B05, 8 processors, Quad-Core Intel Xeon, 2.8 GHz, 14 GB, SMC 1.25f4
    Graphics: ATI Radeon HD 5770, ATI Radeon HD 5770, PCIe, 1024 MB
    Memory Module: DIMM Riser B/DIMM 1, 2 GB, DDR2 FB-DIMM, 800 MHz, 0x0000, 0x000000463732353642363145353830304600
    Memory Module: DIMM Riser B/DIMM 2, 2 GB, DDR2 FB-DIMM, 800 MHz, 0x0000, 0x000000463732353642363145353830304600
    Memory Module: DIMM Riser A/DIMM 1, 4 GB, DDR2 FB-DIMM, 800 MHz, 0x80AD, 0x485900503132354637324350344E332D5336
    ... ETC ...
    Why would some kernel panics include the system profile while others do not?  Are the panic logs "complete" or can they be incomplete due to the kernel locking up before writing the entire log?
    I have been using this system since 2008, and gone through numerous OS and Parallels updates over the years.  At this time, I appear to be update-to-date on all software.  I do not recall ever having received a kernel panic in the past, and if I have, it would have been extremely infrequent with the last occurring many years ago.
    An seemingly similar report:  https://discussions.apple.com/message/16566759#16566759
    Thu Jun  7 01:59:30 2012
    panic(cpu 1 caller 0xffffff7f80b50b57): "ntfs_attr_record_move_for_attr_list_attribute(): err\n"@/SourceCache/ntfs/ntfs-80.1/kext/ntfs_attr.c:3612
    Backtrace (CPU 1), Frame : Return Address
    0xffffff8197f9b590 : 0xffffff8000220792
    0xffffff8197f9b610 : 0xffffff7f80b50b57
    0xffffff8197f9b680 : 0xffffff7f80b68017
    0xffffff8197f9b7d0 : 0xffffff7f80b57b60
    0xffffff8197f9b880 : 0xffffff7f80b44bc9
    0xffffff8197f9b930 : 0xffffff7f80b38eea
    0xffffff8197f9b990 : 0xffffff80003196cb
    0xffffff8197f9b9d0 : 0xffffff80003183c7
    0xffffff8197f9ba60 : 0xffffff80002f6904
    0xffffff8197f9baa0 : 0xffffff80002f6e7d
    0xffffff8197f9baf0 : 0xffffff80002f7262
    0xffffff8197f9bb70 : 0xffffff80002f5eac
    0xffffff8197f9bc10 : 0xffffff8000308a62
    0xffffff8197f9bd90 : 0xffffff80003094ec
    0xffffff8197f9bf50 : 0xffffff80005cd61b
    0xffffff8197f9bfb0 : 0xffffff80002daa13
          Kernel Extensions in backtrace:
            com.apple.filesystems.ntfs(3.10.1)[13494759-5AEF-34F4-BD38-E47CDA5F2867]@0xffff ff7f80b31000->0xffffff7f80b8cfff
    BSD process name corresponding to current thread: java
    Boot args: -v
    Mac OS version:
    11E53
    Kernel version:
    Darwin Kernel Version 11.4.0: Mon Apr  9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64
    Kernel UUID: A8ED611D-FB0F-3729-8392-E7A32C5E7D74
    System model name: MacPro3,1 (Mac-F42C88C8)
    System uptime in nanoseconds: 33615123826096
    last loaded kext at 27671676915162: com.apple.filesystems.ntfs    3.10.1 (addr 0xffffff7f80b31000, size 376832)
    last unloaded kext at 23373040217579: com.apple.driver.AppleUSBCDC    4.1.17 (addr 0xffffff7f807c6000, size 12288)
    loaded kexts:
    com.parallels.filesystems.prlufs    2010.12.28
    com.parallels.kext.prl_vnic    7.0 15094.749908
    com.parallels.kext.prl_netbridge    7.0 15094.749908
    com.parallels.kext.prl_hid_hook    7.0 15094.749908
    com.parallels.kext.prl_hypervisor    7.0 15094.749908
    com.parallels.kext.prl_usb_connect    7.0 15094.749908
    com.apple.filesystems.ntfs    3.10.1
    com.apple.filesystems.afpfs    9.8.1
    com.apple.nke.asp_tcp    6.0.1
    com.apple.filesystems.smbfs    1.7.2
    com.apple.filesystems.autofs    3.0
    com.apple.driver.AudioAUUC    1.59
    com.apple.driver.AppleHDA    2.2.0f3
    com.apple.driver.AppleUpstreamUserClient    3.5.9
    com.apple.driver.AppleMCCSControl    1.0.26
    com.apple.kext.ATIFramebuffer    7.1.8
    com.apple.ATIRadeonX3000    7.1.8
    com.apple.iokit.IOUserEthernet    1.0.0d1
    com.apple.iokit.IOBluetoothSerialManager    4.0.5f11
    com.apple.driver.AppleMCEDriver    1.1.9
    com.apple.Dont_Steal_Mac_OS_X    7.0.0
    com.apple.driver.AudioIPCDriver    1.2.2
    com.apple.driver.ACPI_SMC_PlatformPlugin    5.0.0d0
    com.apple.driver.AppleLPC    1.5.8
    com.apple.driver.CSRUSBBluetoothHCIController    4.0.5f11
    com.apple.iokit.SCSITaskUserClient    3.2.0
    com.apple.driver.XsanFilter    404
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless    1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib    1.0.0d1
    com.apple.BootCache    33
    com.apple.iokit.IOAHCIBlockStorage    2.0.3
    com.apple.driver.AppleUSBOHCI    4.4.5
    com.apple.driver.AppleAHCIPort    2.3.0
    com.apple.driver.AppleIntelPIIXATA    2.5.1
    com.apple.driver.AppleUSBHub    4.5.0
    com.apple.driver.AppleIntel8254XEthernet    2.1.3b1
    com.apple.driver.AppleFWOHCI    4.8.9
    com.apple.driver.AppleUSBEHCI    4.5.8
    com.apple.driver.AppleUSBUHCI    4.4.5
    com.apple.driver.AppleEFINVRAM    1.5.0
    com.apple.driver.AppleACPIButtons    1.5
    com.apple.driver.AppleRTC    1.5
    com.apple.driver.AppleHPET    1.6
    com.apple.driver.AppleSMBIOS    1.8
    com.apple.driver.AppleACPIEC    1.5
    com.apple.driver.AppleAPIC    1.5
    com.apple.driver.AppleIntelCPUPowerManagementClient    193.0.0
    com.apple.nke.applicationfirewall    3.2.30
    com.apple.security.quarantine    1.3
    com.apple.driver.AppleIntelCPUPowerManagement    193.0.0
    com.apple.security.SecureRemotePassword    1.0
    com.apple.kext.triggers    1.0
    com.apple.driver.DspFuncLib    2.2.0f3
    com.apple.kext.ATI5000Controller    7.1.8
    com.apple.kext.ATISupport    7.1.8
    com.apple.iokit.IOSurface    80.0.2
    com.apple.iokit.IOSerialFamily    10.0.5
    com.apple.iokit.IOFireWireIP    2.2.4
    com.apple.iokit.IOAudioFamily    1.8.6fc17
    com.apple.kext.OSvKernDSPLib    1.3
    com.apple.driver.AppleHDAController    2.2.0f3
    com.apple.iokit.IOHDAFamily    2.2.0f3
    com.apple.driver.ApplePolicyControl    3.0.16
    com.apple.driver.AppleGraphicsControl    3.0.16
    com.apple.iokit.IONDRVSupport    2.3.2
    com.apple.iokit.IOGraphicsFamily    2.3.2
    com.apple.driver.AppleSMC    3.1.3d8
    com.apple.driver.IOPlatformPluginLegacy    5.0.0d0
    com.apple.driver.IOPlatformPluginFamily    5.1.0d17
    com.apple.driver.AppleUSBBluetoothHCIController    4.0.5f11
    com.apple.iokit.IOBluetoothFamily    4.0.5f11
    com.apple.driver.AppleUSBHIDKeyboard    160.7
    com.apple.driver.AppleHIDKeyboard    160.7
    com.apple.iokit.IOUSBHIDDriver    4.4.5
    com.apple.iokit.IOSCSIBlockCommandsDevice    3.2.0
    com.apple.iokit.IOUSBMassStorageClass    3.0.1
    com.apple.driver.AppleUSBMergeNub    4.5.3
    com.apple.driver.AppleUSBComposite    4.5.8
    com.apple.iokit.IOSCSIMultimediaCommandsDevice    3.2.0
    com.apple.iokit.IOBDStorageFamily    1.6
    com.apple.iokit.IODVDStorageFamily    1.7
    com.apple.iokit.IOCDStorageFamily    1.7
    com.apple.iokit.IOATAPIProtocolTransport    3.0.0
    com.apple.iokit.IOSCSIArchitectureModelFamily    3.2.0
    com.apple.iokit.IOAHCIFamily    2.0.8
    com.apple.iokit.IOATAFamily    2.5.1
    com.apple.iokit.IONetworkingFamily    2.1
    com.apple.iokit.IOUSBUserClient    4.5.8
    com.apple.iokit.IOFireWireFamily    4.4.5
    com.apple.iokit.IOUSBFamily    4.5.8
    com.apple.driver.AppleEFIRuntime    1.5.0
    com.apple.iokit.IOHIDFamily    1.7.1
    com.apple.iokit.IOSMBusFamily    1.1
    com.apple.security.sandbox    177.5
    com.apple.kext.AppleMatch    1.0.0d1
    com.apple.security.TMSafetyNet    7
    com.apple.driver.DiskImages    331.6
    com.apple.iokit.IOStorageFamily    1.7.1
    com.apple.driver.AppleKeyStore    28.18
    com.apple.driver.AppleACPIPlatform    1.5
    com.apple.iokit.IOPCIFamily    2.6.8
    com.apple.iokit.IOACPIFamily    1.4

    What might I find by running XP natively?  I won't get kernel panics under XP.  I haven't run it natively in many months.
    I thought that Parallels actually uses Paragon NTFS (or at least a variant of it) to read and write to the NTFS drives.  It's possible that I am mistaken, as many years have passed since I last looked at Paragon NTFS.
    Is the Paragon driver intended to replace the OS X default NTFS driver or Parallels?  I'm not sure how Parallels will respond to the Paragon driver.
    Parallels should be up-to-date.  It reports build 7.0.15094.
    Regarding Windows XP, this is the only system I have that is still running XP on Boot Camp.  I rarely use it these days, and wouldn't be now, if I wasn't trying to back it up using CrashPlan.  My plan is upgrade when I have time.  All my other systems have Windows 7 on the Boot Camp drives.
    I do have a few VMs that use XP, because I haven't had the chance to replace them with Windows 7 installs, and they are generally used for infrequent development tasks and for running Beyond Compare.  Also, I believe there may have been license issues with the version of Windows 7 that I'm own when used with VMs (meaning they're not allowed) ... but don't quote me on this.
    I noticed that Riser B/DIMM 1 and 2 do not report the Manufacturer.  I'm pretty sure the 2GB and 4GB DIMMs are OWC.  The 1GB DIMMs are OEM from Apple.
    Memory:
    Memory Slots:
      ECC:          Enabled
    DIMM Riser B/DIMM 1:
      Size:          2 GB
      Type:          DDR2 FB-DIMM
      Speed:          800 MHz
      Status:          OK
      Manufacturer:          0x0000
      Part Number:          0x000000463732353642363145353830304600
    DIMM Riser B/DIMM 2:
      Size:          2 GB
      Type:          DDR2 FB-DIMM
      Speed:          800 MHz
      Status:          OK
      Manufacturer:          0x0000
      Part Number:          0x000000463732353642363145353830304600
    DIMM Riser A/DIMM 1:
      Size:          4 GB
      Type:          DDR2 FB-DIMM
      Speed:          800 MHz
      Status:          OK
      Manufacturer:          0x80AD
      Part Number:          0x485900503132354637324350344E332D5336
    DIMM Riser A/DIMM 2:
      Size:          4 GB
      Type:          DDR2 FB-DIMM
      Speed:          800 MHz
      Status:          OK
      Manufacturer:          0x80AD
      Part Number:          0x485900503132354637324350344E332D5336
    DIMM Riser B/DIMM 3:
      Size:          Empty
      Type:          Empty
      Speed:          Empty
      Status:          Empty
      Manufacturer:          Empty
      Part Number:          Empty
    DIMM Riser B/DIMM 4:
      Size:          Empty
      Type:          Empty
      Speed:          Empty
      Status:          Empty
      Manufacturer:          Empty
      Part Number:          Empty
    DIMM Riser A/DIMM 3:
      Size:          1 GB
      Type:          DDR2 FB-DIMM
      Speed:          800 MHz
      Status:          OK
      Manufacturer:          0x80AD
      Part Number:          0x48594D5035313241373243503844332D5335
    DIMM Riser A/DIMM 4:
      Size:          1 GB
      Type:          DDR2 FB-DIMM
      Speed:          800 MHz
      Status:          OK
      Manufacturer:          0x80AD
      Part Number:          0x48594D5035313241373243503844332D5335

  • How to relate java and Oracle

    i have to tried to make programs using java and oracle. if i give the values in the 'insert' statement it is getting updated in the original table in oracle but how to take the values from the text fields of java and insert into the tables in oracle. do we have any methods to convert the values into sql type. pl reply.

    Here is a sample of a Java program that uses JDBC and a PreparedStatement. This particular program does a select, but you can also use this for inserts. I'm not 100% this is what you are looking for, but if it isn't just let me know. I'll help if I can.
    Joel
    For inserts, just replace this code:
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
      System.out.println(rs.getInt(rs.findColumn("CNT")));
    }with this code (and obviously change the Select string to an Insert String):
    int rowcnt = ps.executeUpdate();Here is the whole program:
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class dbtest {
        public static void main(String args[]) throws SQLException {
            try {
                String timeString = new String("2000-11-01 23:59:59");
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd H:m:s");
                java.util.Date date = format.parse(timeString);
                Timestamp timestamp = new Timestamp(date.getTime());
                DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                Connection conn =
                    DriverManager.getConnection(
                        "jdbc:oracle:thin:@riker:1521:mydb",
                        "myusername",
                        "mypassword");
                String sql =
                    "SELECT COUNT(*) CNT FROM SERVICE_ALARM "
                        + "WHERE TRANS_STREAM_NODE_ID = ? "
                        + "AND SERVICE_ID = ? "
                        + "AND ALARM_ID = ? "
                        + "AND RAISED > TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')";
                PreparedStatement ps = conn.prepareStatement(sql);
                ps.setString(1, "ROW1");
                ps.setInt(2, 1);
                ps.setString(3, "ROW1");
                String myDate =
                    timestamp.toString().substring(0, timestamp.toString().length() - 2);
                System.out.println("myDate=(" + myDate + ")");
                ps.setString(4, myDate);
                ResultSet rs = ps.executeQuery();
                while (rs.next()) {
                    System.out.println(rs.getInt(rs.findColumn("CNT")));
                rs.close();
                ps.close();
            } catch (Exception e) {
                System.out.println("Java Exception caught, error message=" + e.getMessage());
    }

  • Java and SOA related Webservices

    Please send me the respective links or provide me the solutions
    1)Is it possible to write a centralised User Authentication framework on Java and SQLServer? By this i mean the service should be able to goto different sources to fetch authentication information based on type of user
    2) Does EJB provide any support for centralised reporting (any reporting framework?) as well as auditing and error handling frameworks?
    3) What features in EJB can be utilised in designing a SOA framework for a set of applications?
    Thnx in advance
    Saravanan

    Hi Anu,
    welcome to SDN
    As i understand that you are new to ABAP and still learning ABAP it ? Correct?
    *My question is what made you to think that you have to know java for ABAP as ABAP itself is very vast fields so as a starter there is no as such need to learn java but yes , for object oreinted approach you need to brush up ur oops concepts that is polymorphism, encapsulation etc.
      once you become proficient in ABAP , at that amount of time you can think to learn some Java stuffs inorder to enter into new dimensions product of SAP.
      But if you are a good learner and have got time bandwidth then i would suggest that go with the core jave as of now, later on you go for advanced one...
    Cheer
    Sunny
    reward points , if found helpful.

  • Relation between java and oracle

    Hi,
    This is general information about java and oracle.
    I had worked in java last one year, but now switch to oracle i heared that nearly combination of each are implemented oops concept. But i know where it used in java, not in oracle.
    In oracle, where we are implemented inheritance, polymorhism and encapsulation.
    plz give some tips
    Regards venki

    does this mean you used to develop your applications on java and manuplate your data in Oracle over JDBC or Hibernate but then you started to develop PL/SQL applications for this need and use PL/SQL's OO features?
    With my experiences I may say if you are working on data intensive database applications learning how to use effectively SQL and PL/SQL is critical, this is Oracle's native language not something written to work for any database vendor. http://www.oracle.com/pls/db102/portal.portal_db?selected=5

  • About collecting java and JVM-System

    Hi all,
    I'm trying to collect from a java application (jvm is 1.6). When I see the exclusive time per function I get most of the time assigned to <JVM-System>. My questions are:
    1. what jvm activites get mapped to this? gc? jitting?
    2. any way to get finer granularity in this jvm activity?
    many thanks in advance,
    fdo

    Sorry, this was a self inflected RTFM ;)
    http://docs.sun.com/app/docs/doc/819-5264/6n7c1asni?a=view#afaoj

  • How to get return value from java and read by other application?

    i want to read return value from java and the other application read it.
    for example:
    public class test_return {
        test_return(){
        public int check(){
            return 1;
        public static void main(String args[]){
           new test_return().check();
    }from that class i make as jar file. How to read the return value (1) by other application?
    thx..

    If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
    About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
    EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
    Edited by: jverd on Oct 29, 2009 1:27 AM

  • [Java and all else] How do you document DB design?

    Hello,
    Although most of the technical choices are explicit in SQL (UniqueKey & ForeignKey constraints, indexes,...), the semantics of the data columns and their constraints seem better served as plain human-readable comments ("ID column: identifies the plane copy; 6 figures are enough as we don't expect to sell more than 1 million planes in a foreseeable future...").
    In my current system, (EJB-based, but the DB schema is not created by the JPA-compliant ORM, but via SQL scripts), I see the following ways to write and maintain this documentation:
    - SQL comments in the schema creation and patch scripts
    - Javadoc comments in the Java source of the Entity classes.
    - UML notes in UML diagrams(1)
    - external "Architecture and design" document.
    All 4 of them are used, sometimes inconsistently, for various parts of the design choices; I mean, the docs do not contradict themselves (not yet, but it's a mere question of time), but some tables are commented in SQL scripts, others are in design docs, and the details for some columns are in entity javadocs. Although each developer may find it handier to "write" the doc via his preferred medium, it becomes increasingly difficult to "maintain" theoverall documentation.
    Our current situation is that most of the project team members are Java developers, so it would probably be better accepted and served if we standardized that we document DB tables and columns in Java source, but I am worried that:
    - someone else pouring over our DB (ex: DBA helping us to optimize things, or other team developping a data-mining tool to leverage the historical data in DB) may not be as comfortable with Java
    - this may not cover all design choices of the DB schema:
    - - - - first, although that is the case currently, in the future there might not be a 100% 1-1 mapping between e.g. each entity class and a DB table. Maybe some columns will not need to be mapped anymore,...
    - - - - second, I fear some DB constructs are not amenable to Java counterparts; no accurate idea there, I'm not an SQL nor JPA expert, but I presume Indexes, table partitioning, tablespaces, for example (yes, the DBMS is Oracle :o) are not taken into account in JPA mapping.
    And if we document those choices at the SQL level (my preferred idea so far), this will gradually make the javadocs in the entities obsolete, or removed altogether, and that will make future maintenance of the Java source risky.
    How do you document your DB design in general?
    Do you have specific advices for my case?
    Thanks in advance,
    J.
    (1) Just for the record, here are a few posts that refer to modelling the DB in UML:
    [A post on this forum highlighting that UML 1.4 standardizes a notation for RDB modelling|http://forums.sun.com/thread.jspa?messageID=1383724#1383724]
    [A DB modelling tutorial|http://www.tomjewett.com/dbdesign/dbdesign.php] (not sure whether it leverages the standard mentioned above :o)
    P.S.: "Java and all else" as in, damn, I'd love to use the familiar JDC forums and people to discuss not only Java-related issues, but also [all other things that surround Java|http://forums.sun.com/thread.jspa?threadID=5422264&tstart=0] (other technologies, processes, people) and enable to make workable systems out of Java code.

    jduprez wrote:
    Thank you again.
    A couple more questions:
    2. Table, and proc dictionary maintained as one or more text files. Those files and schema are all in source control.Do you mean, a proprietary text format (a la tabledesign.txt), or +.sql+ source files? Again, you seem to suggest the scehma info is present in two locations.I didn't say two locations unless you meant files. Then yes.Yes I meant two files. I trust the team to get the doc file lagging a few revisions behind the SQL file, and to correct that I would have to include one more step in the review process (e.g. "review CM actions to check that the doc file is updated consistently with the SQL source").
    The tool I wrote would throw errors if the comment file didn't match the schema. And if comments were not provided. That of course doesn't stop someone from documenting a table with "a table".
    You can of course keep the addtional info as special comments in the SQL, but when I did this, and even in retrospect, it seems better and perhaps easier to keep them seperate. I have done special comments in SQL before and it seems a bit of a kluge but you do have the single source. But in that case I was the only one maintaining it too.What do you mean by "special"?For code generation I have a schema file with the following (pseudo sql.)
        create mytable
           mytable_id int,
           column_foo varchar(10);
           column_fum varchar(20)
            -- Query: for_a_query (column_foo, column_fum)
        )The generator consumes the schema and generates the standard CRUD which would include a query based on the primary key.
    The above comment is used to provide an additional query where the proc is named 'for_a_query' (munged with table name) and takes two parameters (column_foo, column_fum) whose type/name matches those of the table.
    If we don't try to generate a browseable HTML out of the schema (although the idea is appealing, I don't have the resource to make such a tool), do you see anything kludgy in maintaining SQL comments interpersed within DDL code?
    Of course that is doable.

  • RE: Java and Forte

    We have no problem using JDK 1.1.5. However, we are using Orbixweb. If
    you are accessing the applet and the IOR file from the same host (exact
    host name), then one other possibility is the JVM compatibility for your
    browser. Using Javasoft's Activator or appletviewer should resolve
    that.
    -----Original Message-----
    From: Kamran Amin [SMTP:[email protected]]
    Sent: Tuesday, March 10, 1998 7:48 AM
    To: '[email protected]'; '[email protected]'
    Subject: RE: Java and Forte
    Dan,
    We had the same problem as you are having regarding question
    one. Make
    sure you are
    using JDK 1.1.3 or 1.1.4. It did not work for me when I was using JDK
    1.1.5. Also you have to
    use the gatekeeper to make the applet work. Hope this help.
    Kamran Amin
    Forte Technical Leader, Software Engineering
    [email protected]
    203-459-7362
    Oxford Health Plans
    48 Monroe Turnpike
    CT, Trumbull 06611
    http://www.oxhp.com/
    From: [email protected][SMTP:[email protected]]
    Sent: Monday, March 09, 1998 7:49 PM
    To: [email protected]
    Subject: Re: Java and Forte
    1. I have been able to make my Java client appllication call-in to a
    Forte service object with success. However the tricky part beginswhen
    I try to do the same with a Java applet. I get an exception returned
    which is an AppletSecurityException. I understand that running a Java
    applet in a browser has two limitations, one being the Java applet
    sandbox and the firewall restriction. As I am only running my Java
    applet and the Forte service object on the same node, this rules out
    the latter.
    I have tried running the Gatekeeper from the same directory as myJava
    client application, which includes all the client stub files
    (including stub files which are generated from Forte supplier plans
    such as those in the Framework folder). However, I still receive the
    AppletSecurityException.
    How can I go about making this operation successful?
    **AppletSecurityExceptions can be caused by many problems--trying toaccess
    machines other than the class download machine, or trying to accessserver
    side classes outside the defined directory structure in the webserver. I'd
    look closely at the classes that are being brought into memory (forexample,
    Visibroker's ORB shows you each file as it is loaded) and make sureyour web
    server is defined correctly. If you follow the Forte technotesclosely, it
    usually solves this problem.
    2. Has anyone tried implementing a 'fat' client, one that combines a
    Forte web application, JavaScript, and a Java applet client toperform
    operations such as validation and a tiny bit of data processing allon
    the client side, relieveing the application server from such
    operations? If yes, how do I implement the solution, and are thereany
    tech notes from Forte that specifically tell me how to do this?
    **We have created a Java framework that follows many of the designpatterns
    and naming conventions as our Forte framework. The Java classes canbe
    extended to marshal and unmarshal scalar data structs passed acrossthe ORB
    boundary to instantiate 'thick' functional objects on the client, andas much
    processing and as many business rules as wanted can be developed inthe
    client
    Java objects.

    If you look at the exception information in the iiop manual it
    discusses exteneded propties DefaultThrowsClause, ThrowsClause and
    IsThrowable.
    If you mark your exception class with IsThrowable it will show up in the
    IDL as an exception. If you use either DefaultThrowsClause(project) or
    ThrowsClause(method) you will get the appropriate raises in the idl.
    This will cause the idl2java to produce code which will allow you to catch
    the exception.
    Tom.
    At 09:41 AM 1/29/99 +0100, Giuseppe Sorce wrote:
    >
    Hi all,
    I am currently working to an architecture to establish a communication
    between a Forte' server and a Java client, using Visigenic's Visibroker and
    IDL mode.
    I have problems when I try to raise a Forte' exception from a method
    invoked by the Java client; I would like the exception class
    (ProductException) not to inherit from the class GenericException, because
    the IDL I want to generate must have this structure:
    exception ProductException {
    string message;
    Using this solution, the client application gets blocked waiting forever.
    I am currently working with:
    - Forte' 3.0.G.2 plus WebEnterprise 1.0.B
    - JDK 1.1.5
    - Visibroker 3.1
    My question is: is it possible to raise an exception from the Forte' side
    that is
    compliant to the IDL mentioned above?
    Of course it should be caught from the Java side.
    Thank you in advance
    Giuseppe Sorce
    CSI Piemonte - C.so Unione Sovietica 216 - 10134 Torino - ITALY
    tel. +39-011-3168736
    fax +39-011-3168212
    e-mail [email protected]
    url http://www.csi.it
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Data transfer between SAP & Java and Vice versa using IDOC Process

    Dear Experts,
            We are working on one of the good requirement related to data transfer between SAP and Java software. Client requirement is, they want to transfer the data in both the ways (from SAP --> Java and Vice versa also).
    In detail is, after sales order creation using one custom program loading plan details will be calculated. Once loading dates are confirmed then, user will release the sales document to transfer the data from SAP to Java using "Outbound IDOC processing". Similarly in that JAVA software some shipment details will be performed, once completed from JAVA software again details needs to be pumped back to SAP as "Inbound IDOC Processing".
    For this fields are already identified from external software SAP and we are looking for the same to perform the steps in SAP.
    At this stage, I need your expert opinion  / feedback how to go  about at this stage.
    Meaning,  
                     1. What are the customizing steps needs to be done in SAP..?
                     2. How to trigger the :Outbound IDOC process" once the documents are "Released" from custom transaction
                     3. How to create the link between SAP and JAVA to transfer the data between these 2 software
                     4. How to trigger the "Inbound IDOC Process" from JAVA software to SAP and how to store the data in SAP
    Experts, please give your feedback in terms of reply or by sending the step by step process to fulfill this client requirement.
    Thanks for your cooperation.
    Regards,
    Ramesh

    Maybe too many open questions in the same document.
    Maybe you should repost a more specific question in a technical forum.
    This looks like a small project where you already know what you want, maybe you should contract a technical specialist so he proceeds to the implementation!

  • [Java and all else] Requirements tracking, testing, and versioning

    Hello,
    as a semi-experimental subject, I am considering managing requirements and test documents in the same version control system as the code.
    For some reasons, this versioning policy doesn't seem mainstream, so I'd like to have your opinion on that.
    +N.B.: the prefix "java and all else" refers to the fact that I'm using this area to post a message that is related not only to Java but also to other topics (people, processes, tools,...) that help program in Java - so this post is not really off-topic either. For the record, I filed a suggestion to open a dedicated forums to discuss topics like that, although it hasn't received enthusiastic support so far :o(...+
    Here is how I had imagined to proceed:
    - requirements document gets edited and stored as text in the VCS
    - test plan (basically a matrix of which tests cover which requirements) goes into the VCS as well, text or binary
    - test instructions (detailed steps, actions, expected results) are stored as text in the VCS
    - test results - I do'nt know yet, but I planned to store them as text (lists of testId=result) in the VCS (I'm not sure indeed, that those would go into the VCS)
    The advantage of versioning those as text is that all VCS clients support easy-as-a-click history browsing and diff capabilities.
    Diffs and logs are useful to trace when and why a requirement has appeared, evolved, obsolated,... Especially in long-lived systems whose maintenance crew rarely embeds "historical" pioneers who developed the original systems.
    My questions:
    1) Is it good practice to version such docs in the same repository as the code?
    I've never seen this done.
    - In half of the shops I've been these docs are not really versioned (the PM considered it enough that the latest applicable version of the docs was available)
    - The other half has used versioning systems ranging from ad-hoc (shared folder acting as repository of all versions) to "document management systems". I found such tools to be developer-unfriendly (poor diff capability, poor text searching), and developers to be office-document-reluctant (mostly because of the shortcomings of the doc format and doc management systems).
    - The third half <wink to aficionados of French cinema> used dedicated softwares (Test Director, RQM,...) to manage requiremetns, test plans, test cases, test results,... The drawback is that the developers were hardly involved in using such tools, and even when they were, were not trained to use the administrative and metadata capabilities (who modified the test steps, when and why?).
    On the contrary, developers would easily and gladly browse histiry, check diffs, etc... on text documents versioned using their daily-used source control system.
    2) Are there "standard", preferrably text-based, formats, for the documents listed above?
    Each and every organization I've seen had its own format, but most items have equivalents in all organizations, even if disguised under different terminologies. I have no formal education or training in quality assurance, but I guess some ISO or CMM norms define those recurring items, and I expect some abstract XML format might exist
    3) Are there tools already that cover edition and exploitation of such formats, or why not, of the versioning of such formats (naive example, graphing the pass rate of tests over time)?
    A pet project of mine is to develop and open-source some Swing UI to do this, but existing tools would save me the trouble.
    I'm looking forward to reading about your own experience.
    Best regards,
    Jerome.
    Edited by: jduprez on Jun 4, 2010 10:33 PM
    Fixed link.

    I don't have data on comparative bug rates because we did not do studies focused on that. This stuff was mostly driven by convenience #) considerations.
    Subjectively, yes it seemed to have lower bug rate compared to maintaining documents in, say, pdf format (like our doc writers did with User/Dev guides). BTW doc writers are another kind of guys who dislike plain text.
    As for using test results history the way you describe - agree, that makes some sense. Now that you mention it I recall using it myself that way, in one of the projects where testers managed to establish really convenient way to assess test execution history. After I figured how easy it was, I began using it. Quite helpful indeed.
    Regarding "tool or format that mapped tests to specific requirements" in your original post - did you consider Polarion? IIRC it supports mapping requirements to test descriptions. Telelogic DOORS are maybe also capable of that but I am not completely certain.
    #) convenience -- BTW we maintained test descriptions not in plain text but in simple HTML (you know few tags one can use in javadocs). With limited line length, it is almost as VCS friendly as plain text, even with tables:
    <!DOCTYPE "stuff to make HTML validator happy">
    <html><title>test description</title>
    <body>
    <table>
      <tr>
        <td>test id</td>
        <td>synchronized.10988343</td>
      </tr>
      <tr>
        <td>instructions</td>
        <td>
          <ul>
            <li>sacrifice a goat
              <ul><li>under the full moon</li></ul>
            </li>
            <li>twirl counterclockwise
              <ul><li>until you barf</li></ul>
            </li>
        </td>
      </tr>
      <tr>
        <td>pass criteria</td>
        <td>
          <ul>
            <li><b>pass</b> if method is synchronized</li>
            <li><b>fail</b> otherwise</li>
          </ul>
        </td>
      </tr>
      <tr>
        <td>comments</td>
        <td>
           <a href="http://forums.sun.com/thread.jspa?messageID=10988343#10988343">
           click here for details</a>
        </td>
      </tr>
    </table>
    </body>
    </html>
    {code}
    We were also using [HTML validator|http://validator.w3.org/|tool] tool to automatically catch simple syntax mistakes like missing tags.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ABAP , JAVA And XSLT Mapping Doc's

    Hi,
    I am new to SAP XI Any body please send me the Doc's Related to ABAP, JAVA And XSLT Mappings. Thanks in Advance.
    Regards
    Kiran.B

    Hi
    Refer to
    ABAP mapping:
    How to Use ABAP Mapping in XI 3.0
    JAVA mapping:
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm (Java mapping)
    XSLT mapping:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    /people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
    /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    XSLT Mapping with java enhancement
    /people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
    XSLT - /people/dirk.roeckmann/blog/2006/07/26/grouping-xml-with-xslt--from-muenchian-method-to-xslt-20
    Regards,
    Kumar.
    Reward points if helpful!!

  • Problem with Java and Zip Files

    Hello there everyone. I have a problem with trying to zip up directories with empty folders in them. They zip fine with my code, but according to winzip, the number of files in the archive is incorrect. It's supposed to have a total of 288 files in it, but when it's zipped up, it only says 284. I mention specifically the "empty directories" note because the zipping works fine without empty folders.
    Below is the code for the zip method:
    public static void zip(File[] list, File zipfile, File zipRoot)
         throws IOException {
          if (!zipfile.exists()) {
                   zipfile.createNewFile();
              else if (!zipfile.isFile()) {
                   throw new IOException("The zip file, " + zipfile.getAbsolutePath()
                             + " is not a file.");
              if (list.length == 0) {
                  LOG.error("The list of files to zip up is empty.");
              for (int i = 0; i < list.length; i++) {
                   if (!list.exists()) {
                        throw new IOException("The file or directory, " + list[i].getAbsolutePath()
                                  + " does not exist.");
              FileOutputStream fos = new FileOutputStream(zipfile);
              ZipOutputStream zos = new ZipOutputStream(fos);
              for (int i = 0; i < list.length; i++) {
                   if (LOG.isDebugEnabled())
                        LOG.debug(i + ": " + list[i].getName());
                   String entryName = getRelativeName(list[i], zipRoot);
                   if (list[i].isDirectory()){
                        if (list[i].listFiles().length == 0){
                             ZipEntry entry = new ZipEntry(entryName + "/");
                             zos.putNextEntry(entry);
                   else {
                        ZipEntry ze = new ZipEntry(entryName);
                        zos.putNextEntry(ze);
                        byte[] buffer = new byte[8096];
                        FileInputStream fis = new FileInputStream(list[i]);
                        int read = 0;
                        read = fis.read(buffer);
                        if (LOG.isDebugEnabled())
                        LOG.debug("\tFound " + read + " bytes.");
                        if (read == -1){
                             //empty file, but add it for preservation.
                             //zos.write(buffer,0,0);
                        while (read != -1) {
                             zos.write(buffer, 0, read);
                             read = fis.read(buffer);
                        fis.close();
                        zos.closeEntry();
              zos.close();
    The files look like they're there, but I need the system to be able to determine the number correctly. 
    Here's the interesting thing:  It zips the files, and then when I use the size() method for zip files in java, it says 284 files.  But when I unzip, it says 288 again.  It's like there's files missing when compressed, but when decompressed, they return.  Note that the files are actually there.  If I open the archive in a third party app such as Winzip AND Winrar AND IZarc, they all show 288 files.  Any idea what would make the number of files appear incorrectly in a zip file when zipped by java with the code above?  Thanks in advance.
    - Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I figured out the problem. When zipping files in windows using winzip, it doesn't explicitly count folders as a "file/folder" as a file in itself. It will create the folders for files to go in, but the folder itself will not be 'counted' when you query the info of the file itself. You have more control of the zip file in java, and can count the folder as a file or not.

  • Java and abap stack connection

    Hello,
    how to check connection b/w Java and ABAP stack.
    I am getting below error :
    SAP:Code area="MAPPING">JCO_SYSTEM_FAILURE</SAP:Code>
      <SAP:P1>connection to partner 'localhost:0' broken / CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 t</SAP:P1>
    We did some upgrades of kernel and jvm and started getting this error.
    Please suggest

    Hi,
    Check this threads
    JCO_SYSTEM_FAILURE
    JCO_SYSTEM_FAILURE
    JCO_SYSTEM_FAILURE . Pls help
    Regards
    Ramesh

Maybe you are looking for

  • A zillion questions about setting up and using external hard drive

    Hello. I recently purchased a Cavalry 440GB CACE USB/FW800 7200 RPM 3.5 in Mac Formatted hard drive. My Mac is a Power PC G4 using OS X 10.2.8. After much back and forth with the Cavalry support desk, I was able to connect it to my Mac. (The USB cabl

  • My ipod was stolen how can i get my serial number?

    I have an older ipod classic that was stolen the other day, I looked in my itunes account to see if I could find the serial number, however it is not showing up, I also checked my itunes account and my device does not show there, I no longer have the

  • Accessing comapny code from the source file name

    Hi, Iam doing FILE –FILE to scenario. My source file name is XXXX237061606.txt. (XXXX is company code) My requirement is … Based on company code from the source file name; I need to send the file to the corresponding receiver. How to retrieve the com

  • How can I know my iPad is 3rd generation?

    How can I know my iPad is 3rd generation?

  • Call To perform from external program

    Hi , I have Perform in some Function (s_user_list) and i want to cal to this perform in other report, I try like that but i get error ,what it can be? REPORT  ztest_123. PERFORM check_para  IN PROGRAM s_user_list         USING  action <ls_details>