# Class: com.pnfsoftware.jeb.client.AbstractContext

Base context for client contexts and core contexts. Basic variables are set up \(eg, paths\). This class is not configuration\-aware.

## Constructor: AbstractContext

Description: Create an abstract context and resolve the key JEB runtime paths.

## Protected Field: integrity_failed
Type: `boolean`
Description: True when a runtime integrity check failed.

## Protected Field: just_updated
Type: `boolean`
Description: True when the current installation was just updated from an older build.

## Static Field: app_company
Type: `java.lang.String`

Constant value: `PNF Software, Inc.`
Description: Company name.

## Static Field: app_dates
Type: `java.lang.String`

Constant value: `2015-2026`
Description: Copyright year range.

## Static Field: app_domain
Type: `java.lang.String`

Constant value: `pnfsoftware.com`
Description: Primary domain name.

## Static Field: app_email_licensing
Type: `java.lang.String`

Constant value: `licensing@pnfsoftware.com`
Description: Licensing contact email address.

## Static Field: app_email_support
Type: `java.lang.String`

Constant value: `support@pnfsoftware.com`
Description: Support contact email address.

## Static Field: app_email_updates
Type: `java.lang.String`

Constant value: `software@pnfsoftware.com`
Description: Software update contact email address.

## Static Field: app_licensing_backup
Type: `java.lang.String`

Constant value: `https://lise.pnfsoftware.com`
Description: Backup licensing service URL.

## Static Field: app_name
Type: `java.lang.String`

Constant value: `JEB`
Description: Product name.

## Static Field: app_uri
Type: `java.lang.String`

Constant value: `jeb:`
Description: Application URI scheme.

## Static Field: app_url_apidoc
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/apidoc`
Description: API documentation URL.

## Static Field: app_url_changelog
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/changelog`
Description: Changelog URL.

## Static Field: app_url_chat
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/chat`
Description: Community chat sign\-up URL.

## Static Field: app_url_check_update
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jps/checkupdate`
Description: Primary update\-check endpoint URL.

## Static Field: app_url_check_update_backup
Type: `java.lang.String`

Constant value: `https://lise.pnfsoftware.com/jps/checkupdate`
Description: Backup update\-check endpoint URL.

## Static Field: app_url_devportal
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/devportal`
Description: Developer portal URL.

## Static Field: app_url_donate
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/donate`
Description: Donation page URL.

## Static Field: app_url_faq
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/manual/faq`
Description: FAQ URL.

## Static Field: app_url_faqmem
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/faqmem`
Description: FAQ entry about memory usage.

## Static Field: app_url_fileuploader
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/u`
Description: File\-upload page URL.

## Static Field: app_url_forum
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/forum`
Description: Community forum URL.

## Static Field: app_url_genkey
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jps/genkey`
Description: Programmatic license\-key generation endpoint URL.

## Static Field: app_url_genkey_backup
Type: `java.lang.String`

Constant value: `https://lise.pnfsoftware.com/jps/genkey`
Description: Backup programmatic license\-key generation endpoint URL.

## Static Field: app_url_genlk
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/genlk`
Description: Manual license\-key generation page URL.

## Static Field: app_url_github
Type: `java.lang.String`

Constant value: `https://github.com/pnfsoftware`
Description: PNF Software GitHub organization URL.

## Static Field: app_url_github_samples
Type: `java.lang.String`

Constant value: `https://github.com/pnfsoftware/jeb-samplecode`
Description: GitHub sample\-code repository URL.

## Static Field: app_url_github_samples_scripts
Type: `java.lang.String`

Constant value: `https://github.com/pnfsoftware/jeb-samplecode/tree/master/scripts`
Description: GitHub sample scripts URL.

## Static Field: app_url_manual
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/manual`
Description: Product manual URL.

## Static Field: app_url_motd
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/motd`
Description: Message\-of\-the\-day URL.

## Static Field: app_url_purchase
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/jeb/buy`
Description: Purchase page URL.

## Static Field: app_url_uploaderrorlog
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com/upload_errorlog`
Description: Error\-log upload endpoint URL.

## Static Field: app_ver
Type: `com.pnfsoftware.jeb.core.Version`
Description: Global JEB software version.

## Static Field: app_website
Type: `java.lang.String`

Constant value: `https://www.pnfsoftware.com`
Description: Primary website URL.

## Static Field: demo
Type: `boolean`
Description: Indicates whether the current build is a demo build.

## Method: getAppDirectory
- return type: `java.lang.String`

Description: Get the JEB app directory, typically $JEB/bin/app.
return: the application directory

## Method: getBaseDirectory
- return type: `java.lang.String`

Description: Get the JEB base directory.
return: the base directory

## Method: getCurrentDirectory
- return type: `java.lang.String`

Description: Get the current directory.
return: the current working directory

## Method: getJebClassesLocation
- return type: `java.io.File`

Description: Get the location of JEB classes.
return: a jar file \(`jeb.jar`\), or a `bin/` folder containing classfiles

## Method: getProgramDirectory
- return type: `java.lang.String`

Description: Get the JEB program directory, typically $JEB/bin/.
return: the program directory

## Method: getSoftwareVersion
- return type: `com.pnfsoftware.jeb.core.Version`

Description: Retrieve the global software version.
return: the software version

## Method: getStartTimestamp
- return type: `int`

Description: Get the program start date in seconds.
return: a Unix timestamp

## Static Method: getChannelName
- return type: `java.lang.String`

Description: Get the current pre\-release channel name.
return: `"Beta"`, `"Alpha"`, or null for release builds

## Protected Static Method: handleUncaughtException
- parameter: `t`, type: `java.lang.Thread`
- parameter: `e`, type: `java.lang.Throwable`
- return type: `java.lang.String`

Description: This method is used by all JEB contexts \(including client contexts\) to handle exceptions reaching the [global uncaught exception handler](Thread#setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler)). 

 Custom client may set a handler of their own, as such: 

```


 static {
     Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
         var msg = handleUncaughtException(t, e);  // call the AbstractContext handler
         if(msg == null) {
             return;
         }
         // custom handling goes here
         // ...
      });
      ...

 
```
parameter: t: thread
parameter: e: exception
return: a non\-null message if the exception is deemed relevant and its stacktrace was sent to         the logger; null otherwise \(it is recommended clients ignore the exception\)

## Protected Static Method: initNetworkUtility
- parameter: `proxyString`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.util.net.Net`

Description: The global proxy settings will be updated/erased.
parameter: proxyString: serialized proxy settings; may be null or empty to disable the proxy
return: a network helper configured with the global proxy settings and JEB user\-agent

## Static Method: isPreRelease
- return type: `boolean`

Description: Determine whether this build is a pre\-release build.
return: true if the current build channel is not [Version#RELEASE](Version#RELEASE)

## Static Method: terminate

Description: Terminate the program.

