Accessing java objects through javascript
anybody know a how to get an image from java to javascript... example you get an image from a scanner through java... and then want to use it in javascript
anybody know a how to get an image from java to
javascript... example you get an image from a scanner
through java... and then want to use it in javascripthttp://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/java_js.html
Similar Messages
-
Access Java object from Javascript
Hi
I'm trying to invoke a Java object from Javascript (scriptengine and all that).
I want to add scripting features to a GeneXus Java generated app... and I have very basic skills on java too. Sorry for that ;o).
This is the java code to pass "params" to the scriptengine:
engine.put("remoteHandle",remoteHandle);
engine.put("context", context); The remoteHandle (int) and context (com.genexus.ModelContext) pass trough all the gx-java generated programs.
This javascript works fine:
importClass(Packages.uftestjs);
new uftestjs(remoteHandle).execute( ) ;The remoteHandle conversion is ok (javascript-number to int). The context is optional.
But if I want to pass context:
importClass(Packages.uftestjs);
new uftestjs(remoteHandle, context).execute( ) ;Fails with this:
"javax.script.ScriptException: sun.org.mozilla.javascript.internal.EvaluatorException: Java constructor for 'uftestjs' with arguments 'number,javax.script.SimpleScriptContext' not found."
Obviously, no conversion is possible with context (javax.script.SimpleScriptContext to com.genexus.ModelContext).
There is some way to reference de original context, by the object Id??? or something like that???
Thanks in advance for any replies!!!
Greetings from Chile. (I hope you can understand my english!)Hi
Well, since this topic is about java programming I think the place is right here.
(I use some tricks to embed java statements in genexus objects...)
I will try to get some help at Artech (GX) on how to build something... to get the conversion needed.
But they are not focussed on support this kind of questions.
Anyway, I want to know: do I can to reference an object by the objId?
I want to code something like this:
com.genexus.ModelContext context =
(com.genexus.ModelContex)getTheObjectFromTheJVM(theObjectId);(powered by google translator, ha!) -
Accessing java objects from within javascript
Hello,
Anyone with an idea of a useful toolkit for accessing java objects from within javascript will be much appreciated.
Thanks in advance,
Antana.What do you mean by accessing Java objects? Do you mean interacting with an applet via JavaScript? Something else?
-
Accessing java classes from javascript
Hi,
I have the following javascript function
function testjava {
var myString = new java.lang.String("Hello world"); // line 1
alert("len:"+myString.length()); // line 2
}It gives me a error at line 1 saying "'java' is undefined" in IE browser 5.5 sp2. But, both the lines execute correctly in netscape 6.
Can someone please help..
Thanks,
Vijay.It seems that IE 5.5 doesn't support accessing java classes in JavaScript, so try to install IE 6 to see if it works or maybe, you doesn't have installed propertly support for JVM in IE.
-
Acees JAVA program through JavaScript
Am working on to develop a mozilla extension that has something to with the history of urls browsed.
I did the backend coding in JAVA.
The tutorials I looked on the web for developing mozilla extensions use JavaScript as the language to program the backend.
Please suggest me a way out to use my already developed program module which is in JAVA. My program contains external libraries like WordNet and Lucene.
Is there anyway I can access the program in JAVA through JavaScript
ThanksI heard that this app can make this
sigh Of course. Some magic that can let the servlet execute Javascript code that doesn't even exist yet because it still has to be produced and served, and that can help Javascript on the client to access an object on the server that's long GCed.
Same answer applies, even with J2J: the Javascript has to talk to an applet. -
How can i call a java object and use it inside javascript?
For example if i instantiate an integer in a java class, i want to pass it to javascript, do some work on it like for example incrementing it, and then i want to return its value.
Can i do this?why don't you write javascript code using jsp and then pass on the value to javascript variable.
-
Accessing Java Object with out any application servers
Hi,
I would be much thankful if any one guide/suggest me how to
access an java object with out using any application servers.I am
having an java object which holds dummy data and an mxml file which
contains some text fields. My plan was to access the java object
and put the dummy data in the text fields. I am using RemoteObject
for this. I am not able to proceed further. Please help me.
Thanks in advance
Regards
Karun KumarYou can check The Merapi Project it's still in the
development phase but it'll allow to an AIR app invoke a java class
and run it as it were inside your app. But that's something you
can't take into production yet, why don't u wanna use a server
backend? -
Accessing DCOM objects through WebLogic
Is it possible to access DCOM objects with WebLogic ?
Olivier
[olivier.vcf]Thanks for the tip. I have tried the Excel example and it works great !!
Olivier
Damian Mehers wrote:
You could use the J-Integra pure Java-COM bridge to do this. Your WebLogic
based Java client can be running anywhere that WebLogic runs (such as a UNIX
box) and you won't need to install anything on the Windows box hosting the
COM components.
Documentation and download:
http://www.linar.com/
Regards,
Damian
"Olivier Brand" <[email protected]> wrote in message
news:[email protected]..
Is it possible to access DCOM objects with WebLogic ?
Olivier
[olivier.vcf] -
Send Java objects through a socket
I want to send some java objects to a J2SE server from a J2me socket. In normal j2me socket there is no way of putting whole obejct to the output stream. Is there any way that you can send a object from a socket ? Please advice..
Thanks.Check this article on making serializable objects in MIDP. If the objects you want to send receive across the network implement this, then you can easily transform them into byte arrays and back to objects so they can be sent across a network.
shmoove -
Access Java Array in Javascript function
Hi, could someone please help me, I have an array that gets populated in java code and I need to see it in a javascript function.
Here's what I have so far:
//In java class for AvgCostChart.jsp
private String[] month;
public String[] getMonth()
{//code to populate
return month;}
Then in my javascript onLoad function I try to access it. I know how to access the values one at a time like this.
var month1='#{AvgCostChart.month[0]}';
But how do I pass this to a function.
I tried assigning to to another array to loop through the values like this:
var myArr = new Array();
myArr'#{AvgCostChart.month}';
alert (myArr[0]);
But that does not work, any one done this before.
I've also tried saving it in the session and then accessing it but can't get that to work either.
Any help will be greatly appreciated.Hi,
Please go through the following thread:
http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=60147
Hope this helps
Cheers
Girish -
How i load java class through javascript
Hi,
i want to load java class file at client side through the java script. Class file wich already at client side(client machine)
tell me is it possible....
thanks
plzz mail
[email protected]From your post it is not very clear what you want to do.
1. Even if it was possible to load client classes using javascript, how on earth are you going to execute them ??? JavaScript and java are entirely different cups of tea.
2. If it was an applet, then probably you can access some classes from the client machine. Definely the default packages. However, I don't know whether you can access other classes. That might lead to a security issue. Please check with a java securities expart.
3. Loading a class from the client machine is DEFINITELY A BAD PROGRAMMING PRACTICE Use the codebase property on your applet tag to load the classes from the server. -
Access Java code in Javascript function
hi all,
i have a requirement where i need to access a method defined in a plain java class from a javascript function.
can anyone please let me know, who can i achieve this.
thanks in advanceI have a hyperlink in a JSP, onclick of this, i need to perform two tasks:
(1) the page should be redirected to the same page.
(2) excute a function which actually defines code to run a perl script.
so i have wrapped the function in a class and trying to call this function in the javascript function.
now i am not sure will this work.
so if there are any other alternatives to achieve this, please share. -
Accessing Java objects from C++ client
I have a number of Java CORBA server objects that I have deployed to an 8.1.7 database.
I can invoke these objects from a Java client with no problem, but I also need to access them from a C++ client.
I have used idl2cpp from VisiBroker for C++ (version 4.5) to generate the client stubs, and I've downloaded the interop.tar file from http://technet.oracle.com/products/oracle8i/htdocs/jserver_faq/interop.tar
The problem that I have is that I have not been able to build a client program because login.lib from interop.tar generates conflicts at link time. I've tried everything that I can think of, but I always end up with either missing references or multiply defined symbols. I've tried building using both MS Visual C++ and Borland C++Builder, but with no success.
Has anybody succeeded in building a C++ client? Surely it shouldn't be this difficult?
Thanks,
TonyThank u for taking care of me
But the hint given by u is not apt to my query.
If any new suggestion pls send again -
Getting errors in accessing java class through procedures
Hello,
I have written a java stored procedure to execute an exe file, which works fine when compiled.The class code is given below.
create or replace and resolve java source named "CommandExection"
as
import java.io.*;
import java.util.*;
public class CommandExection1 {
public static void Command(String commandline) {
try {
String line;
Process p = Runtime.getRuntime().exec(commandline);
BufferedReader input =
new BufferedReader
(new InputStreamReader(p.getInputStream()));
while ((line = input.readLine()) != null) {
System.out.println(line);
input.close();
catch (Exception err) {
err.printStackTrace();
Through a stored procedure i am acessing the class which is given below,
create or replace procedure Exe_cmd(path in varchar2)
as
language java
name 'CommandExection1.Command(path)';
I am able to create stored procedure sucessfully.But when I run it I am getting the following error.
SQL> exec EXE_cmd('D:exeapp.exe');
BEGIN EXE_cmd('D:exeapp.exe'); END;
ERROR at line 1:
ORA-29531: no method CommandExection1 in class CommandExection1
ORA-06512: at "HGUSER.EXE_CMD", line 1
ORA-06512: at line 1
Please go through the code and help me.
ThanksMichael,
I did that but I am getting following errors.
java.security.AccessControlException: the Permission (java.io.FilePermission
D:/exeapp.exe execute) has not been granted to SYSTEM. The PL/SQL to grant this
is dbms_java.grant_permission( 'SYSTEM', 'SYS:java.io.FilePermission',
'D:/exeapp.exe', 'execute'
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:280
at java.security.AccessController.checkPermission(AccessController.java:429)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:528)
at
oracle.aurora.rdbms.SecurityManagerImpl.checkPermission(SecurityManagerImpl.java
:192)
at java.lang.SecurityManager.checkExec(SecurityManager.java:775)
at java.lang.Runtime.exec(Runtime.java:563)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)
at CommandExection.Command(CommandExection:12)
PL/SQL procedure successfully completed.
I tried to set the privileges using,
EXEC DBMS_JAVA.grant_permission('SCHEMA-NAME', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write, execute, delete');
EXEC Dbms_Java.Grant_Permission('SCHEMA-NAME', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
EXEC Dbms_Java.Grant_Permission('SCHEMA-NAME', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
but I couldn't. and got some errors like,
SQL> EXEC DBMS_JAVA.grant_permission('HCT', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write,
execute, delete');
oracle.aurora.vm.IdNotFoundException: -1 is not the number of a user or role
at oracle.aurora.rdbms.SystemSchema.getId(SystemSchema.java:76)
at oracle.aurora.rdbms.SystemSchema.getId(SystemSchema.java:54)
at
oracle.aurora.rdbms.security.PolicyTableManager.findAll(PolicyTableManager.java:
412)
at
oracle.aurora.rdbms.security.PolicyTableManager.find(PolicyTableManager.java:432
at
oracle.aurora.rdbms.security.PolicyTableManager.activate(PolicyTableManager.java
:456)
at
oracle.aurora.rdbms.security.PolicyTableManager.grant(PolicyTableManager.java:50
3)
BEGIN DBMS_JAVA.grant_permission('HCT', 'java.io.FilePermission', '<<ALL FILES>>', 'read ,write, exe
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
oracle.aurora.vm.IdNotFoundException: -1 is not the number of a user or role
ORA-06512: at "SYS.DBMS_JAVA", line 313
ORA-06512: at line 1.
What should I do to set the privileges?
Please help me. -
Access wwv_flow_files objects through GUI
Can the files from wwv_flow_files be accessed through the GUI ?
Deltagamma,
It depends on what you mean by "accessed".
If you upload an image you will be able to see it in the list in HTML DB.
If you upload say, a large Word document, then to view it you would have to download it and view it in Word or use the MS Word plugin to view it in your browser.
If you simply want to upload and download documents or other files then I suggest you check out the How-To on that subject and try it out.
Probably best if you can explain exactly what it is you are trying to do then someone will be able to provide proper advice.
Greg
Maybe you are looking for
-
When I try to sync my iphone I get this message that there are apps in the iphone that are not in the library. It seems that if I sync I will loose those. How can I make sure that all apps that I have downloaded on iphone are also in the itunes lib
-
after syncing i was asked to update software to %.01. Now itunes no longer recognises ipad and screen on ipad only shows cable...otherwis dead..
-
Bank Directory Import programme
Hi ., Can anybody please help me with some information on Bank directory import program and other details for country U.S.A. I know that bank directory can be automatically created as long as the bank directory is available on diskette and impor
-
Does OS 2.0 support Java Enabled Browsers. If so how do I down load this app
-
Clean installation on new ssd, win7 now on sdb1
Hello This might be more a win7 related post, or maybe grub, not sure: I used to have dual boot Arch/Win7, with the following fstab: /dev/sda1 /media/windows ntfs-3g defaults 0 0 /dev/sda2 / ext4 defaults 0 1 /dev/sda3 /home ext4 defaults 0 1 Recentl