Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > RMI question - VMID

Reply
Thread Tools

RMI question - VMID

 
 
Andrew Thompson
Guest
Posts: n/a
 
      06-08-2004
On Wed, 9 Jun 2004 00:02:20 +0800, Horace wrote:
....
> com.ms.security.SecurityExceptionEx[java/rmi/dgc/VMID.<clinit>]:

...
> having to do either (i) download the full Java plugin - i.e. only download
> only the necessary class(es) (ii) signing the applet - I have heard this
> extremely painful and is pretty much a last resort.


You can try using the PolicyTool to adjust
individual browsers to use the applet, but
that is not really practical for anything
beyond an intranet.

Figure how to sign your code, and you will
never look back.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Horace
Guest
Posts: n/a
 
      06-08-2004
Hello

I have a very simple applet that uses RMI as follows :-

import java.applet.*;
import java.net.*;
import java.io.*;
import java.awt.*;
import java.rmi.dgc.*;
public class GetHandle extends Applet {
public VMID vm;
public String vmStr;
public void init() {
vm = new VMID();
vmStr = vm.toString();
}
}

I am invoking this applet from the following HTML :-

<script language="JavaScript">
function x() {
alert(document.GetHandle.vmStr);
}
</script>
<HTML>
<BODY onload=javascript()>
<applet id=GetHandle name=GetHandle code="GetHandle.class"
codebase="../rmi/"
archive="../rmi/rmi.jar"
width=0 height=0 VIEWASTEXT>
</applet>
</BODY>
</HTML>

I have downloaded the rmi.jar file used from a website.

When the HTML is invoked I get the following error message in the Java
console of my IE browser (note that on some machines I get the the error
message [in the Java console] and the alert box showing the VMID but on
other machines there is just the error message [in the Java console] with no
alert box) :-

com.ms.security.SecurityExceptionEx[java/rmi/dgc/VMID.<clinit>]: cannot
connect to "my-machine-name"
at com/ms/security/permissions/NetIOPermission.check
at com/ms/security/PolicyEngine.deepCheck
at com/ms/security/PolicyEngine.checkPermission
at com/ms/security/StandardSecurityManager.chk
at com/ms/security/StandardSecurityManager.chkex
at com/ms/security/StandardSecurityManager.checkConnect
at java/net/InetAddress.getLocalHost
at java/rmi/dgc/VMID.<clinit>
at GetHandle.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run

My question : is there a way to get rid of the above error message *without*
having to do either (i) download the full Java plugin - i.e. only download
only the necessary class(es) (ii) signing the applet - I have heard this
extremely painful and is pretty much a last resort.

Many thanks
Phil


 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      06-09-2004
Andrew

Thanks for the reply - it's such a small thing I want want to do that
signing an applet doesn't seem justified - perhaps there's an alternative.
All's I'm trying to do is the following :-
- identify the client machine - this cannot change throughout the course of
the user's session - ideally it would be unique (but this is not absolutley
necessary - I'm not worried about nanoseconds - i.e. VMID is fine)
- without having to drop a cookie
- make it very difficult for the client to modify

I have tried :-
- VMID through the means shown
- IP address (via ASP Request.ServerVariables("REMOTE_ADDR") and/or Java
java.net.InetAddress.getLocalHost().getHostAddress () / getHostName())
- session.sessionID, but this cannot be relied on, when using frames, to be
the same across frames

Do you know of any other alternatives or suggestions ?

Cheers
Phil


"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:g79uvua8h72z$(E-Mail Removed)...
> On Wed, 9 Jun 2004 00:02:20 +0800, Horace wrote:
> ...
> > com.ms.security.SecurityExceptionEx[java/rmi/dgc/VMID.<clinit>]:

> ..
> > having to do either (i) download the full Java plugin - i.e. only

download
> > only the necessary class(es) (ii) signing the applet - I have heard this
> > extremely painful and is pretty much a last resort.

>
> You can try using the PolicyTool to adjust
> individual browsers to use the applet, but
> that is not really practical for anything
> beyond an intranet.
>
> Figure how to sign your code, and you will
> never look back.
>
> --
> Andrew Thompson
> http://www.PhySci.org/ Open-source software suite
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.1point1C.org/ Science & Technology



 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-09-2004
On Wed, 9 Jun 2004 09:54:55 +0800, <(E-Mail Removed)> wrote:

Please do not top-post..
<http://www.physci.org/codes/javafaq.jsp#netiquette>

Because...

> "Andrew Thompson" <(E-Mail Removed)> wrote in message
>> On Wed, 9 Jun 2004 00:02:20 +0800, Horace wrote:
>> ...
>>> com.ms.security.SecurityExceptionEx[java/rmi/dgc/VMID.<clinit>]:

>> ..
>>> having to do either (i) download the full Java plugin

....
> Do you know of any other alternatives or suggestions ?


>> You can try using the PolicyTool..


[ * ..becasue often you miss important bits,
like 'PolicyTool', which I had already suggested.. ]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
Horace
Guest
Posts: n/a
 
      06-09-2004
Andrew, thanks but it's an Internet application, so as you mentioned
adjusting client browsers using a PolicyTool is not really an option. I
have a solution but I don't know how stable it is. Instead of using VMID I
have used UID (as in java.rmi.server.UID). This returns an ID and *no*
security error message.

However, with the bailout of the JVM by Microsoft on IE, are applets stable
now as well as future versions of IE. I assume IE 7 won't have Java support
as part of the standard - will the user be required to download the Java
plugin for all applets ?

Cheers
Phil



"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:wyhob8ajejgw$(E-Mail Removed)...
> On Wed, 9 Jun 2004 09:54:55 +0800, <(E-Mail Removed)> wrote:
>
> Please do not top-post..
> <http://www.physci.org/codes/javafaq.jsp#netiquette>
>
> Because...
>
> > "Andrew Thompson" <(E-Mail Removed)> wrote in message
> >> On Wed, 9 Jun 2004 00:02:20 +0800, Horace wrote:
> >> ...
> >>> com.ms.security.SecurityExceptionEx[java/rmi/dgc/VMID.<clinit>]:
> >> ..
> >>> having to do either (i) download the full Java plugin

> ...
> > Do you know of any other alternatives or suggestions ?

>
> >> You can try using the PolicyTool..

>
> [ * ..becasue often you miss important bits,
> like 'PolicyTool', which I had already suggested.. ]
>
> --
> Andrew Thompson
> http://www.PhySci.org/ Open-source software suite
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.1point1C.org/ Science & Technology



 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-09-2004
On Wed, 9 Jun 2004 23:14:02 +0800, Horace wrote:

> However, with the bailout of the JVM by Microsoft on IE, are applets stable
> now as well as future versions of IE.


That sounds to me like the question
"Can I expect Java to be installed
in the the user's browser"

Short answer, no. Long answer..
<http://www.physci.org/codes/java/plugin.jsp>

>..I assume IE 7 won't have Java support
> as part of the standard - will the user be required to download the Java
> plugin for all applets ?


Assume it. Use the JavaVersionApplet
to let your users kknow what is happening in
case they have 1.1 and you code for 1.4,
otherwise use the 'alt' and 'no applet'
options to inform the user..

"You need the Sun Java Plug-In to view
this fine software "

(shrugs) Bottom line, you simply cannot
reach 100% of internet users if you rely
on Applets. Some users will not have it,
and will have no option for getting it.
(I could be barred by the system admin,
for instance)

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-09-2004
On Wed, 09 Jun 2004 16:29:14 GMT, Andrew Thompson wrote:
....
> (I could be barred by the system admin,
> for instance)


...errr
"(IT [Java*] could be barred by the system admin,
for instance)"

* As opposed to "I [A.T.] could be barred..",
though that is a contiguous and ever present
possibility..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
Horace
Guest
Posts: n/a
 
      06-10-2004
Andrew, is it possible to run an applet from within an Internet web page
without the user having to download the plugin - i.e. is there software that
wraps up all required classes that an applet will use into one compact jar
file, include that jar file within your applet/object tag, so that there's
no need for the 15MB worth of plugin download.
Cheers
Phil




"Andrew Thompson" <(E-Mail Removed)> wrote in message
news:3bku3jt3i3rq.1wohjtz2qbump$(E-Mail Removed)...
> On Wed, 09 Jun 2004 16:29:14 GMT, Andrew Thompson wrote:
> ...
> > (I could be barred by the system admin,
> > for instance)

>
> ..errr
> "(IT [Java*] could be barred by the system admin,
> for instance)"
>
> * As opposed to "I [A.T.] could be barred..",
> though that is a contiguous and ever present
> possibility..
>
> --
> Andrew Thompson
> http://www.PhySci.org/ Open-source software suite
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.1point1C.org/ Science & Technology



 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-10-2004
On Thu, 10 Jun 2004 10:30:15 +0800, Horace wrote:

> Andrew, is it possible to run an applet from within an Internet web page
> without the user having to download the plugin


No.

>..- i.e. is there software that
> wraps up all required classes that an applet will use into one compact jar
> file, include that jar file within your applet/object tag, so that there's
> no need for the 15MB worth of plugin download.


No.

There are ways to do that with a stand-alone
application, but they will not work for an applet.

An applet must have a suitable JRE available
in the browser.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does java.rmi.Naming not implement interface java.rmi.Registry? Jan Schulze Java 1 03-26-2005 07:45 AM
RMI Vs RMI over IIOP JScoobyCed Java 1 01-28-2005 09:54 AM
RMI, JINI or RMI/IIOP Buu Nguyen Java 1 08-25-2004 11:28 AM
RMI connection question coder_1024 Java 2 12-18-2003 01:38 AM
RMI question Joshua Long Java 0 10-29-2003 08:13 AM



Advertisments