Launching a 64 bit jvm from a 32 bit jvm

I want to launch a 64 bit jvm from a 32 bit jvm. The current application works like this
1) The parent jvm A allows users to launch a child jvm B. Child jvm B inherits A's libraries (LD_LIBRARY_PATH) and also A's classpath entries.
2) User can specify his/her own libraries that are to be passed to B (child jvm). These entries are prepended to the inherited entries (A.LD_LIBRARY_PATH).
3) User can specify his/her own classpath entries that are to be added to B. These entries are appended to the inherited entries (A.classapth).
The whole idea behind making the child jvm configurable is that the user can specify a suitable jvm for the child. But optionally the user might specify a different java home (pointing to a 64bit jre/jdk).
Questions :
1) Would simply changing the java for the child suffice? That is instead of
java -classpath=<inherited-entries:specified-entries> abc
we do
-user-specified-java -classpath=<inherited-entries:specified-entries> abc
I have seen that the jvm uses the java.home from the java provided while launching the jvm. Example
$java -version
1.5
$java abc
// will use default java's home as java home internally
$/usr/lib/java-64/jdk/bin/java -version
1.5 64bit
$/usr/lib/java-64/jdk/binjava abc
// will use /usr/lib/java-64/jdk as java home internally
2) How will the classpath entries and libraries interact/interfere with the newly spawned jvm?
Here if the user specifies new libraries for 64 bit jvm, how will they interact/interfere with the 32bit libs.
3) What about native(esp jni) libraries?
Bigger picture :
If A is running sun java jdk1.5_a (32bit) and user can specify B as
1) sun jdk 1.x_y (32bit) such that x_y != 5_a
2) sun jdk 64 bit
3) any other 32 bit java implementation (ibm, jrocket ...)
4) any other 64 bit java implementation (ibm, jrocket ...)

jschell wrote:
Questions :
1) Would simply changing the java for the child suffice? That is instead of
java -classpath=<inherited-entries:specified-entries> abc
we do
-user-specified-java -classpath=<inherited-entries:specified-entries> abc
You cannot do it without creating a new process.
ProcessBuilder/Runtime.exec() create a new process. The new process can do anything.
You can set the environment using either.
Yes. The process B will be spawned either using ProcessBuilder or using Runtime. The question still remains,
Q: If I have a classpath defined already for a particular java implementation and the LD_LIBRARY path is all set, what will be effect of changing the default java.
Example :
If my classpath and LD_LIBRARY_PATH is set to use/work-with /usr/lib/javaA/ then
"/usr/lib/javaA/jre/bin/java -classpath $classpath abc" will work smoothly
But what will happen if I do classpath=$classpath:$new-javaB-classpath-entries and LD_LIBRARY_PATH=$LD_LIBRARY_PATH_FOR_B:$LD_LIBRARY_PATH and
"/usr/lib/javaB/jre/bin/java -classpath $classpath abc"
>
2) How will the classpath entries and libraries interact/interfere with the newly spawned jvm?
Here if the user specifies new libraries for 64 bit jvm, how will they interact/interfere with the 32bit libs.
3) What about native(esp jni) libraries?
New process = new environment.
If there is a problem it is because of how you set it up or how they are used in the first place.I am more interested in the if. My question is can it happen and if yes whats the explanation and how to solve it.
>
As an example if an app needs a 64 bit library and there is only a 32 bit library then what happens depends entirely on the app that needs the 64 bit library. That question would be the same if you attempted to run the application from a console window.So here is another way of looking at it. Imagine you want to kick off a 64 bit java app from your console. Assume that you can only prepend to classpath. Also you can append to LD path. Now you have provided all that is needed for the app to run. But under the classpath constraints, what will be the behaviour?

Similar Messages

  • How to use Windows SIM to create answer files for 32-bit (x86) Windows 7 from a 64-bit (x86_64) Windows 7 PC?

    So I'm having the old 32-bit/64-bit compatibility issues with Windows SIM. I have a Windows 7 64-bit PC (actually a virtual machine) that I intend to use to run Windows SIM and make answer files for 32-bit Windows 7 unattended installations.
    I've installed the latest Windows ADK (the Win 8.1 one). When doing this there was no choice of download or prompt during installation regarding 32-bit or 64-bit architectures. Once installed the Windows Kits folder is under Program Files (x86), but imgmgr.exe
    is a 64-bit executable. When I try and generate the catalog for a 32 bit install.wim, I get an error that 64-bit SIM cannot catalog 32-bit images.
    Is there any way to install a version of Windows SIM on a 64-bit Windows 7 PC that can catalog 32-bit Windows 7 images?

    Hi,
    I think the biggest problem is the architecture specific in answer file:
    <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OEMInformation>
    <Manufacturer>[ REPLACE WITH COMPANY NAME ]</Manufacturer>
    <SupportURL>[ REPLACE WITH SUPPORT WEBSITE ]</SupportURL>
    </OEMInformation>
            </component>
        </settings>
    The answer file must include processor-specific components. The answer-file settings in the windowsPE configuration pass must match the architecture type of the preinstallation environment. The settings that apply to the Windows image must match the architecture
    type of the image. For example, if you create an answer file that deploys 64-bit images from a 32-bit preinstallation environment, all components in the answer file for the windowsPE configuration pass must include the processor attribute type of x86. Settings
    to be applied in the specialize, oobeSystem, or other configuration passes must include the processor attribute type of amd64.
    If you have any feedback on our support, please click
    here
    Alex Zhao
    TechNet Community Support

  • How to extract 64 bit data from imaq image using IMAQ Extract VI

    I have LV 8.5.1, Vision 8.5 and need to extract 64 bit data from a 64 bit image and I get the "invalid image" error while using the IMAQ Extract VI.  What version of Vision do I need to allow me to do this? 
    Currently, the work-around I have...
    1) convert the image to 32bit
    2) use the ROI tools I to get the rectangle data I need
    3) then go back to the original image and the convert the image to a 64 bit array
    4) take the rectangle data to extract the data needed out of the 64 bit array data.
    klunky but it works.  I would think that the IMAQ Extract tool should allow me to extract the 64 bit data but it doesnt... forces me to 32 bit.
    suggestions?

    steve05ram360 wrote:
    awesome, that does work. 
    Attached DLL slightly corrected and should be OK also "in place" when Dst is not connected like original IMAQ function. Hopefully it works properly now. By the way all IMAQ types are supported, not only U64.
    Andrey.
    Attachments:
    ADVExtractDLL.zip ‏9 KB

  • Switching back from 64 bit jvm process to 32 bit process

    I have my customer, go-live on WLS 9.2 MP2 on Sun Solaris 10 on 64 -bit. We have faced several crashes related to different reasons. I had applied 3X4R patch from Weblogic as well. Now, because they are on production and server crash is unacceptable, I need to rollback to 32 bit version that is more stable. So, can anyone point me to documentation that states the steps to rolling back to 32 bit process from 64 bit. The concern here is to ensure that rolling back along with 64 bit patches from weblogic shouldn't create any new issue.
    Please let me know.
    Thanks.

    First of all I am kind of surprised you've got a
    speed gain of 20% using the 64 bit mode. I thought in
    general there was not much speed gain and sometimes
    even a loss of performance. My own reason for using
    64bit mode is to be able to address more than 4gb of
    memory.
    Saying that, it seems you have the choice of either
    run in 64bit mode and connect somehow (RMI???) to a
    32bit JVM that will run your 32bit native libraries.
    This seems to be a bit of a fragile and dingy
    solution to me, which probably quickly loses any
    speedgains you get from running in 64bit mode.
    Or you just go for the 32bit mode all over, and hope
    that some day in future your 3rd part libraries
    become available in 64 bit mode.
    Honestly, unless you're going to address lots of
    memory, I think this last solution is the most viable
    option.Good advice!

  • How to launch a new JVM from a java class?

    I want to update a runing java applicaton. Before updating it, I have to shut down this application and open a new JVM (launch another java class with main method inside another JVM). Then update this application. After updating, restart this application. How to do it?? Thanks. Gary

    Hi!
    I'm using an applet to upload a library in the ext directory and then opening another applet that uses that library...
    If I manually upload the library the second applet works
    but if I try to load it at runtime with the first applet the file is saved correctly but the second applet doesn,t work :((
    the second applet works only if I close the browser and open it again...:((
    I need to reaload the JVM at runtime or maybe opening a new one...
    can anyone help me?
    please reply me if you found anything similar,
    ciao!
    fabibu

  • Migration from Oracle 9i 32 bit to Oracle 10G 64 bit on Windows 2003 Server

    I am working on migrating Oracle 9i 32 bit to Oracle 10G 64 bit on Windows 2003 from Old server to new server. We have db around 500 GB and 3 schemas. I installed Oracle 10G on new server, created tablespaces, schema's blah blah and now doing export and import at schema level from old server to new server.
    Import is taking more than 4 to 5 hours on new server. My manager is saying, window time is bit longer and he wants me to try possiblities to make this process faster. Can some one help me on this, to use the best possible method to complete this process faster?
    Will below step work, if I try?
    If I install, oracle 9i and 10g both on new server in different home directories and take the hot backup from old machine and restore on new machine in 9i home directory and use the upgrade configuration assistant from 10g and do the upgrade? Pls advice.
    Thanks in advance,
    Hari babu
    Edited by: user6367891 on Mar 2, 2010 5:28 AM

    It looks good.
    I have one question in below steps:
    To migrate an Oracle9i or older database to an Oracle Database 10g Release 1 (10.1) database for 64-bit Windows:
    1 Perform steps 1 - 11 in "Migrating an Oracle Database 10g Release 1 (10.1) Database".
    2 Shut down the database on the 64-bit computer:
    SQL> SHUTDOWN IMMEDIATE;
    3 Start the database migration:
    SQL> STARTUP MIGRATE;
    4 Migrate the database as described in Chapter 3, "Upgrading a Database to the New Oracle Database 10g Release" in Oracle Database Upgrade Guide.
    In step 4, it says, migrate database as described in chapter 3. In chapter 3, it says, to do the upgrade the process using dbca or manually. Pls confirm whether do the upgrade process after issuing startup migrate or not.
    Thanks in advance.

  • Error on running JVM from a C program

    Hello there!!
    I'm using Open Watcom as a C compiler on Windows XP. I'm trying to run a JVM from a C program.
    I have specified the following as a library file :
    C:\Java\jdk1.5.0_04\lib\jvm.lib
    The code compiles very well, but I'm getting an error when running it.
    Windows tells me the following :
    "The entry point of the function ??_7VM_GetCurrentLocation@@6B@ can't be found in jvm.dll dynamic linking library"
    The code I've been trying to run is the following one :
    #include <jni.h>
    #include <stdio.h>
    #include <stdlib.h>
    void main()
    JavaVMOption options[3];
    JavaVMInitArgs vm_args;
    JavaVM *jvm;
    JNIEnv *jenv;
    long result;
    jmethodID mid;
    jfieldID fid;
    jobject jobj;
    jclass cls;
    int asize;
    printf("coucou\n");
    getchar();
    options[0].optionString = ".";
    options[1].optionString = "-Djava.compiler=NONE";
    options[2].optionString = "-verbose:jni";
    vm_args.version = JNI_VERSION_1_2;
    vm_args.options = options;
    vm_args.nOptions = 3;
    vm_args.ignoreUnrecognized = JNI_FALSE;
    JNI_GetDefaultJavaVMInitArgs(&vm_args);
    result = JNI_CreateJavaVM(&jvm,(void **)&jenv, &vm_args);
    /* if(result == JNI_ERR )
    printf("Error invoking the JVM");
    exit (-1);
    cls = (*jenv)->FindClass(jenv,"C:\Formation\Joly\FromCtoJava\WATCOM\samples\ide\win32\FromCtoJava");
    /* if( cls == NULL )
    printf("can't find class FromCtoJava\n");
    exit (-1);
    (*jenv)->ExceptionClear(jenv);
    mid=(*jenv)->GetMethodID(jenv, cls, "<init>", "()V");
    jobj=(*jenv)->NewObject(jenv, cls, mid);
    fid=(*jenv)->GetFieldID(jenv, cls, "arraySize", "I");
    asize=(*jenv)->GetIntField(jenv, jobj, fid);
    printf("size of array is %d",asize);
    (*jvm)->DestroyJavaVM(jvm);*/
    Cheers
    Joly

    I already did PATH.
    Open a console window.
    Explicitly set PATH to point ONLY to the appropriate java directory (where the dll is and executable) using something like the following
    set PATH=C:\xxx\yyy
    Then run your app again in the console window - no where else.

  • Have photoshop 6 on a dead pc laptop with windows XP.  Have a pc laptop that has been upgraded from Vista 64 bit (where photshop wouldn't install) to windows 7 professional 32 bit (clean install).  Photoshop still won't install. Also having reinstallation

    I have photoshop 6 on a dead pc laptop with windows XP.  Have a pc laptop that has been upgraded from Vista 64 bit (where phootshop 6 wouldn't install) to windows 7 professional 32 bit (clean install).  Photoshop still won't install. Also having reinstallation issues with pse6 on this same pc.  Pse6 was installed and working on vista 64bit version of the OS, now won't install on rebuilt windows professional 7 32bit (keeps giving me serial number not valid errors).  I'm not trying to pirate these programs.  Just want to reinstall them.

    you need,
    Windows 98, Windows 2000, Windows NT 4.0 with Service Pack 4, 5, or 6a, or Windows Millennium
    Microsoft Windows 98/Millennium/2000/NT 4.0 (Service Pack 4, 5, or 6a required)

  • Printing from a 32 bit client in a 64 bit environment (laserjet 4000 n with windows 7)

    I have a HP laserjet 4000n connected to a 64 bit windows 7 machine.  Another client (32 bit) on my network wants to print to that printer.  I saw on the support website instructions for how to do this:
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSeriesId=...
    So far, I have installed the 64 bit driver (just re-installed and I can print from the 64 bit server).
    I then downloaded the 32 bit driver files (for PCL 5) and saved them.
    I then went to the printing properties of  the printer and chose advanced drivers and checked the box "x86". The instructions called for finding the file "hpcuXXXc.inf".  In the printer driver folder, there were 2 subfolders - one marked 64 bit and inside that folder was a file "hpcu112t.inf" (file ends in "t" not "c") - so I chose that file and pressed ok and got the following error message:
              The specified location does not contain the driver HP LaserJet 4000 Series PCL5 for the requested processor architecture.
    I then downloaded more drivers (for PCL 6 - even though my printer is labelled PCL 5).  This time, I got no 64 bit subfolder (only one folder labelled windows vista).  However , there WAS a file labelled "hpcu112c" this time - so I chose that and still got the same error message.
    Help!?
    Thanks.
    Janc

    Phychopomp1,
    Windows 7 64 bit is able to run 32 bit programs. However, some programs will have issues.
    Have you checked your programs against the Windows 7 compatibility list: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=2394
    This should tell you if they are compatible or not with Windows 7 64-bit.
    There are compatibility settings that you can try once you have installed the software also. Right click on the shortcut and choose properties, then go to the compatibility tab and try the various OS settings.
    If those things fail, then you should try Windows XP Mode (convenience link: http://www.microsoft.com/windows/virtual-pc/download.aspx). This will allow you to install your programs in a virtual copy of Windows XP SP3 using Windows Virtual PC. Once XP Mode is installed, when you install your software into it, you will get a shortcut to use the program from your Windows 7 start menu without even seeing the XP Mode window.
    Hope this helps,
    David
    Windows Outreach Team – IT Pro
    http://www.microsoft.com/springboard

  • How can I wirelessly print from a 64-bit Windows 7 laptop to a printer on a 32-bit Vista laptop?

    My DeskJet 722c is connected to my 32-bit Vista computer.  I would like to print documents out on the printer from my 64-bit HP ProBook S-series laptop, which is running on Windows 7.  I can do this if I disconnect the printer from the 32-bit computer running on Vista and connect it to the computer running Windows 7.  But I don't want to go through the hassel.  How do I connect to the printer from my Windows 7 computer, going through my Local Area Network?  Do I need to install a Windows 7 driver on my Vista machine?  Do I need to install a driver for Vista on my Windows 7 machine?   If so, how do I do this?   I'm confused

    Hello-
    I don't think your printer has network ability.
    Also, remember a click on the Kudos star to the left is a quick "Thanks" for a helpful post.
    Please select the "Accept as Solution" button on the post that best answers your question.
    I appreciate your input !
    Thank You,
    Donald

  • INST-07408: Unable to install or configure the product on a 32-bit JVM on a 64-bit machine. Make sure to install and configure the product in supported modes.

    Hi there, i have an issue installing oracle forms and reports. its throwing this error"INST-07408: Unable to install or configure the product on a 32-bit JVM on a 64-bit machine. Make sure to install and configure the product in supported modes." on step 5. I have jdk 64bit installed, weblogic server was installed successfully but iam getting stuck somehow.
    Below are details of my pc.
    OS Name    Microsoft Windows 7 Professional
    Version    6.1.7601 Service Pack 1 Build 7601
    Other OS Description     Not Available
    OS Manufacturer    Microsoft Corporation
    System Name   ...........-HP
    System Manufacturer    Hewlett-Packard
    System Model    HP ProBook 4530s
    System Type    x64-based PC
    Processor    Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    BIOS Version/Date    Hewlett-Packard 68SRR Ver. F.23, 09/03/2012
    SMBIOS Version    2.6
    Windows Directory    C:\windows
    System Directory    C:\windows\system32
    Boot Device    \Device\HarddiskVolume1
    Locale    United Kingdom
    Hardware Abstraction Layer    Version = "6.1.7601.17514"
    User Name    ...........-HP\................
    Time Zone    South Africa Standard Time
    Installed Physical Memory (RAM)    4.00 GB
    Total Physical Memory    3.94 GB
    Available Physical Memory    1.00 GB
    Total Virtual Memory    7.87 GB
    Available Virtual Memory    1.25 GB
    Page File Space    3.94 GB
    Page File    C:\pagefile.sys

    To clarify further....  It is important to note that Forms/Repors 11.1.2.x software (including WLS and JDK) must be of the same archetecture as the machine.  In other words, you cannot use the 32bit Forms/Reports 11.1.2 software on 64bit Windows.  If you are using a 64bit OS, you must install the 64bit software.  Again, this would include Forms/Reports, WLS, and JDK

  • Migration from Windows(32 bit) Oracle 9i db to Linux(X86-64 bit) Oracle 10g

    Hi,
    We are planing to Migrate our Oracle 9.2.0.6 version database from Windows(32 bit) to Oracle 10.2.0.1 version database on Linux(64 bit). Can I directly do the Migration using export/import? or What is the procedure to do this?
    Thanks in advance for any help.

    The directory structure is different...that's why you need to create the tablespaces in Linux. e.g. export dump says create tablespace in D:\..., there is no such thing in Linux. You can just export it, install software, create the db, tablespaces in Linux and import into the 10g in Linux.

  • Can I upgrade from Vista 32 bit to Win 7 64 bit on hp pavillion d4790y?

    I have 2 gig ram, but really need to speed it up to 8 gig. I'd like to also get win 7 for the desktop. Before I get any of this, I need to know since my current OS is 32 bit but 64 bit capable, if I install windows 7 64 bit will it upgrade from 32 to 64? And then will the 8 gb RAM actually work if I purchase that as well? Will I run into any problems the hardware inside (processors or motherboard (intel core 2 cpu [email protected] ghz))? I don't understand 32 bit to 64 bit conversions... Thanks
    This question was solved.
    View Solution.

    Hi:
    Yes, your hardware is 64 bit capable.
    You can install 4 x 2GB of PC2-6400 memory for best memory performance and capacity (8 GB).
    You cannot do an in-place upgrade of any 32 bit OS to a 64 bit OS.
    You will need to back up all your files, gather any program installation disks/files you want to reinstall on the 64 bit OS, and do what is known as a custom or clean install of Windows 7.
    If you live in the USA or Canada, this is the memory I recommend for your PC once you bring it to a 64 bit OS:
    4 of these: (the CAS latency is faster than the second link below)
    http://www.newegg.com/Product/Product.aspx?Item=N82E16820220279
    or
    2 of these kits:
    http://www.newegg.com/Product/Product.aspx?Item=N82E16820148160
    Paul

  • Migration from Windows 32 bit to 64 bit Customized reports PDF output issue

    Hi Gurus,
    Product Version: 12.1.1
    Operating System:  Linux x86-64
    Database Version: 11.1.0.7
    We have migrated from Windows 32 bit to Linux 64 bit, our PDF reports shows some Greek Charters
    vi /opt/oracle/apps/tech_st/10.1.2/bin/reports.sh 
    NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG
      SELECT * FROM NLS_DATABASE_PARAMETERS
    NLS_CHARACTERSET=AR8MSWIN1256 
    Regards,

    Mean the result of query SELECT * FROM NLS_DATABASE_PARAMETERS
    NLS_CHARACTERSET=AR8MSWIN1256
    and 11g database character set is AR8MSWIN1256
    vi /opt/oracle/apps/tech_st/10.1.2/bin/reports.sh' refers to 10g. Oracle EBS R12 oracle home not a DB Oracle HOME
    Hope you understand now.

  • How do I download after changing my operating system from a 32 bit to a 64 bit system?

    I changed my operating system from a 32 bit to a 64 bit system and I need to re-purchase or trade my purchase for a different download -fridayjunior

    Hi fridayjunior,
    Which Adobe software are you trying to install?
    All 32 bit applications are compatible and can be installed on a 64 bit machine.

Maybe you are looking for

  • JCalendar its not working with other beans with implementation class

    Hello, Jcalendar DEMO from http://forms.pjc.bean.over-blog.com/article-14848846.html and its working , even in new clean new form but if it with other beans like lafbean,keytypedbean etc... it gives this error: Java Plug-in 1.6.0_34 Using JRE version

  • Problems with displaying footage in 4k

    Hey! I have footege witch was recorded with camera Red One in 4k resolution and when I import it, for example, to Premiere CS5 it don't want to display... I see only black screen in composition window, nothing else. The same problem is when I try to

  • Problem : Sapscript prints Portrait - need Landscape -- Print driver ?

    Hello everybody, my SAPScript Form prints portrait (rotated Landscape). I need ist in Landscape. All Settings in the Form are correct. We use an EPSON FX2180 and the devicetype SWIN with access method "S". Anyone an idea where else I can configure th

  • XML datasource definition J2EE?

    Is there a way to define a datasource with XML? My admin is not working on a linux (FC5) with Sun Appserver 9 but I am getting page translation. ... Cold Fusion without datasourses is like a peanut butter and jelly sandwich without bread .... messy

  • Option do not disturb

    The option "do not distub" is activation  the new year.