Running Java on Non-network Local PC

Running Java on Non-network Local PC

Question:
Can a Java applet or executable run locally on a PC if the PC is not connected to a network? Example: I bring up my home page and download the latest version of my Java app. Somehow that app gets saved locally. When I’m not hooked into the network, can I run the app?

Answer:
In general, the answer is yes, but persistent caching of Java applets may be more difficult to accomplish than you think. In order for a Java applet or application to run locally on your PC, it needs to have all of its class files present locally on the PC’s disk. If that has happened, you can run applets using appletviewer or a Java-enabled browser and execute standalone Java applications using the Java interpreter directly.

The trick, however, is to make sure you have all of the class files cached locally and that you know how to get to them. Browsers typically do cache the Java class files if you enable the cache, such that when you go to your home page and load any applets on there, the browser will download the class files, save a copy in the cache and then run the applet. On subsequent connections, the browser will simply check the time stamp on the class files and if the applet hasn’t changed since it was downloaded, it will use the cached copy.

If you disconnect your PC from the net and try to run the browser again to bring up that page, the browser will not be able to bring up the page or the applet, because it will first attempt to connect to the server to verify that the cached copy is still valid. To work around this limitation, you can try to look into the cache yourself to find the applet’s class files, however, beware that some browsers like Netscape rename the cached files to internally consistent names which are not necessarily human-readable any more.

In most cases, your best bet is to manually download the class files in a place where you can easily manipulate them without worrying about cache consistency issues.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as