how to block Java

1 view
Skip to first unread message

Wendelin Uez

unread,
Jul 21, 2018, 1:59:56 PM7/21/18
to
I had to install Java 8 in order to run a special program. This program is
used very rarely but Java provides its functionality to other programs
always, and therefore I would like to block Java so that other apps and
scripts on my PC cannot make use of Java.

My first idea was to rename Java components via batch before and after
running the program, but I am not sure if this works realy as expected.

How can I limit access to Java environment for any other programs allowing
only myApp.exe to employ Java?

Thanks, wuez

Daniele Futtorovic

unread,
Jul 21, 2018, 2:43:21 PM7/21/18
to
Perhaps you could just remove the JRE installation directory from the $PATH?

Or bundle your program with a JRE (at the cost of size, obviously).

That wouldn't strictly speaking prevent another program from running
"your" JRE, but they would have to know the directory it resides in.

HTH,

--
DF.

Wendelin Uez

unread,
Jul 22, 2018, 5:32:57 AM7/22/18
to
>> How can I limit access to Java environment for any other programs
>> allowing only myApp.exe to employ Java?
>
> Perhaps you could just remove the JRE installation directory from the
> $PATH?

I'm afraid this wouldn't work if registry entries are used fpr
configuration.

> Or bundle your program with a JRE (at the cost of size, obviously).

Yes, but how to do?

Thanks, wuez

Daniele Futtorovic

unread,
Jul 22, 2018, 5:26:14 PM7/22/18
to
Not sure; never tried it myself. Might simply zipping up the JRE dir work?

Lothar Kimmeringer

unread,
Oct 15, 2018, 4:12:03 PM10/15/18
to
Wendelin Uez wrote:

> I had to install Java 8 in order to run a special program. This program is
> used very rarely but Java provides its functionality to other programs
> always, and therefore I would like to block Java so that other apps and
> scripts on my PC cannot make use of Java.

I assume, we're talking Windows here? With Linux you can download
Java as ZIP-file, so you can put it whereever you like.

You can install the JDK instead of the JRE. The installer of
the JDK also allows you to install the JRE but you can deselect
it. The JDK is not added to the PATH-variable automatically,
so it shouldn't be "visible" to other programs, except if they
do a scan of the whole file-system.


Cheers, Lothar
--
Lothar Kimmeringer E-Mail: spam...@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
questions!
Reply all
Reply to author
Forward
0 new messages