I encountered the error 'The MATLAB Editor requires Java.'

8 ビュー (過去 30 日間)
changgyu lee
changgyu lee 2024 年 10 月 8 日
コメント済み: changgyu lee 2024 年 10 月 8 日
I encountered the error'The MATLAB Editor requires Java.'
while following the 'Run Batch Parallel Jobs' tutorial. I am seeking assistance with this issue.
+ Java's version on my PC is
version -java
'Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode'
And I have already installed the latest version of Java from Oracle.
The code I executed is shown below:
mywave.m
edit mywave
for i = 1:1024
A(i) = sin(i*2*pi/1024);
end
Untitled.m
job = batch('mywave')
wait(job)
load(job)
Error message in Command window is shown below:
Error using parallel.Job/load (line 36)
Error encountered while running the batch job. The error was:
Error using edit (line 73)
The MATLAB Editor requires Java.
Error in mywave (line 1)
The same issue occurred in both (R2024a) and (R2023a).
  2 件のコメント
Saurav
Saurav 2024 年 10 月 8 日
編集済み: Saurav 2024 年 10 月 8 日
Can you share the complete error you are getting in the Command window, and also the MATLAB release you're working with?
changgyu lee
changgyu lee 2024 年 10 月 8 日
Thank you for your riple.
I have revised the content according to your request.

サインインしてコメントする。

採用された回答

Saurav
Saurav 2024 年 10 月 8 日
It appears there is an error occurring while following the "Run Batch Parallel Jobs" tutorial from MathWorks documentation.
This issue is not related to Java, as its installation has been confirmed. Instead, the problem seems to be with the implementation of the tutorial itself.
In the ‘mywave.m’ script, the line “edit mywave” is unnecessary if the script file has already been created. This line is typically used only for creating a new script file named ‘mywave’. If the file already exists, this line can be omitted.
To proceed, ensure that only the following code is present in the ‘mywave.m’ script:
for i = 1:1024
A(i) = sin(i*2*pi/1024);
end
By making these adjustments, the tutorial should run without issues.
Hope this helps.
  1 件のコメント
changgyu lee
changgyu lee 2024 年 10 月 8 日
This is the perfect solution. Thank you for your help.
Have a Nice Day! :D

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by