Help me to add java program to my world

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help me to add java program to my world

Patrick Pabeda

I have a program which is write in java. This program is using swing as user interface. I want to add this program to my virtual world through Portal or project. Do you have any idea for do this?

 

Thanks before for your help

 

-Patrick-

Reply | Threaded
Open this post in threaded view
|

Re: Help me to add java program to my world

Howard Stearns

I can think of several options. Maybe others can think of more. Working
from roughly most desirable/ambitious down:

I. One of the things that I think is most powerful about Croquet is to
have different programs interact with each other in ways that the users
decide is useful, not necessarily in ways that the original developer
explicitly provided for. The analogy in conventional desktop/window
applications is to find a toolbar item you like in one app and simply
drag it over to another app and have it work there. This is what Brie is
working towards (http://www.wetmachine.com/itf/category/12) but there
are other approaches, too. Some steps towards achieving this might be:

   A. Rewrite your program in Croquet. You always win when you rewrite
something, and then doubly so when you rewrite it in a "better"
language. On the other hand, the 2D graphics library that you would use
to do this, Tweak, is still not completely mature. You'll be a pioneer.

   B. Rewrite Croquet in Java. (Hey, it can be done...)

II. Keep your program in Java, outside of Croquet, such that it cannot
interact with other programs, but at least let it remain shared so that
all users in the space can collaboratively access the program. (I think
this is probably what you're thinking when talking about Portal or
Project, but I would do one of the following instead.)

   A. Construct an EmbeddedApp mechanism for replicated local Java. Each
user would run an identical copy of the Java program on their own
machine. You would rely on the EmbeddedApp mechanism to keep inputs
replicated, and you would write code to pass those inputs from Squeak to
  the Java runtime. You would also write code to get the display from
the Java runtime and display it on a texture within Croquet. Croquet
would then take care of displaying that texture in 3D.

  B. Run a single instance of the Java application on a server, and use
the EmbeddedApp mechanism to communicate with that server. There is a
example of this now in the repository
(KStandardHarness>>makeDesktop:)which uses VNC clients on each Croquet
machine to connect to a single shared VNC server. (The server in the
example code does Web browsers, OpenOffice (Word clone), PDF viewer, and
a jailed Linux desktop, but it does not currently explicitly do Java
apps. It all works, but it has had no tuning and is not yet fast enough
for practical use.

III. Let the shared Croquet environment simply be a launching point for
an isolated, non-shared, 2D Java application. You have the Croquet
object or UI launch a completely separate non-Croquet, non-Squeak, 2D
operating system window to open, in which the Java program is running on
the local machine. Different variations on this include having the
launcher be part of the non-replicated UI (e.g., a Tweak menu bar, or a
context menu on an in-world object), or the launcher can be a replicated
object such that it launches (non-shared) applications for everyone in
the space.

-Howard

Patrick Pabeda wrote:

> I have a program which is write in java. This program is using swing as
> user interface. I want to add this program to my virtual world through
> Portal or project. Do you have any idea for do this?
>
>  
>
> Thanks before for your help
>
>  
>
> -Patrick-
>

--
Howard Stearns
University of Wisconsin - Madison
Division of Information Technology
mailto:[hidden email]
jabber:[hidden email]
voice:+1-608-262-3724