The following warnings occurred:
Warning [2] Trying to access array offset on value of type null - Line: 4475 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 4475 errorHandler->error
/inc/class_session.php 505 my_strlen
/inc/class_session.php 360 session->create_session
/inc/class_session.php 75 session->load_guest
/global.php 55 session->init
/printthread.php 17 require_once
Warning [2] Undefined variable $mybb - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Attempt to read property "settings" on null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Undefined variable $forums - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 63 makeprintablenav
Warning [2] Undefined variable $mybb - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Attempt to read property "settings" on null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Undefined variable $forums - Line: 183 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 183 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Undefined array key 3 - Line: 184 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 184 errorHandler->error
/printthread.php 187 makeprintablenav
/printthread.php 63 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 1229 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1229 errorHandler->error
/printthread.php 72 forum_permissions
Warning [2] Trying to access array offset on value of type null - Line: 1229 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 1229 errorHandler->error
/printthread.php 72 forum_permissions
Warning [2] Undefined array key "canonlyviewownthreads" - Line: 78 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 78 errorHandler->error
Warning [2] Undefined array key "page" - Line: 86 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 86 errorHandler->error
Warning [2] Undefined variable $multipage - Line: 24 - File: printthread.php(163) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/printthread.php(163) : eval()'d code 24 errorHandler->error
/printthread.php 163 eval



jWork.ORG forums
Failes to compile and run Java code on Windows - Printable Version

+- jWork.ORG forums (https://jwork.org/forum)
+-- Forum: DataMelt (/forumdisplay.php?fid=1)
+--- Forum: DataMelt bug report (/forumdisplay.php?fid=3)
+--- Thread: Failes to compile and run Java code on Windows (/showthread.php?tid=93)



Failes to compile and run Java code on Windows - jworkorg - 06-15-2017 10:58 AM

A bug report from the user X.Wang (dmelt 1.X):
Running java code Example.java in DataMelt failed with the message:
Quote:JAVA_HOME was not set or JAVA_HOME/bin/javac was not found! Or no JDK installed?
It is recommended to set JAVA_HOME. It will point to JAVA_HOME/bin/javac
Remove this check in macros/user/run_javac.bsh if this is not a problem
Run it! Process macros/users/run_java.bsh
Error:Error: Could not find or load main class Example



RE: Failes to compile and run Java code on Windows - admin - 06-15-2017 11:27 AM

(06-15-2017 10:58 AM)jworkorg Wrote:  A bug report from the user X.Wang (dmelt 1.X):
Running java code Example.java in DataMelt failed with the message:
Quote:JAVA_HOME was not set or JAVA_HOME/bin/javac was not found! Or no JDK installed?
It is recommended to set JAVA_HOME. It will point to JAVA_HOME/bin/javac
Remove this check in macros/user/run_javac.bsh if this is not a problem
Run it! Process macros/users/run_java.bsh
Error:Error: Could not find or load main class Example

Indeed, this problem is seen on some Windows systems. It will be fixed in dmelt 1.8. To fix this problem in the previous version, do this:

Open the file "macros/user/run_javac.bsh" and replace the line 26:

Quote:if (!ffile.isFile()) {
with
Quote:if if (JAVAHOME == null) {

This will fix this problem. Restart DMelt. In addition, when you run a Java code, make sure that you have synchronized the working directory. This can be done by clicking on the [/quote] located the left-bottom of the editor ("project directory)

admin,