Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

Java and ActiveX Integration

Thread view: 
Peter Olcott - 21 Oct 2007 17:58 GMT
Is it still as simple and complete as described by the
source below?

Using an ActiveX control as a Java class
Using a Java class as an ActiveX control
Manipulating a Java applet through ActiveX scripting

 http://www.ssuet.edu.pk/taimoor/books/1-57521-197-1/ch38.htm
This is the chapter from the 1997 book
Daniel Pitts - 21 Oct 2007 18:32 GMT
> Is it still as simple and complete as described by the
> source below?
[quoted text clipped - 5 lines]
>   http://www.ssuet.edu.pk/taimoor/books/1-57521-197-1/ch38.htm
> This is the chapter from the 1997 book

I don't have experience in that regard, but I have a suggestion
none-the-less.  Don't. :-)

Java is designed to be portable, and it offers so much that creating an
ActiveX control when you can do the same thing in Java is probably a Bad
Idea(TM)

If you absolutely have to use ActiveX for some reason, go ahead, but
think about pure Java first, or some pure Microsoft solution.

Good luck,
Daniel.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Steve Sobol - 21 Oct 2007 18:56 GMT
> Is it still as simple and complete as described by the
> source below?
[quoted text clipped - 5 lines]
>   http://www.ssuet.edu.pk/taimoor/books/1-57521-197-1/ch38.htm
> This is the chapter from the 1997 book

At one point there was an ActiveX/COM-to-Java bridge but I don't know if
it's been maintained over the years. What is it that you need to do?

Signature

Steve Sobol, Victorville, CA     PGP:0xE3AE35ED  www.SteveSobol.com

Wahoo! Indians beat New York to advance to the AL Championship Series!
http://www.latimes.com/sports/la-sp-al9oct09,1,5871580.story

Peter Olcott - 21 Oct 2007 19:06 GMT
>> Is it still as simple and complete as described by the
>> source below?
[quoted text clipped - 10 lines]
> it's been maintained over the years. What is it that you
> need to do?

I need to create a new programming language and prefer not
to start from scratch.
I invented a technology that can "see" whatever is on the
screen.
   www.SeeScreen.com
What I want to accomplish with this new programming language
is to provide a simple easy to use scripting language that
can be used to automate the actions of any GUI based system.
Steve Sobol - 21 Oct 2007 19:56 GMT
> I need to create a new programming language and prefer not
> to start from scratch.
[quoted text clipped - 4 lines]
> is to provide a simple easy to use scripting language that
> can be used to automate the actions of any GUI based system.

OK. Is there a natively compiled piece of software that will help you do
what you need to do? Relying on a ten-year-old piece of technology that is
probably obsolete is not a good idea, and pure Java or pure
$INSERT_MICROSOFT_TECHNOLOGY_HERE may be better.

I googled for

java screen capture

(which I believe is what you are looking for?) and came up with some
interesting links. I think you should start there.

Signature

Steve Sobol, Victorville, CA     PGP:0xE3AE35ED  www.SteveSobol.com

Wahoo! Indians beat New York to advance to the AL Championship Series!
http://www.latimes.com/sports/la-sp-al9oct09,1,5871580.story

Steve Sobol - 21 Oct 2007 19:59 GMT
I just wrote -

> I googled for
>
> java screen capture
>
> (which I believe is what you are looking for?) and came up with some
> interesting links. I think you should start there.

Also check the javadocs for java.awt.Robot.

Signature

Steve Sobol, Victorville, CA     PGP:0xE3AE35ED  www.SteveSobol.com

Wahoo! Indians beat New York to advance to the AL Championship Series!
http://www.latimes.com/sports/la-sp-al9oct09,1,5871580.story

Arne Vajhøj - 22 Oct 2007 02:32 GMT
> Is it still as simple and complete as described by the
> source below?
[quoted text clipped - 5 lines]
>   http://www.ssuet.edu.pk/taimoor/books/1-57521-197-1/ch38.htm
> This is the chapter from the 1997 book

Java-ActiveX is out of fashion.

There are some commercial offerings:
  http://www.nevaobject.com/j2cdetails.asp?kw=java%20com%20bridge
  http://www.ezjcom.com/google.html?gclid=CLXojqqtoY8CFReQGgodVQGfeQ
and some open source solutions:
  http://danadler.com/jacob/
  http://sourceforge.net/projects/jcom/

I would look for alternatives.

Java-JavaScript is still supported !

Arne
Peter Olcott - 22 Oct 2007 04:08 GMT
>> Is it still as simple and complete as described by the
>> source below?
[quoted text clipped - 22 lines]
>
> Arne

It has to be ActiveX / interpreted language, that is the
binding constraint.
Lew - 22 Oct 2007 04:28 GMT
> It has to be ActiveX / interpreted language, that is the
> binding constraint.

What does the slash mean in that sentence?

Signature

Lew

Peter Olcott - 22 Oct 2007 05:46 GMT
>> It has to be ActiveX / interpreted language, that is the
>> binding constraint.
>
> What does the slash mean in that sentence?

It has to be an interpreted language that can invoke ActiveX
functions. If it is not an interpreted language or it can't
invoke ActiveX functions, it won't fit my needs. It could be
a compiled language that acts as if it was an interpreted
language, (such as a JIT compiler) as long it can execute
from source code in a few seconds, and the JIT compiler is
freely distributable.
Arne Vajhøj - 24 Oct 2007 01:24 GMT
>>> Is it still as simple and complete as described by the
>>> source below?
[quoted text clipped - 22 lines]
> It has to be ActiveX / interpreted language, that is the
> binding constraint.

Where does Java come into the picture ?

(neither ActiveX controls nor Java is interpreted)

Arne
Peter Olcott - 24 Oct 2007 01:56 GMT
>>>> Is it still as simple and complete as described by the
>>>> source below?
[quoted text clipped - 28 lines]
>
> Arne

How does Java run on WebPages if it is not interpreted?
Arne Vajhøj - 24 Oct 2007 02:01 GMT
>>>>> Is it still as simple and complete as described by the
>>>>> source below?
[quoted text clipped - 28 lines]
>
> How does Java run on WebPages if it is not interpreted?

JSP (Java Server Pages) is triple compiled on the server
(jspc compiles from JSP to Java, javac compiles from Java
to Java byte code, JVM JIT  compiles from Java byte code
to native).

Java applets is compiled from Java to Java byte code
by the developer somewhere and compiled from Java byte
code to native by the JIT compiler in the JVM used
by the browser.

Well if you use a JVM from mid 1990's it may actually
interpret, but ...

JavaScript is interpreted, but has nothing to do with
Java.

Arne
Peter Olcott - 24 Oct 2007 04:23 GMT
>> How does Java run on WebPages if it is not interpreted?
>
[quoted text clipped - 15 lines]
>
> Arne

How long does this whole process take? Does the user have to
wait a long time for a Java applet to be compiled before it
runs? I need a language that will run will very little
delay, either directly from source-code or very quickly
compiled.
Daniel Pitts - 24 Oct 2007 04:57 GMT
>>> How does Java run on WebPages if it is not interpreted?
>> JSP (Java Server Pages) is triple compiled on the server
[quoted text clipped - 20 lines]
> delay, either directly from source-code or very quickly
> compiled.

The Applet is compiled to byte code by the developer, so that doesn't
affect the user startup time.  The JIT compiler is designed to be
somewhat transparent to the application user while increasing speed for
the user.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Owen Jacobson - 24 Oct 2007 05:19 GMT
> "Arne Vajh?j" <a...@vajhoej.dk> wrote in message
>
[quoted text clipped - 25 lines]
> delay, either directly from source-code or very quickly
> compiled.

The compilation from bytecode to native code is an ongoing, background
process performed on code as it's run and profiled by the JVM.  Sun's
implementation ("Hotspot") is described in detail on their site:
 <http://java.sun.com/javase/technologies/hotspot/index.jsp>

In general JIT compilation trades a small slowdown initially (overhead
of running a lightweight profiler and the compilation process itself)
for a relatively large speedup over the life of the program.  I've
seen test cases for some things double in speed over a few minutes of
repeated tests, personally (for somewhat CPU-heavy operations: XML
parsing from a memory buffer).

You'll need to quantify your speed needs and measure for yourself
whether a given language is "fast enough", but personally I've found
Java to be more than fast enough for the vast majority of programs.

YMMV,
Owen
RedGrittyBrick - 24 Oct 2007 11:22 GMT
> How long does this whole process take? Does the user have to
> wait a long time for a Java applet to be compiled before it
> runs? I need a language that will run will very little
> delay, either directly from source-code or very quickly
> compiled.

Will your application (SeeScreen?) be generating Java source code, then
(compiling and) executing it?

On a PC with a 1.7 GHz Celeron and 512MB RAM, running Windows XP Pro,
with many other applications open, it took about three seconds to
execute `javac HelloWorld.java`, it took about four seconds to compile a
 150 line Java class.
Dirk Michaelsen - 24 Oct 2007 15:39 GMT
>On a PC with a 1.7 GHz Celeron and 512MB RAM, running Windows XP Pro,
>with many other applications open, it took about three seconds to
>execute `javac HelloWorld.java`, it took about four seconds to compile a
>  150 line Java class.

don't forget that before javac starts compiling any code, it has to
load and setup it's environment. Once loaded it doesn't make a huge
difference wether you compile 1 or 10 files, 150 or 10000 lines of
code. You can see this significantly clear if you use a build utility
like ant wich bulk compiles a whole application in a few seconds.

Dirk
Arne Vajhøj - 24 Oct 2007 13:15 GMT
>> Java applets is compiled from Java to Java byte code
>> by the developer somewhere and compiled from Java byte
[quoted text clipped - 6 lines]
> delay, either directly from source-code or very quickly
> compiled.

The JIT compilation happens in the background during execution
and should be invisible to the user.

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.