Using created JVM in C
Hello all,
I have a JavaUI containing JTextField and a method that calls setText of this field.
First I brings up this UI then I want to invoke the method through C that setText the field. Can anyone help me of how to go about it.
Thanks in advance,
Manoj.
Look at the GetMethodID and Call<...>Method function of the JNI specified here:
http://java.sun.com/j2se/1.3/docs/guide/jni/spec/jniTOC.doc.html
The starting point to discover JNI in general is this one:
http://java.sun.com/j2se/1.3/docs/guide/jni/
Especially, look at the tutorial provided there. The chapter "Interacting with Java from the Native Side" provides a section "Calling Java Methods".
Hope this helps.
Similar Messages
-
Unable to create JVM using JNI
Hai,
I am new to java programming. I am trying to invoke native application using JVM. I have a written a pilot code in C using JNI. I am getting the following error when I try to run the binary. I think that the problem is from the fact that 1.2.2 is installed in
/usr/bin directory (and is the default on the server). But I have set both
LD_LIBRARY_PATH, PATH and path
so that it points out 1.4.2. Here is the error
unable to create JVM
There was an error trying to initialize the HPI library.
Please check your installation, HotSpot does not work correctly
when installed in the JDK 1.2 Solaris Production Release, or
with any JDK 1.1.x release.
while building the binary I am using JDK1.4.1 header and lib files
These are my compilation arguments
g++ -g -I/opt/BES/jdk/jdk1.4.1/include/ -I/opt/BES/jdk/jdk1.4.1/include/solaris/ -L/opt/BES/jdk/jdk1.4.1/jre/lib/sparc/ -ljvm -ljava jniTest.C
Help Needed
Thanks
SunilI haven't seen this before. Could it be a disk space issue?
Are you using JDevStudio or JDevStudioBase? And do you have your JAVA_HOME set? If you are using JDevStudio, try running JDev in a command window where JAVA_HOME is not set - I'm pretty sure JDev does NOT get confused about this but I haven't done extensive testing.
Also you should try deleting and unzipping JDev again.
Finally, search the JDev TP forum - there are some discussions there about this error and you may find an answer to your specific configuration - it doesn't seem to be a TP4 specific issue.
JDeveloper and OC4J 11g Technology Preview
Heidi. -
Error while using MaxPermSize JVM paramter in OC4J
i am using this parameter in OC4J's opmn.xml
<category id="start-parameters">
<data id="java-options" value="-XX:MaxPermSize=128m "/>
</category>
while restarting the OC4J instance , i am getting the error
JVMJ9VM007E Command-line option unrecognised: -XX:MaxPermSize=256m
</verbosegc>
Could not create JVM.
Kindly help since it works for others. I am using JDK 1.4.2. On a UNIX machine with Oracle 10GR3 server.
Message was edited by:
user571297
Message was edited by:
user571297The -XX:MaxPermSize option is specific to Sun's JDK for Solaris and Linux. And works pretty fine on my Linux system.
It looks like you're using the IBM JDK which has different options and may be a different memory model.
--olaf -
Could not create JVM Virtual machine(While starting soa managed server)?
Hi,
While starting managed server I am getting following errors:
Could not commit 1048576KB heap memory at 0x0000000004790000.
Could not create JVM Virtual machine.
After above error SOA managed server is to be down.
Please help me that how can i resolve this issue.
Thanks
DharmHi Dharm,
This is typically printed when we are short on memory.
What is OS version and JDK being using here ? 32bit or 64bit ?
Current Xms and Xmx values ?
Thanks,
Sharmela -
Hi All,
I have successfully installed soa 10.1.3.1. I am using VMware with windows xp as os.
The problem is occuring when i was trying to apply 1*0.1.3.4 patch* to my 10.1.3.1 installation.
In the pre-installation instructions we need to upgrade the schema or rum some sql scripts. To do that when I tried to connect using
msql system/manager@<connection string> i got the following error
*"Unable to create JVM. You need jre/jdk 1.3.1 or higher"*
I checked my path and java version also, it looks ok i mean i have 1.5.x java version.
I am not sure what could be the issue.
Did anyone of you encounter same or similar issue?
Any help is highly appreciated.
Thanks.I doubt the dehydration store is installed on mSQL.
Have you installed basic or advanced. I'm assuming basic, by default this runs on olite.
To upgrade you need to upgrade the bpel and esb schemas
The login executables are in the following location
SOA_HOME\bpel\bin\polsql.cmd (bpel)
SOA_HOME\integration\esb\olite\bin\sql_olite.bat (ESB)
cheers
James -
Cannot create JVM message box in WLS 92 admin console
Hi,
I want to open a new windows process from weblogic admin console. I wanted to know if there is a way to launch a jvm from console.
If I use Runtime.getRuntime().exec(cmd), cmd is a javaw command, in my console extension, I get "cannot create JVM" dialog box.
Is this possible?
Pl. suggestHi,
I want to open a new windows process from weblogic admin console. I wanted to know if there is a way to launch a jvm from console.
If I use Runtime.getRuntime().exec(cmd), cmd is a javaw command, in my console extension, I get "cannot create JVM" dialog box.
Is this possible?
Pl. suggest -
CORE4005: Internal error: unable to create JVM
Hi,
Can't start-up the domain domain1 after I've installed AppServ 7.0 for W2000. This is the installation log and the admin-server instance log file with the debug set to FINEST.
Install log :
INFO - Start core server configuration.
INFO - Domain successfully created
INFO - Server instance successfully created
WARNING - SNMP subagent installation did not succeed
INFO - End core server configuration.
INFO - Start samples configuration.
INFO - End samples configuration.
INFO - Start Sun ONE Messaging Queue configuration
INFO - End Sun ONE Messaging Queue configuration
INFO - Start PointBase configuration
INFO - End PointBase configuration
and admin-server instance log file :
[29/Sep/2003:17:17:04] INFO ( 1504): CORE1116: Sun ONE Application Server 7.0.0_01
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP5169: User authentication cache entries expire in 120 seconds.
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP5170: User authentication cache holds 200 users
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP5171: Up to 4 groups are cached for each cached user.
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP4207: file cache module initialized (API versions 1 through 1)
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP4302: file cache has been initialized
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP3063: KeepAliveTimeout is 30 seconds (default value)
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP3067: PostThreadsEarly set to off
[29/Sep/2003:17:17:10] FINE ( 1504): HTTP3066: MaxKeepAliveConnections set to 256
[29/Sep/2003:17:17:11] FINE ( 1504): Installed configuration 1
[29/Sep/2003:17:17:11] FINE ( 1504): jvm stickyAttach: 1
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -DJAVA_HOME=D:/Sun/AppServer7/jdk
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.installRoot=D:/Sun/AppServer7
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.instanceRoot=D:\Sun\AppServer7\domains\domain1
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Duser.language=fr
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Duser.country=FR
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: exit
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: vfprintf
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Djava.security.policy=D:/Sun/AppServer7/domains/domain1/admin-server/config/server.policy
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Djava.security.auth.login.config=D:/Sun/AppServer7/domains/domain1/admin-server/config/login.conf
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.jdo.api.persistence.model.multipleClassLoaders=reload
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Djava.util.logging.manager=com.iplanet.ias.server.logging.ServerLogManager
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.configRoot=D:/Sun/AppServer7\config
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.perlRoot=D:\Sun\AppServer7\lib\perl
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.imqLib=D:\Sun\AppServer7\imq\lib
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.imqBin=D:\Sun\AppServer7\imq\bin
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.webServicesLib=D:\Sun\AppServer7\share\lib
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.icuLib=D:\Sun\AppServer7\bin
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.defaultLocale=fr_FR
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dcom.sun.aas.verifier.xsl=D:/Sun/AppServer7/lib/verifier
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Xmx128m
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Dsun.rmi.dgc.server.gcInterval=3600000
[29/Sep/2003:17:17:11] FINE ( 1504): jvm option: -Djava.class.path=D:/Sun/AppServer7/lib/appserv-rt.jar;D:/Sun/AppServer7/jdk/lib/tools.jar;D:/Sun/AppServer7/lib/appserv-ext.jar;D:/Sun/AppServer7/lib/appserv-cmp.jar;D:\Sun\AppServer7\imq\lib/imq.jar;D:\Sun\AppServer7\imq\lib/imqadmin.jar;D:\Sun\AppServer7\imq\lib/imqutil.jar;D:/Sun/AppServer7/lib/appserv-admin.jar;D:/Sun/AppServer7/lib/appserv-ideplugin.jar;
[29/Sep/2003:17:17:11] FATAL ( 1504): CORE4005: Internal error: unable to create JVM
[29/Sep/2003:17:17:11] SEVERE ( 1504): CORE4009: Failed to load JVM (check your JRE)
[29/Sep/2003:17:17:11] SEVERE ( 1504): CORE3187: Late initialization failed: Error running init function(late) init-j2ee: unknown error
if anyone could help, I would apreciate
Thanks to allOk. I've managed to solve my problem. Thanks to everybody.
For anyone who is interested in here is the solution that fixed the error for me :
Because I had before installed JVM version 1.4.2 and then I uninstalled it and put the version 1.4.1_01, as the one that App Server 7.0 is using, the uninstaller has left a newer version of jvm.dll in WINNT/System32
After I've renamed this file to _jvm.dll (for example), just to get rid of it, the domain and his instances have started correctly.
Good luck! -
Unable to create JVM when starting oramdw or wtgpack or msql
I´ve installed Mobile Server 11g on WebLogic 11gR1 under Windows 7. JRE/JDK version used is 1.6.0.29. JAVA_HOME is set. But when trying to run msql or oramdw I´m getting an error:
C:\Oracle\Middleware\wlserver_10.3\Mobile\Sdk\bin>oramdw
Unable to create JVM. You need jre/jdk 1.3.1 or higher
Any ideas what´s wrong?
Thanks.
KarinHi Karin,
I note that you are using Windows 7, is this 64 Bit ? If so I presume that you are using a 64 Bit version of the JRE/JDK
Please try installing a 32 Bit JRE and making sure that is on the path before the 64 Bit version
regards
Richard -
"Error creating JVM" in iPlanet Web Server 4.1SP7 when configured with JDK
I need to configure iPlanet Web Server 4.1SP7 to execute JSP/Servlets on itself and lookup EJBs kept on IBM Websphere Application Server 4.0.1, both running on different servers with Sun Solaris.
Whenever, I try to configure iPlanet Web Server 4.1 SP7 to use IBM's JDK 1.3.0 (provided with WAS 4.0) to lookup an EJB, iPlanet server stops as soon as it starts, giving:
[07/Feb/2003:11:52:38] info ( 2788): Internal error: unable to create JVM acquire failed1:52:38] info ( 2788): NSServletSession::(late)init - JVMControl:: [07/Feb/2003:11:52:38] failure ( 2788): Failure to load JVM (check your JRE) on(late) NSServletLateInit: unknown error): conf_init: Error running init function
Evenif, I configure it using Sun's JDK 1.4.0.03, iPlanet wS keeps on giving "Exiting JVM" in the error log..
Now, I want to know, which JVMs are supported by iPlanet Web Server 4.1 SP7, that can be used to lookup deployed components (EJBs/Datasource) on Websphere Application Server 4.0.1?
Regards,
Vaibhav
[email protected]I think you are running into this:
http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsunone%2F8322&zone_32=-Xrs%2A%20
Thanks
Manish -
Creating jvm-option with asadmin
Hi,
I am trying to create the following JVM option using asadmin:
-Dproperties.dir=C:/Projects/Project1/myproperties
so I used the following command:
create-jvm-options "-Dproperties.dir=C:/Projects/Project1/myproperties"
The command doesn't work. It ends up in the server as two properties:
"-Dproperties.dir=C
/Projects/Project1/myproperties"
including the quotes ("). I also tried:
create-jvm-options --"-Dproperties.dir=C:/Projects/Project1/myproperties" but it just gives the error:
--"-Dproperties.dir : Option does not have an exact match
Can anyone help?
thanks
SteveConfiguring JVM Options
To set JVM command-line options in the Administration interface:
# In the left pane, click the application server instance name.
# In the right pane, click the JVM tab.
# Click JVM Options.
# To add a JVM option, type it in the text field at the top of the screen and click Add.
# To delete a JVM option, click the checkbox next to it and click Delete.
# To edit a JVM option, edit the text in the JVM Option field and click Save.
For information about specific JVM options, see http://java.sun.com/docs/hotspot/VMOptions.html
Can you please try this and see if that works. -
I am using Ready To Program to compile my apps and need to have a jvm.dll file to run Java 2. i downloaded SDK 1.4.1 but the only JVM's are in Client and Server. these just dont work, I just get the error "Cannot create JVM"
PLEASE if anyone knows a way to make this work or a download I can get. Let me know!!!!! I really need it soon!You could try uninstalling. Then download 1.2 and install that.
You would need to modify your path to include the dll. -
Missing SessionBeans when using SUN JVM 1.5.0.06
Hi all,
I am using WLS10 downloaded from the BEA website.
I created a domain using JRockit JVM and deploy my application (serveral Entities, SLSBs and webservices) and all goes well.
Our customers need is SUN JVM, so I created another domain using the bundled SUN JVM (1.5.0.06) and deploy exactly the same application - now some SLSB are missing, and thus the activation fails. (no errors in the log file before the activation)
I stripped down the application to just contain the Entities, the SLSBs that deploy anyway and one of the beans that is missing. and in that bean I started to disable lines method by method until the bean deployed.
Then I started enabling line by line until the bean did not deploy anymore.
I am stuck at the following problem now:
As soon as I enable a line that contains a call to one of my helper classes (POJO with just static methods using byte[], String and BigInteger) the bean is not deployed anymore - still no problem in the logs!
The really strange is that exactly the same method of the same helper class is used in other methods that were enabled before or never disabled, and all went well!
I just don't have any clues left what I could do.
Anyone of you having an idea???
thanks for your help.
MOh I forgot to mention that I am using EJB 3.0
-
Starting CF instances using different jvm.config files
Hi.
There are instructions for creating/using individual JVM
configs for each
CF server instance here:
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_18206
The instructions cover starting the instance and specifying
the alternate
config via both command line, or as a Windows Service.
But what about via JRun Administrator? I see no option to
specify any
arguments for the "start" process.
(I have to concede whilst I've *started* googling for an
answer, I am being
lazy and asking here before I've got too far with it: sorry).
Adambrahms_x01, while this doesn't help the orginial poster -
have you ever considered spending $195 and calling support for
help? You'll spend _A LOT_ more than that upheaving and moving to a
new application server (which will also have its own set of unique
issues - including crashing). If all you've done is complain about
your problems on the fourms, then I've got no sympathy for you.
This isn't an official support center.
nyck6623 is on the right path. The default GC, quite frankly,
sucks. But you need to be _very_ careful switching out your GC. Do
it wrong, you can make things much worse. See these documents:
http://www.javaperformancetuning.com/
http://www.pixl8.co.uk/index.cfm/pcms/site.resources.cfmxtuning/
http://java.sun.com/performance/reference/whitepapers/tuning.html
http://java.sun.com/performance/
As always, becareful in what you do, and load test load test
load test. You also might want to look into turning on VerboseGC so
that you can see what your heap is doing. It'll write out to your
server-out.log file. That'll help you tune the JVM as well.
Finally, you might want to stop the GC from running every 60
seconds. When the GC is running, ColdFusion isn't.
Turn on VerboseGC = -verbose:gc -XX:+PrintGCDetails
-XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC
Force GC = -Dsun.rmi.dgc.server.gcInterval=3600000
I'd bump your threads up to 10 or 12, and limit the cached
queries to 50. And if you can afford to do it, add some memory to
the servers so you can up your -Xmx limit. CF likes to breathe,
deeply. I've got 4GB in my servers, and I set -Xmx1024M and the
heap routinely runs around 700MB (with CF actually using around
200MB).
You might also want to consider turning on metrics so you can
see how your threads and memory are doing.
Turn on Metrics =
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19120 -
Cannot use create purchase order in SRM 7.01
Hello,
We are upgrading from SRM 5.0 to SRM 7.0.Classic scenario. In the workset purchasing of the role operational purchasing you can use Create Documents -> purchase order. if I click on it I recieve the following message:
The table does not contain any data
If I then choose start I get the following message:
Transaction type could not be determined; inform system administrator
Can anybody explain to me if is this a purchase order which would be created in SRM ? As we are in the classic scenario we don't want that. If this is a local purchase order how can we create a purchase order in ECC using SRM 7.01
Thanks for your help!
AntoinetteHi,
In a classic scenario, the SAP SRM system is used mainly to capture procurement requisitions from employees in the form of shopping carts. All other procurement activities take place in the backend materials management system.
So you cannot create po in SRM it will be created in ECC.
Regards,
Goutam Kolluru. -
How do I install a pdf printer driver on my window computer using create pdf
How do I install a pdf printer driver on my window computer using create pdf
http://helpx.adobe.com/acrobat-com/kb/using-createpdf.html#main_adobePDF_desktop_printer
Maybe you are looking for
-
Html snippet works w/in iweb but NOT when site is live & online @$#!
help!? I have had a flash based slide show working on my iweb site for some time I used iweb enhancer to make it work w/ iweb 06 - now in 08 the "enhancer" doesnt work. The html snippet should & seems to...I am able to get the pages to behave very we
-
Any chance of YUM repo for PHP
Oracle has quite a few PHP5 rpm packages for RH EL 5.x on http://oss.oracle.com/projects/php/files/EL5/i386/ Is there any chance of turning this into a yum repository? I think it would be extremely useful.
-
Nokia Lumia headphone mic sound BUG
Ok. I have a Lumia 920 and a 620. I use hands free texting and calling a LOT. Both Phones worked perfectly at 1st with headphone microphones. I used the V-Moda V-80's, V-Moda Crossfade LP2, Marshall Major FX, Beats Mixr, Beats Studio, but i have o
-
Image x for Commercial use.
Hi, is a retail company allowed use the Image x sourcecode to reproduce images for other companies deployed on muliple machines as a payable service?
-
My Macbook Pro won't print with my HP Photosmart 7515. I get the following message, " Print file was not accepted" Printer does work with our PC?? Checked for software updates and are none. Talked with HP help and they say it's an Apple problem