How to load JVM without specifying jvm.dll
How can I load JVM from native C++ code withoutknowing the path of jvm.dll?
If on Windows, use the registry to find the place where the JRE has been installed. Take a look at the file java_md.c in the launcher subdirectory of the src.zip file supplied along with the JDK. Specifically, you will probably be most interested in the GetStringFromRegistry and GetPublicJREHome functions there.
In the registry, look for the key HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment. That has a number of values you will probably want.
If not on Windows, I really don't know how to find the location of the JRE installation without it being configured in an environment variable, or being hardcoded.
Hope it helps.
Cheers.
Similar Messages
-
TEXT_IO.FOPEN how to pick file without specifying the full directory path
Hi,
I am using Oracle application server 10gR2 on Linux with forms 10g application. I am building the DEV/TEST/UAT environment on same Linux machine with one OAS.
I am using TEXT_IO.FOPEN ('/home/oracle/check.txt','r') to read a server side file and it is working fine.
Now I want to pick this file dynamically i.e. without specifying the full path. I am using TEXT_IO.FOPEN ('check.txt','r') and I copied file in forms_path directory in linux and even in $path directory in linux but none of them are working.
Pls help me sort out this problem.
Thanks in advanceHi,
I have to read files in my app directory using TEXT_IO how is that possible?? I cannot set workingDirectory as my Oracle home is in a different location and as has been mentioned by others when I run the form on web it cannot seem to find the file in the default forms directory where all the .fmx file
Is there any other file setting that needs to be done??
Please help
Thanks & Regards
Mangesh Deshpande -
How to load jsp without menubar using shortcut?
I know, everything is possible,... so:
I have a webapp with jsp's which I start using javascript's 'window.open' command on our website. All pages are without menubar, toolbar, fixed size, etc...
However, I noticed that the users can make a 'shortcut' using 'drag 'n drop' to their desktop. When the user loads the application using this shortcut, the windows have toolbars, menubars available... which I don't like...
How can I avoid this?you might be able to use javascript to detect if the browser window that the page is currently loaded has those bars loaded. If it does, then re-invoke your "open page in new window" logic to remove them and the original window.
Granted, I cannot be sure that you can verify that with javascript, but you could probably check out the comp.lang.javascript user group over on google for more info in that domain. -
Bulk Load data without specifying column names in control file
I am totally new to the world of Oracle databases and am having some trouble doing some basic data imports from a csv file. I have a large amount of data in an excel spreadsheet (a couple hundred columns by varying numbers of rows from 2- several thousand) which I want to import into my Oracle 11g Database. Currently I am trying to use sql loader and specify the import syntax in the control file. From the examples I've seen so far, it seems you must specify the columns individually for what you are importing. This is simply not reasonable for several hundred columns of data.
Is there sql loader syntax (or a better method all together) to import a comma delimited csv or excel spreadsheet into an oracle database where it automatically generates a table and columns based on the data in the target import file? Even if I must first create the table in the database, my key issue is being able to generate the column names during import to match the column headers in the import file. I appreciate any help you could provide.
FYI here is my first meager attempt at importing a comma delimited csv, here is my ctl file:
load data
infile 'C:\filepath\mock_data.csv'
into table allData
fields terminated by "," optionally enclosed by '"'
It says Syntax error at line 4. Expecting "(", found end of file.
I suspect there is more at issue here than a missing "("You have to create the control file to map to the table.
Since you would already have created the tables, you could generate the controlfiles based on the table structures.
See the "unloader.zip" file under the Files link at http://asktom.oracle.com
-- it has scripts to create unload a table to a flat file and to create the SQLLoader controlfile to reload that data to another target database. It would be the second set of scripts that you can use.
Hemant K Chitale -
The problem is this: the last time i ran the windows, but he hangs and died (can not run further the logo). now i can not load not windows, not maс! how to be, what to do???
can any body help me, plz!!
-
How to load text without a variable
As far as i know in AS2 to load a text i need to define a
variable in text like:
text=this is the text displayed.
right now i have to display a text verision of a website
which i cant put a variable like "text=" into it, im wondering is
there anyway to load text in AS2 without using a variable? because
in AS3 you can use the URLLoader.
Andrei1 pointed out that getURL might work, does anyone know?
thanks a lotyay it works, some what, errm, right now im getting errors
when i publish anything with actionscript 2.0
the errors are :
BitmapData.as
lines 7,16, 26, 27, 28, 31, 41, 43, 45, 46, 53, 63, 76, 83
line 7:unable to add 'flash.geom.Rectangle' [my flash is in
another language so i translated this]
the rest of the lines are: unable to add 'Rectangle'
Transform.as:
line 15:unable to add 'flash.geom.Rectangle'
Movieclip.as:
line 36:unable to add 'flash.geom.Rectangle'
the code is working but the text box is weird here is a
screenshot:
http://img512.imageshack.us/img512/8532/loaderha4.jpg
and i have to select the text and drag to the right to see
the rest of the text.
I think this is something to do with the errors? because i
can't add Rectangle? or its the text box needs more
tweaking? -
How to use cfmail without specifying username and password??
Hi pp,
i have been trying to use the cfmail functionality to send and receive e-mails connecting to the smtp server of <MyUniversity>
i am creating a page where, at the end a e-mail has to be sent from <[email protected]> to <[email protected]>
i am connecting with the univ server from the cf server to test whether the e-mails are delivered.
the e-mails are sent only if i mention the <Username> and <Password> fields belonging to the <[email protected]>
for my test case i used my own id and the if i set the username and pwd, the e mails are sent, otherwise the emails are not getting delivered.
can someone suggest why this is happening and i have to make sure that at the end of launching the site, i dont have to get the username and password, because i will not be given access to it as a developer.
Please suggest me wat to do.
i am using the simple cfmail function.
<cfmail
server="smtp.<univ>.edu"
port="25"
from="[email protected]"
username="[email protected]"
password="**********"
to="[email protected]"
subject="testing testing">
<testing the mail functionalities>
</cfmail>Use :
Properties prop = System.getProperties();
prop.put("proxySet","true");
prop.put("http.proxyHost","yourProxy");
prop.put("http.proxyPort","8080"); // change the port
//prop.put("https.proxyHost","yourProxy");
//prop.put("https.proxyPort","8080"); // change the port
Denis -
How to load jvm.dll (in C++) ?
Hi friends,
I've started using JVM for one of my software. I've understood how it works.
But now i want to create my own application which can take any .class or .jar file and then start executing the same through my program (C++).
I don't know from where to start. Can anybody help me? (May be with some sample code of C++ for the same?)
Thanks in advanceThanks for responding my query,
But i'm aware of how to load any dll in C++, but i want to know which functions are avaible with jvm.dll and help on those functions.
For example JNIenv or some thing is used in C++ which is related to java environment. So what do that mean?
If i want to know how many classes exist in given jar file then which method out of jvm.dll should i go for?
If some I get some program, that will be beneficial.
Thanks again. -
How to load and use JVM form other types of applications ?
Hello
I have a site that runs with ASP and I would like to execute some java applications to output some of the pages.
I there a way to execute java programs in the JVM without having to create a new process running java.exe ?
Like using and ActiveX component or a special .dll from Sun. How does a web browser run applets ?
I can not use .jsp directly for my pages because my client also uses some custom language (MediaBase)
they bought that works only with ASP.
Thank you,
Timothy Madden,
RomaniaYes, or something like IPC with a service process, as Michael said.
First I wanted to know if JNI has an option the create a shared VM, since my client's web server has some other processes running that also run the JVM. Now it looks like JNI will load the JVM in-process, although the documentation says little about this, but the InitArgs structure has no 'is_shared' member.
But all these are complicated for some web page, difficult to invoke from a scripting language, and there is too much effort just to use some library that happens to be written in Java, which I use to export search results into an Excel workbook (the library is Apache POI). I mean I would do it, but my client will not understand the need for this effort. Than I also want some data transferred between my web script and the java application.
So I am going to stick to java.exe and create a new process on every hit, with the standard input, output and error files redirected to some vars in my script. At least until I find out more.
Thank you,
Timothy Madden,
Romania -
How to unload a class or a dll from jvm?
We can load a class or a dll into jvm,but how can we unload a class or a dll from jvm?
I'm look forward to your reply.
Regard!
Sun.Huangi don't believe you can unload a class.A class can only be unloaded if its classloader
becomes unreachable, so classes loaded by the
bootstrap loader will never be unloaded.Are they definately unloaded in that case? as soonas
the classloader that loaded them is unreachable?or
is it still an optional decision for the jvm?A class may be unloaded if and only if its defining
classloader may be reclaimed by the garbage
collector. There are no guarantees that a class will
be unloaded.Okay, that's what I thought. Thanks for confirming. -
How to increase heap size in JVM??
Hello all,
Iam trying to deploy an EAR file from JBuilder6 to WebLogic6.1 and Iam running into java.lang.OutOfMemoryError in JBuilder!!..Can someone tell me how to overcome this problem.
TIAthere are a set of config files in the JBuilder directory (bin directory I think - removed JBuilder a while back) that specify JVM arguments, what JVM to run etc.
Chuck -
ImportError: DLL load failed: The specified procedure could not be found.
Hi,
I am new to Python. I'd like to try and connect to Oracle 10.2.0.4 database using Python. I have Oracle 10g client installed. When I try to import cx_Oracle I get the error below.
If anyone can help me how to solve this, I will be grateful.
C:\Users\milivojm>set path
Path=C:\Oracle\OraClient10g\bin;C:\Oracle\OraClient10g\jre\1.4.2\bin\client;C:\O
racle\OraClient10g\jre\1.4.2\bin;C:\Oracle;C:\Oracle\OraOdac11g;C:\Oracle\OraOda
c11g\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program File
s\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\CollabNet Subversion;C:\P
rogram Files\jZip;C:\Program Files\QuickTime\QTSystem\;D:\Python\
C:\Users\milivojm>python
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
import cx_OracleTraceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
exit()C:\Users\milivojm>dir c:\Oracle\OraClient10g\bin\
Volume in drive C has no label.
Volume Serial Number is B0A4-2659
Directory of c:\Oracle\OraClient10g\bin
21.11.2008 15:29 <DIR> .
21.11.2008 15:29 <DIR> ..
06.03.2004 03:19 108.920 cemutls.exe
27.01.2004 04:49 86.124 COREJAVA.DLL
21.11.2008 15:28 1.024 emca.bat
08.03.2004 17:15 52.552 extjob.exe
08.03.2004 17:15 52.552 extjobo.exe
07.02.2004 22:52 28.672 launch.exe
21.11.2008 15:27 659 lbuilder.bat
27.01.2004 06:47 81.948 LCSSCAN.EXE
27.01.2004 06:46 43.064 LMSGEN.EXE
08.03.2004 17:12 16.656 loadpsp.exe
06.03.2004 03:20 96.592 lsnodes.exe
27.01.2004 06:46 68.556 LXEGEN.EXE
27.01.2004 06:46 276.908 LXINST.EXE
21.11.2008 15:28 484 mkstore.bat
21.11.2008 15:27 1.149 netca.bat
21.11.2008 15:27 108 netca_deinst.bat
08.03.2004 17:59 188.416 oci.dll
08.03.2004 17:16 32.768 ociw32.dll
10.02.2004 13:13 110.592 ODBTREEVIEW.OCX
21.04.2005 04:13 864.256 oip10.dll
21.04.2005 04:05 75.500 oip10.tlb
21.11.2008 15:27 525 olsadmintool.bat
21.11.2008 15:27 546 olsoidsync.bat
10.02.2004 13:12 73.728 OO4OADDIN.DLL
10.02.2004 13:12 69.632 OO4OCODEWIZ.DLL
10.02.2004 13:12 20.480 OO4OCODEWIZ.EXE
21.04.2005 04:05 24.576 oraansi10.dll
21.11.2008 15:27 34 oracle.key
05.03.2004 19:15 20.480 OracleAdNetConnect.exe
05.03.2004 19:15 24.576 OracleAdNetConnectRCUS.dll
05.03.2004 19:16 24.576 OracleAdNetTest.exe
05.03.2004 19:16 24.576 OracleAdNetTestRCUS.dll
08.03.2004 16:39 1.909.008 oraclient10.dll
21.04.2005 04:14 241.664 oraclm32.dll
10.03.2004 16:09 749.840 oracommon10.dll
27.01.2004 04:49 688.400 ORACORE10.DLL
06.03.2004 03:16 57.616 oradbcfg10.dll
10.02.2004 13:17 386 oradc.lic
21.04.2005 04:13 102.400 oradc.ocx
08.03.2004 16:39 4.235.536 orageneric10.dll
14.03.2004 10:43 327.952 orahasgen10.dll
26.03.2004 17:11 77.824 oraimr10.dll
05.03.2004 19:14 45.056 orajmisc.dll
27.01.2004 17:16 278.800 oraldapclnt10.dll
27.01.2004 17:16 258.320 oraldapjclnt10.dll
27.01.2004 06:46 37.136 ORALXLED.DLL
05.03.2004 19:25 946.448 oran10.dll
05.03.2004 19:15 37.136 oranad10.dll
05.03.2004 19:11 33.040 oranbeq10.dll
05.03.2004 19:12 24.848 ORANCDS10.DLL
05.03.2004 19:11 94.480 orancrypt10.dll
05.03.2004 19:11 24.848 oranhost10.dll
05.03.2004 19:11 33.040 oranipc10.dll
05.03.2004 19:12 143.632 oranjni10.dll
05.03.2004 19:11 180.496 oranl10.dll
13.03.2004 03:40 74.000 oranldap10.dll
10.03.2004 20:42 33.040 oranldapj10.dll
27.01.2004 06:45 586.000 ORANLS10.DLL
12.03.2004 01:23 1.544.353 oranmemso.dll
05.03.2004 19:11 33.040 orannmp10.dll
05.03.2004 19:12 28.944 orannzentr10.dll
05.03.2004 19:12 28.944 ORANNZMCS10.DLL
05.03.2004 19:11 962.832 orannzsbb10.dll
05.03.2004 19:12 53.520 oranoncj10.dll
05.03.2004 19:10 221.456 oranro10.dll
05.03.2004 19:12 37.136 oransgr10.dll
05.03.2004 19:11 49.424 orantcp10.dll
05.03.2004 19:12 49.424 ORANTCPS10.DLL
05.03.2004 19:11 24.848 orantns10.dll
05.03.2004 19:13 28.944 oranzts10.dll
06.03.2004 03:16 209.168 oraocr10.dll
14.03.2004 20:50 147.728 oraocrb10.dll
21.04.2005 03:54 438.272 OraOLEDB10.dll
21.04.2005 03:54 1.608 OraOLEDB10.tlb
21.04.2005 03:55 24.576 OraOLEDB10us.dll
21.04.2005 03:53 131.072 OraOLEDBgmr10.dll
21.04.2005 03:54 32.768 OraOLEDBpus10.dll
21.04.2005 03:45 24.576 OraOLEDBrfc10.dll
21.04.2005 03:46 24.576 OraOLEDBrmc10.dll
21.04.2005 03:53 139.264 OraOLEDBrst10.dll
21.04.2005 03:43 24.576 OraOLEDButl10.dll
21.11.2008 15:28 483 orapki.bat
08.03.2004 17:07 1.052.944 ORAPLP10.DLL
08.03.2004 17:06 2.867.472 ORAPLS10.DLL
04.02.2004 00:10 28.944 ORASLAX10.DLL
27.01.2004 06:46 69.904 ORASNLS10.DLL
11.03.2004 21:35 483.600 ORASQL10.DLL
09.03.2004 21:46 61.712 orasrvm10.dll
06.03.2004 03:17 143.632 orasrvmhas.dll
27.01.2004 06:45 78.096 ORAUNLS10.DLL
27.01.2004 04:49 28.944 orauts.dll
27.01.2004 04:49 830 orauts.sym
08.03.2004 16:39 24.848 oravsn10.dll
03.02.2004 07:56 10.240 orawsec9.dll
03.02.2004 23:58 1.473.868 ORAXML10.DLL
30.09.1999 17:43 2.478 orclcontainer.bmp
30.09.1999 17:43 2.478 orclcontext.bmp
03.08.1999 19:00 246 orcldbserver.bmp
30.09.1999 18:10 3.310 orclnetservice.bmp
24.02.2004 13:11 57.344 OsUtils.dll
10.03.2004 19:17 60.280 sclsspawn.exe
21.11.2008 15:29 321 selecthome.bat
21.11.2008 15:28 266 selecthome.bat.oo4o
21.11.2008 15:29 55 selecthome.bat.oraoledb
27.10.2004 10:14 434.176 sqora32.dll
27.10.2004 10:16 65.536 sqoras32.dll
27.10.2004 10:16 32.768 sqresus.dll
21.11.2008 15:28 3.433 targetdeploy.pl
05.03.2004 19:17 37.084 TNSPING.EXE
21.11.2008 15:28 260 trcasst.bat
30.11.1999 12:32 145.408 unzip.exe
16.07.1998 18:36 104.448 zip.exe
112 File(s) 25.228.632 bytes
2 Dir(s) 8.552.009.728 bytes freeYou have oracle 10g and python 2.6. Are you sure you installed the cx_Oracle version that is compatible with those particular Python and Oracle's versions? (It comes in several flavours so you need to be sure you installed the right one).
-
How to Format DataTable Column after load Datatable without extra loop ??
How to Format Column after load Datatable without extra loop ??
I dont want to do extra logic which can cause performance thing.
I have datatable which get fill from Dataset after database query, now i need to format column as decimal but without extra logic.
I was thinking to create clone and than Import row loop but it ll kill performance, its WPF application.
Thanks
JumpingboyYou cannot do any custom things at all without doing some "extra logic". Formatting a number as decimal is certainly not a performance killer in any way whatsoever though.
If you are displaying the contents of the DataTable in a DataGrid you could specify a StringFormat in the XAML:
<DataGrid x:Name="dg1" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Number" Binding="{Binding num, StringFormat=N2}"/>
</DataGrid.Columns>
</DataGrid>
Or if you are using auto-generated columns you could handle the AutoGeneratingColumn event:
public MainWindow() {
InitializeComponent();
DataTable table1 = new DataTable();
table1.Columns.Add(new DataColumn("num")
DataType = typeof(decimal)
table1.Rows.Add(1.444444444444);
table1.Rows.Add(7.444444444444);
dg1.ItemsSource = table1.DefaultView;
dg1.AutoGeneratingColumn += dg1_AutoGeneratingColumn;
void dg1_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e) {
if (e.PropertyName == "num") {
DataGridTextColumn column = e.Column as DataGridTextColumn;
column.Binding.StringFormat = "N2";
<DataGrid x:Name="dg1" />
Please remember to mark helpful posts as answer and/or helpful. -
How to load an image without a gui? big problems...
Hey guys, I usually try my best to not ask for help and figure stuff out myself. But this last week i've been having big problems with this work project.
My goal is to load images from disk, and append them to each other to create one big image.
The images are 0-9.jpg each file containing a number in it. then i create one big file with 4 numbers in it. called final.jpg.
so far i can do all this, but whenever the program is finished, the application just keeps running. the program has literally gone through all the steps... i have a system.out.println printed on the last line after the main, after the class instantiation... and still it stays running.
how do you guys load images without a gui? This program will probably be running under unix, so i can't create a (for component example)
Panel() and media track the file load... so i'm pretty much stumped
any help you guys can provide would be really incredibly helpfull at this point. I have searched these threads for a few hours without luck. I found only 1 real post related to my problem, but eventually they said use MediaTracker = new Mediatracker( new Panel() ); which i can't use. :(
Thanks a lot guys.
:Dyeah tried doing that, didn't work either.
UPDATE
I FINALLY found a way...
and here it is for others to find!
public BufferedImage getImage(String filename) throws Exception {
FileInputStream input = new FileInputStream( filename );
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder( input );
BufferedImage image = decoder.decodeAsBufferedImage();
return image;
it returns an image buffer, but it's better than nothing! :)
atleast this functions under unix. -
My friend synced a video to my ipod but it earased all my data on my ipod,but I can't figure out how to load my old library back without deleting the movie. My friend shares a family account so she can't tell me the password. How can i get my old library back without deleting the movie?
Linnwarner wrote:
She does have the right because she bought the movie.
Not true at all.
You only buy the right to your own personal use.
You do NOT have the right to distribute to others.
This is illegal. There is no doubt about it
Maybe you are looking for
-
My IMac turns off unexpectedly in both Mac & Windows mode. I've repaired disc and permissions using the Snow Leopard install disk and cleared the cache without help. Any ideas how to prevent this?
-
Gmail reply button does not work
reply and reply all icons are grayed out, unresponsive when trying to reply to an active email.
-
How to work sap solution manager
< MODERATOR: Message locked. Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. please search first. > Hi experts, can anybody what is the use of sap solution ma
-
Why won't premiere let me open past projects!?!
This is about the tenth time that I have saved the project I was working on in order to open another one and create an effect! every time I try to open anything but my most recent project I am met by the same garbage error message "The project contai
-
Hi, How to uninstall Mcafee anti-virus from my machine because of machine bootup is taking too much of time for usage? so that i moved all mcafee related file to trash but while machine boot up mcafee showing and asking Authentication so any one give