Java Hashmaps in jdk 1.4

Hi All,
I am trying to work out on a previous jdk 1.5 code for hashmap to be converted to jdk 1.4,
public HashMap<String, String> getDispalyLinkUrls() throws SQLException {
     HashMap<String, String> hashMapValues = new HashMap<String, String>();
My code looks like above...
I am getting an error, stating that invalide method declaration and return type required.. Please suggest me, in conversion of my code to jdk 1.4
Many Thanks!!

Hi All,
I am somehow still facin trouble with array list, as it is retrieving only one value or not the appropriate values from the database. Please correct my Hashmap code, wherein I have an object on a jsp, upon which I place the mouse, I should get an object drop down from the database. My JSP code looks like this:
<div id=Menu0 style="position: absolute; border: 1px solid #000000; visibility:hidden; z-ndex: 1">
<table bgcolor=white cellspacing=0 cellpadding=0 style="border-collapse: collapse;">
<%
DisplayLinkUrls displayLinkUrl = new DisplayLinkUrls();
HashMap<String, String> hmValues = displayLinkUrl.getDispalyLinkUrls();
for(String strKey :hmValues.keySet()) {
     %>
<tr height=25 onmouseout=menuOut(this,'#ffeecc') onmouseover=menuOver(this,'#FFFFFF')>
<td bgcolor=white>   </td><td align=right>
<a class=asd href="<%=hmValues.get(strKey)%>">  <%=strKey%>  </a>    </td></tr>
<%
%>
</table>
</div>
My Servlet to which it calls when connecting DB looks like this:
     public HashMap<String, String> getDispalyLinkUrls() throws SQLException {
     HashMap<String, String> hashMapValues = new HashMap<String, String>();
     //Set set = hashMapValues.entrySet();
//Iterator i=set.iterator();
          DisplayLinkUrls displayLinkUrl = new DisplayLinkUrls();     
          Statement stmt = displayLinkUrl.getDBConnection().createStatement();
          ResultSet rset = stmt.executeQuery("Select do.link_verbage, do.link_url from dw_user_group dug, dw_profile_object dpo, dw_object do where dug.user_id='AMAHAJAN' and dug.group_id=dpo.group_id and dpo.object_id=do.object_id and do.app_type_code='A' order by do.link_verbage");
          while (rset.next()) {
System.out.println(rset.getString("LINK_VERBAGE"));
hashMapValues.put(rset.getString("link_Verbage"), rset.getString("link_url"));
          stmt.close();
          return hashMapValues;
     public static void main(String args[]) throws SQLException {
     DisplayLinkUrls displayLinkUrl = new DisplayLinkUrls();
for(String url : displayLinkUrl.getDispalyLinkUrls().keySet()) {
System.out.println(url);
// System.out.println(displayLinkUrl.getDispalyLinkUrls().get(url));
Please suggest me.
Many Thanks!!

Similar Messages

  • Updating java when using JDK and JRE

    Ok, so after you make a program in java and compile it, you then install the new update of java. Wouldn't the virtual machine(JRE) or java development kit(JDK) notice something thats different and bring up an error?
    Do you have to use the same JDK as JRE that you have, because if you didn't have the most updated one, wouldn't there come up with an error?
    Last question, if you have used the command line to compile a program, then you know that you need to use javac to compile and java to run it. Well when you use the command javac to compile, then you are using the JDK; and if you use the java command to run it, then you are using JRE. This is just a question to make sure that I have this correct, So correct me if I'm wrong.

    brown16b wrote:
    Ok, so after you make a program in java and compile it, you then install the new update of java. Wouldn't the virtual machine(JRE) or java development kit(JDK) notice something thats different and bring up an error? Why? A newer Java version should be able to execute programs compiler for a prior version.
    Do you have to use the same JDK as JRE that you have, because if you didn't have the most updated one, wouldn't there come up with an error?Eh, what?
    Last question, if you have used the command line to compile a program, then you know that you need to use javac to compile and java to run it. Well when you use the command javac to compile, then you are using the JDK; and if you use the java command to run it, then you are using JRE. This is just a question to make sure that I have this correct, So correct me if I'm wrong.It's correct.

  • Pass java HASHMAP to oralce procedure

    Hi,
    I have Java HashMap(<key, value). Can i pass it to oracle procedure?
    I am using java 1.4 and oracle 10g.
    any help

    Hi,
    Some information, From the point of the view that the need is to pass an object from java to PLSQL or vice versa (Not HashMap, but data which can be manipulated in PLSQL)
    What you need to do/investigate is ..
    1. Load your java files to database (using loadjava integrated in JDev better, else seperately)
    2. Create PLSQL procedure for the java method using JDev)
    3. Define PLSQL object which you want to use as counter part of the java object. (Its reverse, first create plsql object)
    4. In jdeveloper connection navigator,use generte java to generate corresponding java object class.
    The above information is to fascilitate information exchange between java and PLSQL in terms of Objects. Based on one of projects I had done.
    If abouvGive a little try and probably you may be able to do reverse (first define Java OBject (you have HashMap here) and then the PLSQL Object.)
    Most of the things are automated in JDeveloper. Just explore it.
    Abdul Wahid

  • To run the java application without jdk package

    i would like to know whether possible to make the java .class file as .exe file to run in window environment without the help of jdk package.....if the answer is yes,,,,,is it going to use the jvm???is it come together with window os or not and start from which windows version?? or do we need to use the jre??? actually i would like to make installation package to install an application in windowsxp....i know how to do that one in vb and i've done that one before using visual studio 6.0.....is there any possible way....but please explain in easy words and way coz i might not understand if too technical...nobody can help me in my college,,,even lecturers.....thanks a lot

    i would like to know whether possible to make the java .class file as >>.exe file to run in window environment without the help of jdk >>package.....Yes it is possible, there are many tools like one mentioned above to convert your java .class program to .exe and you dont need jdk for that, though you will need JVM
    if the answer is yes,,,,,is it going to use the jvm???Yes it needs a JVM
    is it come together with window os or not and start from which windows >>version?? You need some tool like PJ2Exe or one mentioned above to convert it to .exe, it wont be available with OS.
    or do we need to use the jre???Yes you will need to install JRE for the JVM
    actually i would like to make installation package to install an >>application in windowsxp....i know how to do that one in vb and i've >>done that one before using visual studio 6.0.....is there any possible >>way....Yes it is possible,
    Make a .exe of your application and using VB make a setup file which takes care of installing JRE as well as your application.
    Regards
    Rohan

  • CORBA fail on java client over jdk 1.4.0.1

    Hi colleagues!
    I have adaptation of standalone java CORBA server onto WebLogic 6.1. So I
    make startup class (inherited from T3StartupDef) that starts thread in which
    my server runs the ORB. I use orb from JDK1.4.0.1.
    Client successfully locates the server and even server's implementation
    successfully handles the call and returns a value. After server's return I
    get on client next exception dump:
    org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    Method)
    at
    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
    sorImpl.java:39)
    at
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
    torAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:296)
    at java.lang.Class.newInstance(Class.java:249)
    at
    com.sun.corba.se.internal.iiop.messages.ReplyMessage_1_2.getSystemException(
    ReplyMessage_1_2.java:90)
    at
    com.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException(ClientR
    esponseImpl.java:105)
    at
    com.sun.corba.se.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.j
    ava:129)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    at
    Configurator._DataProviderFactoryStub.createRepository(_DataProviderFactoryS
    tub.java:23)
    at
    ... etc my client's code stack
    Couldn't somebody explain me what happened with CORBA (by JDK 1.4) under the
    WebLogic?
    Beforehand thanks!
    Sincerely yours.
    Max Voronoy.

    Thank you for reply, but:
    1) It rather easy to start WL 6.1 under the JDK 1.4, and it's fully
    functionally.
    2) Unfortunately the JDK 1.3 hasn't server side CORBA implementation.
    So, basing on these reasons I should use the JDK 1.4 with WL.
    "Andy Piper" <[email protected]> wrote in message
    news:[email protected]..
    "Max Voronoy" <[email protected]> writes:
    I have adaptation of standalone java CORBA server onto WebLogic 6.1. So
    I make startup
    class (inherited from T3StartupDef) that starts thread in which myserver runs the
    ORB. I use orb from JDK1.4.0.1.
    Client successfully locates the server and even server?s implementationsuccessfully
    handles the call and returns a value. After server?s return I get onclient next
    exception dump:
    org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)
    atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
    sorImpl.java:39)
    atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
    torAccessorImpl.java:27)
    atjava.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:296)
    at java.lang.Class.newInstance(Class.java:249)
    atcom.sun.corba.se.internal.iiop.messages.ReplyMessage_1_2.getSystemException(
    ReplyMessage_1_2.java:90)
    atcom.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException(ClientR
    esponseImpl.java:105)
    atcom.sun.corba.se.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.j
    ava:129)
    atorg.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    atConfigurator._DataProviderFactoryStub.createRepository(_DataProviderFactoryS
    tub.java:23)
    at
    .. etc my client?s code stack
    Couldn?t somebody explain me what happened with CORBA (by JDK 1.4) underthe WebLogic?
    Beforehand thanks!The JDK 1.4.0 orb is not supported under 6.1. You should probably try
    the 1.3.x ORB for whatever JDK version you are using.
    andy

  • IIOP fail on java client over jdk 1.4.0.1

    Hi colleagues!
    I have adaptation of standalone java CORBA server onto WebLogic 6.1. So I make startup
    class (inherited from T3StartupDef) that starts thread in which my server runs the
    ORB. I use orb from JDK1.4.0.1.
    Client successfully locates the server and even server?s implementation successfully
    handles the call and returns a value. After server?s return I get on client next
    exception dump:
    org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:296)
    at java.lang.Class.newInstance(Class.java:249)
    at com.sun.corba.se.internal.iiop.messages.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:90)
    at com.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:105)
    at com.sun.corba.se.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.java:129)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    at Configurator._DataProviderFactoryStub.createRepository(_DataProviderFactoryStub.java:23)
    at
    .. etc my client?s code stack
    Couldn?t somebody explain me what happened with CORBA (by JDK 1.4) under the WebLogic?
    Beforehand thanks!
    Sincerely yours.
    Max Voronoy.

    Thank you for reply, but:
    1) It rather easy to start WL 6.1 under the JDK 1.4, and it's fully
    functionally.
    2) Unfortunately the JDK 1.3 hasn't server side CORBA implementation.
    So, basing on these reasons I should use the JDK 1.4 with WL.
    "Andy Piper" <[email protected]> wrote in message
    news:[email protected]..
    "Max Voronoy" <[email protected]> writes:
    I have adaptation of standalone java CORBA server onto WebLogic 6.1. So
    I make startup
    class (inherited from T3StartupDef) that starts thread in which myserver runs the
    ORB. I use orb from JDK1.4.0.1.
    Client successfully locates the server and even server?s implementationsuccessfully
    handles the call and returns a value. After server?s return I get onclient next
    exception dump:
    org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)
    atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
    sorImpl.java:39)
    atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
    torAccessorImpl.java:27)
    atjava.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:296)
    at java.lang.Class.newInstance(Class.java:249)
    atcom.sun.corba.se.internal.iiop.messages.ReplyMessage_1_2.getSystemException(
    ReplyMessage_1_2.java:90)
    atcom.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException(ClientR
    esponseImpl.java:105)
    atcom.sun.corba.se.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.j
    ava:129)
    atorg.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    atConfigurator._DataProviderFactoryStub.createRepository(_DataProviderFactoryS
    tub.java:23)
    at
    .. etc my client?s code stack
    Couldn?t somebody explain me what happened with CORBA (by JDK 1.4) underthe WebLogic?
    Beforehand thanks!The JDK 1.4.0 orb is not supported under 6.1. You should probably try
    the 1.3.x ORB for whatever JDK version you are using.
    andy

  • Java 7 (oracle jdk 1.7) on CentOS 6.2 freezes hangs FUTEX_WAIT

    Hello,
    Recently have had problems with Java 1.7 this combination:
    CentOS 6.2
    linux kernel 2.6.32.57 (vanilla kernel)
    GRSecurity grsecurity-2.9-2.6.32.57-201202232125.patch
    When trying to run jdk1.7.0_04, java hangs with no error messages in /var/log/messages and cannot be killed leaving CPU at 100% forever, OS unable to shutdown. Only solution is to pull the power plug!
    top output ...
    ================================================================
    top - 10:12:40 up 5:05, 2 users, load average: 42.93, 42.56, 41.41
    Tasks: 190 total, 5 running, 184 sleeping, 0 stopped, 1 zombie
    Cpu(s): 0.0%us, 22.4%sy, 0.0%ni, 33.1%id, 44.5%wa, 0.0%hi, 0.0%si, 0.0%st
    Mem: 8139472k total, 1675248k used, 6464224k free, 24488k buffers
    Swap: 10289144k total, 0k used, 10289144k free, 1327228k cached
    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1753 testu 20 0 0 0 0 Z 101.2 0.0 274:19.18 java <defunct>
    ================================================================
    When I boot with the CentOS 6.2 kernel, java 1.7 runs fine.
    This same instance runs jdk 1.6 and jrockit 1.6 just fine
    ================================================================
    # ./java -version
    java version "1.6.0_31"
    Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
    Oracle JRockit(R) (build R28.2.3-13-149708-1.6.0_31-20120327-1523-linux-x86_64, compiled mode)
    (jdk-6u25-linux-x64.bin)
    # ./java -version
    java version "1.6.0_25"
    Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
    ================================================================
    JDK 1.6 is fine for now, but sooner or later, the server will need to run JDK 1.7. Wondering if anyone has come across this or if someone might have an idea what would get jdk 1.7 working. Or what other info I might supply to try to figure this out.
    Thanks!
    Not sure if it helps, but I straced the command...
    ================================================================
    # strace ./java -verbose -version
    execve("./java", ["./java", "-verbose", "-version"], [* 22 vars */]) = 0
    brk(0) = 0x600b18
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb7044000
    readlink("/proc/self/exe", "/root/store/jdk1.7.0_04/bin/java", 4096) = 32
    access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli/tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli/tls/x86_64", 0x7fffffffcd70) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli/tls/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli/tls", 0x7fffffffcd70) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli/x86_64", 0x7fffffffcd70) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../lib/amd64/jli", 0x7fffffffcd70) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/tls/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/tls/x86_64", 0x7fffffffcd70) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/tls/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/tls", 0x7fffffffcd70) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/x86_64/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/x86_64", 0x7fffffffcd70) = -1 ENOENT (No such file or directory)
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
    stat("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    open("/etc/ld.so.cache", O_RDONLY) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=57891, ...}) = 0
    mmap(NULL, 57891, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0bb7035000
    close(3) = 0
    open("/lib64/libpthread.so.0", O_RDONLY) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \\\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=138328, ...}) = 0
    mmap(NULL, 2208672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb6c0b000
    mprotect(0x7f0bb6c22000, 2093056, PROT_NONE) = 0
    mmap(0x7f0bb6e21000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f0bb6e21000
    mmap(0x7f0bb6e23000, 13216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0bb6e23000
    close(3) = 0
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/libjli.so", O_RDONLY) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\"\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=103718, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb7034000
    mmap(NULL, 2187192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb69f5000
    mprotect(0x7f0bb6a0b000, 2093056, PROT_NONE) = 0
    mmap(0x7f0bb6c0a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f0bb6c0a000
    close(3) = 0
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/lib64/libdl.so.2", O_RDONLY) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=19536, ...}) = 0
    mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb67f1000
    mprotect(0x7f0bb67f3000, 2097152, PROT_NONE) = 0
    mmap(0x7f0bb69f3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f0bb69f3000
    close(3) = 0
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/lib64/libc.so.6", O_RDONLY) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\355\1\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=1973416, ...}) = 0
    mmap(NULL, 3803304, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb6450000
    mprotect(0x7f0bb65e7000, 2097152, PROT_NONE) = 0
    mmap(0x7f0bb67e7000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x197000) = 0x7f0bb67e7000
    mmap(0x7f0bb67ec000, 18600, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0bb67ec000
    close(3) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb7033000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb7032000
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb7031000
    arch_prctl(ARCH_SET_FS, 0x7f0bb7032700) = 0
    mprotect(0x7f0bb67e7000, 16384, PROT_READ) = 0
    mprotect(0x7f0bb69f3000, 4096, PROT_READ) = 0
    mprotect(0x7f0bb6e21000, 4096, PROT_READ) = 0
    mprotect(0x7f0bb7046000, 4096, PROT_READ) = 0
    munmap(0x7f0bb7035000, 57891) = 0
    set_tid_address(0x7f0bb70329d0) = 1688
    set_robust_list(0x7f0bb70329e0, 0x18) = 0
    futex(0x7fffffffd67c, FUTEX_WAKE_PRIVATE, 1) = 0
    futex(0x7fffffffd67c, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f0bb7032700) = -1 EAGAIN (Resource temporarily unavailable)
    rt_sigaction(SIGRTMIN, {0x7f0bb6c10aa0, [], SA_RESTORER|SA_SIGINFO, 0x7f0bb6c1a4a0}, NULL, 8) = 0
    rt_sigaction(SIGRT_1, {0x7f0bb6c10b30, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f0bb6c1a4a0}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
    getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
    brk(0) = 0x600b18
    brk(0x621b18) = 0x621b18
    brk(0x622000) = 0x622000
    readlink("/proc/self/exe", "/root/store/jdk1.7.0_04/bin/java", 4096) = 32
    access("/root/store/jdk1.7.0_04/lib/amd64/libjava.so", F_OK) = -1 ENOENT (No such file or directory)
    access("/root/store/jdk1.7.0_04/jre/lib/amd64/libjava.so", F_OK) = 0
    open("/root/store/jdk1.7.0_04/jre/lib/amd64/jvm.cfg", O_RDONLY) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=677, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0bb7043000
    read(3, "# Copyright (c) 2003, Oracle and"..., 4096) = 677
    read(3, "", 4096) = 0
    close(3) = 0
    munmap(0x7f0bb7043000, 4096) = 0
    stat("/root/store/jdk1.7.0_04/jre/lib/amd64/server/libjvm.so", {st_mode=S_IFREG|0755, st_size=13498274, ...}) = 0
    futex(0x7f0bb69f40ec, FUTEX_WAKE_PRIVATE, 2147483647) = 0
    open("/root/store/jdk1.7.0_04/jre/lib/amd64/server/libjvm.so", O_RDONLY) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\223\31\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=13498274, ...}) = 0
    mmap(NULL, 13757672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb5731000
    mprotect(0x7f0bb6172000, 2093056, PROT_NONE) = 0
    mmap(0x7f0bb6371000, 671744, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa40000) = 0x7f0bb6371000
    mmap(0x7f0bb6415000, 240872, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f0bb6415000
    close(3) = 0
    open("/root/store/jdk1.7.0_04/bin/../jre/lib/amd64/jli/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/etc/ld.so.cache", O_RDONLY) = 3
    fstat(3, {st_mode=S_IFREG|0644, st_size=57891, ...}) = 0
    mmap(NULL, 57891, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f0bb7035000
    close(3) = 0
    open("/lib64/libm.so.6", O_RDONLY) = 3
    read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240>\0\0\0\0\0\0"..., 832) = 832
    fstat(3, {st_mode=S_IFREG|0755, st_size=595800, ...}) = 0
    mmap(NULL, 2633944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f0bb54ad000
    mprotect(0x7f0bb5530000, 2093056, PROT_NONE) = 0
    mmap(0x7f0bb572f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x82000) = 0x7f0bb572f000
    close(3) = 0
    mprotect(0x7f0bb572f000, 4096, PROT_READ) = 0
    munmap(0x7f0bb7035000, 57891) = 0
    mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f0bb6f30000
    mprotect(0x7f0bb6f30000, 4096, PROT_NONE) = 0
    clone(child_stack=0x7f0bb702fff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f0bb70309d0, tls=0x7f0bb7030700, child_tidptr=0x7f0bb70309d0) = 1689
    futex(0x7f0bb70309d0, FUTEX_WAIT, 1689, NULL
    ================================================================

    There is no official statement of certification for Java 8. We do support it, however, our stress testing is focused primary on Java 7.
    --mark

  • JWS not working after Java updates to JDK 1.6 update 24 (with apache felix)

    Hi,
    I'm currently working on some JWS application, which heavily relies on Apache Felix. It was working spotless until recent security update which comes along with Java 1.6u24. Now my application dies just when Apache Felix is starting to work.
    The exception being thrown is:
    SEVERE: Permission denied: http://felix.extensions:9/META-INF/services/javax.xml.parsers.SAXParserFactory
    java.lang.SecurityException: Permission denied: http://felix.extensions:9/META-INF/services/javax.xml.parsers.SAXParserFactory
         at com.sun.deploy.security.DeployURLClassPath$UrlLoader.findResource(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath.findResource(Unknown Source)
         at java.net.URLClassLoader$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findResource(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.findResource(Unknown Source)
         at java.lang.ClassLoader.getResource(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.access$001(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.JNLPClassLoader.getResource(Unknown Source)
         at java.lang.ClassLoader.getResource(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader.access$001(Unknown Source)
         at com.sun.jnlp.JNLPClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.JNLPClassLoader.getResource(Unknown Source)
         at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
         at javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.xml.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
         at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
         at javax.xml.parsers.FactoryFinder.find(Unknown Source)
         at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)     
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    In javaws.policy, java.policy I have set up proper security rules to enable JWS to work out of sandbox by specifying:
    grant {
    permission java.security.AllPermission;
    grant codeBase "http://felix.extensions:9/" {
    permission java.security.AllPermission;
    Also, I'm using maven's webstart-maven-plugin to create a JWS jnlp file. It's being property signed with security certificate. My resulting jnlp file has this part of configuration embedded:
    <security>
    <all-permissions />
    </security>
    Do You have any ideas what might be the problem?
    Cheers

    I just submitted a bug, and got the following e-mail.
    Hope the java guys take a look ...
    Full View
    Your Report (Review ID: 1990127) - SecurityException from all-permissions app - should be ClassNotFoundException
    From:     
    "[email protected]" <[email protected]>
    Add to Contacts
    To:     [email protected]     
    Dear Java Developer,
    Thank you for your interest in improving the quality of Java Technology.
    Your report has been assigned an internal review ID of 1990127, which is NOT visible on the Sun Developer Network (SDN).
    Please be aware that the large volume of reports we receive sometimes prevents us from responding individually to each message.
    If the information is determined to be a new Bug or RFE, or a duplicate of a known Bug or RFE, you will receive a followup email containing a seven digit bug number. You may search for, view, or vote for this bug in the Bug Database at http://bugs.sun.com/.
    If you just reported an issue that could have a major impact on your project and require a timely response, please consider purchasing one of the support offerings described at http://developers.sun.com/services/.
    The Sun Developer Network (http://developers.sun.com) is a free service that Sun offers. To join, visit http://developers.sun.com/global/join_sdn.html.
    Thank you for using our bug submit page.
    Regards,
    Java Developer Bug Report Review Team
    Date Created: Wed Mar 02 15:43:52 MST 2011
    Type: bug
    Customer Name: Reuben Pasquini
    Customer Email: [email protected]
    SDN ID: catdogboy
    status: Waiting
    Category: javawebstart
    Subcategory: other
    Company: http://frickjack.com
    release: 6u24
    hardware: x86
    OSversion: windows_7
    priority: 4
    Synopsis: SecurityException from all-permissions app - should be ClassNotFoundException
    Description:
    FULL PRODUCT VERSION :
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
    ADDITIONAL OS VERSION INFORMATION :
    Microsoft Windows [Version 6.1.7600]
    EXTRA RELEVANT SYSTEM CONFIGURATION :
    This is a java bug - I have users on WIndows 7 and XP, and also reported on Apache felix mailing list
    A DESCRIPTION OF THE PROBLEM :
    The following class, when bundled, signed, and deployed with the .jnlp file below, throws a
    SecurityException
    in the new java release - even though the .jnlp specifes "all-permissions".
    Past releases would throw a ClassNotFoundException - which is great,
    and is what things like Oracle's thin-client ojdbc6.jar expect.
    The program bootstraps the Felix OSGi engine - which apparently sets up a URLClassLoader with a custom felix:// URL.
    The output of running the program with webstart follows
    below the .jnlp file.
    Note that this .jnlp file is setup to run off the file system, but the same result follows from web-launched apps, whatever.
    package littleware.demo;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.sql.Connection;
    import java.util.HashMap;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.SwingUtilities;
    import javax.swing.WindowConstants;
    import org.apache.felix.framework.Felix;
    public class JavaToy {
    private static final Logger log = Logger.getLogger( JavaToy.class.getName() );
    public static class AppRunner implements Runnable {
    public void run() {
    final StringWriter swriter = new StringWriter();
    final PrintWriter pwriter = new PrintWriter( swriter );
    pwriter.append( "Class path: " ).append(
    System.getProperty( "java.class.path" )
    ).append( "\n\n-------------------------\n" );
    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    if ( classLoader instanceof URLClassLoader ) {
    pwriter.append( "URLClassLoader:\n" );
    for ( URL url : ((URLClassLoader) classLoader).getURLs() ) {
    pwriter.append( url.toString() ).append( "\n" );
    pwriter.append( "\n--------------------------------\n" );
    try {
    Class.forName( "bogus.DoesNotExist" );
    pwriter.append( "No exception thrown on bogus class load\n" );
    } catch ( Exception ex ) {
    pwriter.append( "Caught exception loading bogus class: " ).append( ex.toString() ).append( "\n" );
    ex.printStackTrace(pwriter);
    pwriter.flush();
    final JFrame jframe = new JFrame( "Webstart test" );
    final JTextArea jtext = new JTextArea( swriter.toString(), 20, 40 );
    jframe.add( new JScrollPane( jtext ) );
    jframe.pack();
    jframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    jframe.setVisible(true);
    public static void main( String[] args ) {
    try {
    log.log( Level.INFO, "Launching felix!" );
    (new Felix(new HashMap<String, Object>())).start();
    Thread.sleep( 2000 );
    } catch (Exception ex) {
    log.log(Level.SEVERE, "Caught exception", ex);
    System.exit(0);
    SwingUtilities.invokeLater( new AppRunner() );
    REGRESSION. Last worked in version 6
    STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
    *. Download felix.jar from
    http://felix.apache.org
    *. Build the following code, sign Toy.jar and felix.jar with your key,
    launch with the following .jnlp or something similar ....
    package littleware.demo;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.sql.Connection;
    import java.util.HashMap;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.SwingUtilities;
    import javax.swing.WindowConstants;
    import org.apache.felix.framework.Felix;
    public class JavaToy {
    private static final Logger log = Logger.getLogger( JavaToy.class.getName() );
    public static class AppRunner implements Runnable {
    public void run() {
    final StringWriter swriter = new StringWriter();
    final PrintWriter pwriter = new PrintWriter( swriter );
    pwriter.append( "Class path: " ).append(
    System.getProperty( "java.class.path" )
    ).append( "\n\n-------------------------\n" );
    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    if ( classLoader instanceof URLClassLoader ) {
    pwriter.append( "URLClassLoader:\n" );
    for ( URL url : ((URLClassLoader) classLoader).getURLs() ) {
    pwriter.append( url.toString() ).append( "\n" );
    pwriter.append( "\n--------------------------------\n" );
    try {
    Class.forName( "bogus.DoesNotExist" );
    pwriter.append( "No exception thrown on bogus class load\n" );
    } catch ( Exception ex ) {
    pwriter.append( "Caught exception loading bogus class: " ).append( ex.toString() ).append( "\n" );
    ex.printStackTrace(pwriter);
    pwriter.flush();
    final JFrame jframe = new JFrame( "Webstart test" );
    final JTextArea jtext = new JTextArea( swriter.toString(), 20, 40 );
    jframe.add( new JScrollPane( jtext ) );
    jframe.pack();
    jframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    jframe.setVisible(true);
    public static void main( String[] args ) {
    try {
    log.log( Level.INFO, "Launching felix!" );
    (new Felix(new HashMap<String, Object>())).start();
    Thread.sleep( 2000 );
    } catch (Exception ex) {
    log.log(Level.SEVERE, "Caught exception", ex);
    System.exit(0);
    SwingUtilities.invokeLater( new AppRunner() );
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <jnlp codebase="file:/C:/Users/pasquini/Documents/Code/JavaToy/dist/" href="launch.jnlp" spec="1.0+">
    <information>
    <title>JavaToy</title>
    <vendor>pasquini</vendor>
    <homepage href=""/>
    <description>JavaToy</description>
    <description kind="short">JavaToy</description>
    </information>
    <update check="always"/>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="JavaToy.jar" main="true"/>
    <jar href="lib/felix-2.0.4.jar"/>
    </resources>
    <application-desc main-class="littleware.demo.JavaToy">
    </application-desc>
    </jnlp>
    EXPECTED VERSUS ACTUAL BEHAVIOR :
    EXPECTED -
    Class path: C:\Program Files\Java\jre6\lib\deploy.jar
    URLClassLoader:
    file:/C:/Users/pasquini/Documents/Code/JavaToy/dist/JavaToy.jar
    file:/C:/Users/pasquini/Documents/Code/JavaToy/dist/lib/felix-2.0.4.jar
    http://felix.extensions:9/
    Caught exception loading bogus class: java.lang.ClassNotFoundException: bogus.DoesNotExist
    java.lang.ClassNotFoundException: bogus.DoesNotExist
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at littleware.demo.JavaToy$AppRunner.run(JavaToy.java:39)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    ACTUAL -
    Class path: C:\\Program Files (x86)\\Java\\jre6\\lib\\deploy.jar
    URLClassLoader:
    file:/C:/Users/pasquini/Documents/Code/JavaToy/dist/JavaToy.jar
    file:/C:/Users/pasquini/Documents/Code/JavaToy/dist/lib/felix-2.0.4.jar
    http://felix.extensions:9/
    Caught exception loading bogus class: java.lang.SecurityException: Permission denied: http://felix.extensions:9/bogus/DoesNotExist.class
    java.lang.SecurityException: Permission denied: http://felix.extensions:9/bogus/DoesNotExist.class
    at com.sun.deploy.security.DeployURLClassPath$UrlLoader.getResource(Unknown Source)
    at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at littleware.demo.JavaToy$AppRunner.run(JavaToy.java:39)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    REPRODUCIBILITY :
    This bug can be reproduced always.
    ---------- BEGIN SOURCE ----------
    package littleware.demo;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.sql.Connection;
    import java.util.HashMap;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.SwingUtilities;
    import javax.swing.WindowConstants;
    import org.apache.felix.framework.Felix;
    public class JavaToy {
    private static final Logger log = Logger.getLogger( JavaToy.class.getName() );
    public static class AppRunner implements Runnable {
    public void run() {
    final StringWriter swriter = new StringWriter();
    final PrintWriter pwriter = new PrintWriter( swriter );
    pwriter.append( "Class path: " ).append(
    System.getProperty( "java.class.path" )
    ).append( "\n\n-------------------------\n" );
    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    if ( classLoader instanceof URLClassLoader ) {
    pwriter.append( "URLClassLoader:\n" );
    for ( URL url : ((URLClassLoader) classLoader).getURLs() ) {
    pwriter.append( url.toString() ).append( "\n" );
    pwriter.append( "\n--------------------------------\n" );
    try {
    Class.forName( "bogus.DoesNotExist" );
    pwriter.append( "No exception thrown on bogus class load\n" );
    } catch ( Exception ex ) {
    pwriter.append( "Caught exception loading bogus class: " ).append( ex.toString() ).append( "\n" );
    ex.printStackTrace(pwriter);
    pwriter.flush();
    final JFrame jframe = new JFrame( "Webstart test" );
    final JTextArea jtext = new JTextArea( swriter.toString(), 20, 40 );
    jframe.add( new JScrollPane( jtext ) );
    jframe.pack();
    jframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    jframe.setVisible(true);
    public static void main( String[] args ) {
    try {
    log.log( Level.INFO, "Launching felix!" );
    (new Felix(new HashMap<String, Object>())).start();
    Thread.sleep( 2000 );
    } catch (Exception ex) {
    log.log(Level.SEVERE, "Caught exception", ex);
    System.exit(0);
    SwingUtilities.invokeLater( new AppRunner() );
    ---------- END SOURCE ----------
    CUSTOMER SUBMITTED WORKAROUND :
    I can work around the problem by installing the app locally, so web-start is not necessary. I ran into this problem with an app that connects to Oracle via ojdbc6.jar - ojdbc6.jar invokes "Class.forName" to check for optional i18n classes on the class path. The Oracle code correctly handles the correct ClassNotFoundException, but the new SecurityException is breaking my app.
    workaround:

  • The '$' character no more allowed in java identifier since JDK 1.4.2 ?

    Since JDK 1.4.2, I'm no more able to compile java
    sources. :-((
    Their compilation worked fine on 1.3 and 1.4.1.
    Note that these java sources are generated automatcally
    via a tool.
    <b>The $ (dollar) character seems to be no more allowed
    in java identifier.</b>
    Here is a part of the Java Language Specification (second edition):
    "An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter.
    An identifier cannot have the same spelling (Unicode character sequence) as a keyword (�3.9), boolean literal (�3.10.3), or the null literal (�3.10.7).
    A "Java letter" is a character for which the method
    Character.isJavaIdentifierStart returns true.
    A "Java letter-or-digit" is a character for which the method Character.isJavaIdentifierPart returns true.
    The Java letters include uppercase and lowercase ASCII Latin letters A-Z (\u0041-\u005a), and a-z (\u0061-\u007a), and, for historical reasons, the ASCII underscore (_, or \u005f) and dollar sign ($, or \u0024). The $ character should be used only in
    mechanically generated source code or, rarely, to access preexisting names on legacy systems.
    Here is the result of the Character methods on JDK 1.4.2:
    <code>
    Character.isJavaIdentifierPart('$'): true
    Character.isJavaIdentifierStart('$'): true
    </code>
    Here are two very samples java sources which reproduce
    this probleme
    <code>
    package sb;
    public interface Essai {
    public void method1(int i);
    public static class InnerClass {
    public void test() {};
    public void setInnerClass(InnerClass ic);
    package sb;
    public class EssaiImpl implements Essai {
    public void method1(int p1) {
    public void setInnerClass(sb.Essai$InnerClass p1) {
    </code>

    public void setInnerClass(sb.Essai$InnerClass p1) {There is no type named Essai$InnerClass defined anywhere in your program. That is an error in your program that previous compilers failed to detect.

  • PDF to .Doc or Docx converter by core java using standard JDK

    Hi
    is it possible to convert a PDF file to .doc and .docx by standard JDK or JRE library without using any thirdparty library?if it is can anyone give me any pointer class reference to start the thing.I need core JAVA function who will simply accept a .pdf file and convert it to .doc.
    kind regards
    Edited by: no one on Oct 3, 2011 12:17 AM
    Edited by: EJP on 3/10/2011 16:20: typos/spelling errors

    so i need to download poi-bin-3.7-20101029.tar.gzYou need to download the latest stable release
    from http://poi.apache.org/download.html
    from wherever you download it from
    and install it $JAVA_HOME/ext??
    Definitely not.* Install it whereever its instructions say, or at least on your CLASSPATH, and tell your IDE about it too.
    Any instruction for its usage??It comes with documentation. This is not an Apache POI help desk. You're asking all these questions in the wrong place.

  • Stupid Java Development Question (JDK? XCode?)

    I'm brand new to OS X, so forgive my noobness. I'm still getting used to OS X.
    I'm doing this little Java tutorial. It says I need to download an install the Java JDK. As I understand it, Java is already built into OS X and I need to use XCode to create and compile Java programs instead of the JDK....where the heck is XCode?
    If anyone knows, I could really use some help. Just finished going through the basics of how to make simple programs in Java but I don't know what to do! Lol. I feel so dumb. I kind of want to call Apple, but I think I'd feel to stupid. I think I have to download XCode? That's what I'm doing now. I had to sign up with the ADC. It's a big file though, 915MB, and it's probably going to take around an hour. I hope someone can tell me if I'm doing the right thing or not before then. I'm guessing I just download this and use this to write Java? How then do I compile? The tutorial is telling me to go to the command prompt and do:
    Code:
    javac filename.java
    to compile the class and then,
    Code:
    java classname
    to execute.
    I'm guessing that in OS X I'm going to use the terminal to accomplish this?
    Any help would be appreciated. I feel really dumb right now. The tutorial only covers how to do this in Windows and Solaris.

    Hi Ralph
    I'm doing this little Java tutorial. It says I need
    to download an install the Java JDK. As I understand
    it, Java is already built into OS X and I need to use
    XCode to create and compile Java programs instead of
    the JDK....where the heck is XCode?
    Go to http://developer.apple.com/ and sign up for a free Apple Developer Connection account. Once you've logged in, go to Downloads and you'll be able to find the latest versions of Xcode and Java. When it comes to downloading Java, take care to choose the version which matches your hardware and version of OS X.
    [snip] It's a big file though, 915MB,
    and it's probably going to take around an hour. I
    hope someone can tell me if I'm doing the right thing
    or not before then. I'm guessing I just download this
    and use this to write Java? How then do I compile?
    Yes - they're big files and you need to persevere with the downloads. Once you've got Xcode and Java installed, you can find some newby tutorials on my web page here:
    http://www.cems.uwe.ac.uk/~lrlang/javasoundmusic/index.html
    You'll find the links to tutorials near the bottom of the page.
    The tutorial is telling me to go to the command
    prompt and do:
    Code:
    javac filename.java
    to compile the class and then,
    Code:
    java classname
    to execute.
    I'm guessing that in OS X I'm going to use the
    terminal to accomplish this?
    Yes. This technique works for any Unix system (including OS X), and I used to teach my students to work this way, but I no longer recommend it. As you guessed, you have to type in these commands into the Utilities/Terminal program. However, to be effective you also need to know a number of other Unix commands like "cd" "ls", "pwd" and a few more which you can find in any introductory book on Unix. You also need to use a text editor (such as TextEdit) to create your Java source files and then save them to the hard disk. While this technique will work, you won't get the syntax highlighting and colouring that is offered by the Xcode editor.
    Any help would be appreciated. I feel really dumb
    right now. The tutorial only covers how to do this
    in Windows and Solaris.
    I think that if you follow my tutorials you will very quickly get up and running with Java development. I hope you enjoy working with Java as much as I do. You can always come back here if you need more help.
    Bob

  • Storing a Java HashMap in a Table

    Hi! I would like to know how to store a HashMap in an Oracle table and if so how should I create the Table with suitable column type.Thanks

    Each entry in your HashMap is a Map.Entry with one Java Object representing its Key and another representing its Value. You need a table with at least two columns to store this information, one for the Key and one for the Value.
    The data types you need in this table will be determined by the data types you are using for these two objects in your HashMap. For example, if I use a character Key of no more than 40 characters but of variable length I would create a column of datatype VARCHAR(40) NOT NULL to hold these values and if my Value objects were really floating point numbers I would use a DOUBLE and so on.
    If you have a mixture of Object types for the Key or the Value you are going to have to store a generalized representation of the object types; see topics discussing storage of serialized or XML object representations in a relational database.

  • Problem with installing Java EE with JDK Bundle

    Hello everyone
    I downloaded the Java EE SDK with JDK update 25 bundle for linux
    The file end in .sh. however when I run the executable I get the no jar found message. Do I need to install jdk before I install jee and if I do then why do they provide them bundled if you have to have the jdk first before installing jee.
    Another question also, how do I change my handle in this forum? I didn't pick this number!!

    Yes, it is a bit stupid. You need the jar command which usually is available if you have a JDK installed but there are other ways of just installing just jar. Also note that some people already have an older JDK installed, thus jar is available and when they install this bundle they get a newer JDK.
    Anyway, for changing your handle, you can do that from 'Your Control Panel' and then Edit your profile.

  • Collision in Java HashMap

    I am under the expression that if two key-value pairs hash to the same position, both values will be stored at the same hashcode position and no value will be overwritten. However, why is the following code giving me different result? Can anyone explain please
    Thank you
    Xin
    import java.util.HashMap;
    import java.util.Hashtable;
    * @author xint
    public class Main {
    * @param args the command line arguments
    public static void main(String[] args) {
    // Test collision in HashMap
    HashMap<String, String> hm = new HashMap<String,String>();
    hm.put("xint", "University of Toronto");
    hm.put("xint", "University of California");
    System.out.println(hm.containsValue("University of Toronto"));
    }

    xerox.time wrote:
    I am under the expression that if two key-value pairs hash to the same position, both values will be stored at the same hashcode position and no value will be overwritten. However, why is the following code giving me different result? Can anyone explain please Nothing will be overwritten if the keys are not equal.
    Here you have two keys that not only have the same hashCode, but also are equal(). If you had two keys that had the same hashCode but were not equal, then they would hash to the same bucket, but both would be present in the map--neither would overwrite the other.
    In the future, when posting code, use code tags so it will be readable. Copy/paste from your original source in your editor, highlight the code, and click the CODE button.

  • Where is Java DB in JDK 6?

    The Java DB documentation seems to tell us only that it's now in JDK 6. The JDK 6 documentation seems to tell us only that JDK 6 "co-bundles" Java DB. If the documentation answers my question, the answer is not easy to find.
    Attempting to follow the NetBeans instructions for [Working with the Java DB (Derby) Database|http://www.netbeans.org/kb/docs/ide/java-db.html], "Configuring the Database" starts with "If you have the GlassFish Server registered in your NetBeans IDE installation ... If you downloaded GlassFish (or Sun Java System Application Server) separately ... If you just downloaded Java DB on its own ..." None of those apply, so I skip ahead to "Registering the Database in NetBeans IDE".
    In NetBeans, I opened the "Java DB Properties" dialog. The instructions then tell us, "For the Java DB Installation text field, enter the path to the Java DB root directory (javadb) ...".
    I tried to find "javadb" on a Solaris 10 computer, where JDK 6 is installed:
    fonzie% javac -version
    javac 1.6.0_12
    fonzie% which java
    /bin/java
    fonzie% ls -l /bin
    lrwxrwxrwx   1 root     root           9 Dec  9 19:14 /bin -> ./usr/bin
    fonzie% ls -l /bin/java
    lrwxrwxrwx   1 root     other         16 Dec  9 19:19 /bin/java -> ../java/bin/java
    fonzie% ls -l /usr/java
    lrwxrwxrwx   1 root     root          10 Feb 14 20:20 /usr/java -> jdk/latest
    fonzie% ls -l /usr/jdk/latest
    lrwxrwxrwx   1 root     other         11 Feb 14 17:12 /usr/jdk/latest -> jdk1.6.0_12
    fonzie% ls -l /usr/jdk/jdk1.6.0_12
    lrwxrwxrwx   1 root     other         18 Feb 14 17:12 /usr/jdk/jdk1.6.0_12 -> instances/jdk1.6.0
    fonzie% find /usr/jdk/instances/jdk1.6.0 -name javadb
    fonzie% ls -l /usr/jdk/instances/jdk1.6.0
    total 37962
    drwxr-xr-x   3 root     bin         1024 Feb 14 17:34 bin
    -rw-r--r--   1 root     bin         3767 Jan 17 04:42 COPYRIGHT
    drwxr-xr-x  11 root     bin          512 Feb 14 17:19 demo
    drwxr-xr-x   3 root     bin          512 Feb 14 17:15 include
    drwxr-xr-x   6 root     bin          512 Feb 14 17:11 jre
    drwxr-xr-x   3 root     bin          512 Feb 14 17:15 lib
    -rw-r--r--   1 root     bin        17058 Jan 17 04:42 LICENSE
    drwxr-xr-x   3 root     bin          512 Feb 14 17:18 man
    -rw-r--r--   1 root     bin        28599 Jan 17 04:42 README.html
    -rw-r--r--   1 root     bin        25390 Jan 17 04:42 README_ja.html
    -rw-r--r--   1 root     bin        20768 Jan 17 04:42 README_zh_CN.html
    -r--r--r--   1 root     other       7385 Feb 14 17:35 register.html
    -r--r--r--   1 root     other       7817 Feb 14 17:35 register_ja.html
    -r--r--r--   1 root     other       6995 Feb 14 17:35 register_zh_CN.html
    drwxr-xr-x  10 root     bin          512 Feb 14 17:19 sample
    -rw-r--r--   1 root     bin      19018803 Jan 17 04:40 src.zip
    -rw-r--r--   1 root     bin       249556 Jan 17 04:42 THIRDPARTYLICENSEREADME.txt
    fonzie% Alan M. Feldstein
    [Cosmic Horizon|http://www.alanfeldstein.com/]

    masijade. wrote:
    find / -name Sun
    // or
    find / -name javadb
    // or
    find / -name sunIOW, it is bundled with jdk 6, but (at least on windows) it is not located in the jdk 6 directory, but somewhere else. On windows it is "Program Files/Sun/JavaDB", use that as a possible reference as to where it might be in Unix. I, currently, do not have a Unix system in front of me to check it with.
    You might, however, check to see if the environment variable DERBY_HOME is set.javadb is found:
    # find / -name javadb
    /usr/appserver/javadb
    # exit
    fonzie% ls -l /usr/appserver/javadb
    total 48
    -rwxr-xr-x   1 root     bin         6723 Aug 17  2005 CHANGES
    -rwxr-xr-x   1 root     bin          253 Aug 17  2005 COPYRIGHT
    drwxr-xr-x   4 root     bin          512 Dec  9 19:38 frameworks
    drwxr-xr-x   2 root     bin          512 Dec  9 19:38 lib
    -rwxr-xr-x   1 root     bin        11358 Aug 17  2005 LICENSE
    -rwxr-xr-x   1 root     bin         1032 Aug 17  2005 NOTICE
    fonzie% ls -l /usr/appserver/javadb/lib
    total 14430
    -rwxr-xr-x   1 root     bin       295353 Aug 17  2005 derbyclient.jar
    -rwxr-xr-x   1 root     bin      2143211 Aug 17  2005 derby.jar
    -rwxr-xr-x   1 root     bin        71262 Aug 17  2005 derbyLocale_de_DE.jar
    -rwxr-xr-x   1 root     bin        66757 Aug 17  2005 derbyLocale_es.jar
    -rwxr-xr-x   1 root     bin        70900 Aug 17  2005 derbyLocale_fr.jar
    -rwxr-xr-x   1 root     bin        66286 Aug 17  2005 derbyLocale_it.jar
    -rwxr-xr-x   1 root     bin        78765 Aug 17  2005 derbyLocale_ja_JP.jar
    -rwxr-xr-x   1 root     bin        73936 Aug 17  2005 derbyLocale_ko_KR.jar
    -rwxr-xr-x   1 root     bin        67819 Aug 17  2005 derbyLocale_pt_BR.jar
    -rwxr-xr-x   1 root     bin        67419 Aug 17  2005 derbyLocale_zh_CN.jar
    -rwxr-xr-x   1 root     bin        69426 Aug 17  2005 derbyLocale_zh_TW.jar
    -rwxr-xr-x   1 root     bin       163219 Aug 17  2005 derbynet.jar
    -rwxr-xr-x   1 root     bin      3938846 Aug 17  2005 derbyTesting.jar
    -rwxr-xr-x   1 root     bin       151937 Aug 17  2005 derbytools.jar
    -rwxr-xr-x   1 root     bin          729 Aug 17  2005 derby.war
    fonzie% echo $DERBY_HOME
    /opt/Derby_10
    fonzie% I don't know/remember where /usr/appserver/javadb comes from, but I suspect that it did not come from JDK 6. DERBY_HOME was certainly set by me, as I have been working with Apache Derby for some time. I'm exploring how I might break my dependency on downloads from apache.org.
    The README is helpful, revealing that I should have /opt/SUNWjavadb. I don't. (The answer to my question is very system-dependent, isn't it?) I downloaded jdk-6u12-solaris-sparc.tar.Z again and found its top-level content to be:
    fonzie% ls -l
    total 728
    -rw-r--r--   1 alan     staff       3767 Jan 23 11:44 COPYRIGHT
    -rw-r--r--   1 alan     staff      17058 Jan 23 11:44 LICENSE
    -rw-r--r--   1 alan     staff      28599 Jan 23 11:44 README.html
    -rw-r--r--   1 alan     staff      25390 Jan 23 11:44 README_ja.html
    -rw-r--r--   1 alan     staff      20768 Jan 23 11:44 README_zh_CN.html
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWj6cfg
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWj6dev
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWj6dmo
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWj6jmp
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWj6man
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWj6rt
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWjavadb-client
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWjavadb-common
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWjavadb-core
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWjavadb-demo
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWjavadb-docs
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWjavadb-javadoc
    drwxr-xr-x   4 alan     staff        512 Jan 23 11:44 SUNWjavadb-service
    -rw-r--r--   1 alan     staff     249556 Jan 23 11:44 THIRDPARTYLICENSEREADME.txt
    fonzie% But the JDK installation instructions say nothing about SUNWjavadb. Although Java DB is "co-bundled" with JDK 6, it is far too easy to accidentally not install it.

Maybe you are looking for

  • My microsoft office 2011 for mac has stopped working on my macbook pro retina please help!!!

    I have 10.8.2 running on my macbook pro retina 15' and suddenly microsoft office wont work on it and i have no clue as to what it is. can someone pleaseshed some light onto what the issue could be?

  • [E71-1] Nokia messaging not sync even after firmwa...

    Hi all, For the past 3 months, my Nokia messaging is not SYNC automatically again from my Nokia E71-1. Yesterday I tried to firmware upgrade my E71-1 (to latest firmware ver 410.21.010); and install Nokia Messaging from OVI store. And then after 1st

  • Multiple MIDI tracks to one instrument?

    The plugin is Ultrabeat. I like putting the kick onto one MIDI track the snare into another MIDI track, hats on another, etc.... Problem is, all of the MIDI tracks that route to the Ultrabeat are the actual instrument track that has the plugin insert

  • No Signal Recording Live Audio w/ MBox

    Sorry if this is a tired subject here. I'm trying to record live audio via the MBox2. I've checked Logic preferences and changed devices to MBox. I've checked system preferences and changed input to MBox and output to built in audio. (1/8 inch headph

  • Running Out of HD space

    Although I've had my MacBook for a year now, I don't know how to cleanup my HD.I have only 3GB left on my HD. I thought maybe moving my TV episodes to my external drive would help. How do I do it???