Octave Error with XLS functions - java

I just started using Octave, and have been trying to do some operations from data in Excel files. I've installed the IO, Java, and Windows packages in Octave, but when I run the script, I get the following error message:
Looking for supported interfaces:
Excel/COM... not working.
error: No Java support found.
error: called from:
error: C:\Octave\3.2.4_gcc-4.4.0\share\octave\packages\io-1.0.14\xlsopen.m at
line 395, column 1
error: C:\Octave\3.2.4_gcc-4.4.0\share\octave\packages\io-1.0.14\xlsopen.m at
line 168, column 15
error: C:\Octave\3.2.4_gcc-4.4.0\share\octave\packages\io-1.0.14\xlsread.m at
line 215, column 1
error: C:\Users\Kyle\Desktop\nighttime2.m at line 30, column 18
I've been trying to solve this for a little while now so any help would be greatly appreciated!

The first error is
No Java support found.
So it's probably because you have not properly installed the java package.
Read and follow the instructions under the section How to install the java package in Octave? in the documentation.
There is also a document called: How to install the java package in Octave? that can be helpful.

Related

h2o code in R is not working - strange error message

I cannot seem to get the h2o code to load in R. I tried to start up h2o using the following codes:
h2o.no_progress()
h2o.init(max_mem_size = "5g")
This did not work so I tried the code below and got the following error message.
h2o.init()
'''H2O is not running yet, starting it now...
<simpleError in system2(command, "-version", stdout = TRUE, stderr = TRUE): '""' not found>
Error in value[3L] :
You have a 32-bit version of Java. H2O works best with 64-bit Java.
Please download the latest Java SE JDK from the following URL:
https://www.oracle.com/technetwork/java/javase/downloads/index.html'''
I tried downloading the Java update, but the link does not work. I am not sure how to fix the error. I am trying to do PCA on my dataset.
That is the correct link: https://www.oracle.com/java/technologies/javase-downloads.html Are the double quotes at the end of the link part of the error message? Or did that get added when you formatted your question here? If you remove the quotes at the end, the link works.
Please download Java 11 because Java 14 (the latest) was just released and we don't officially support it yet. H2O system requirements (Java 8-13) are listed here.

Putting SWI-Prolog's JPL interface to work

I want to use JPL to create a graphic interface to my project, so I went and searched a code example to start working with, I downloaded the code but when I run it, it shows the following message:
ERROR: c:/program files/swipl/library/jpl.pl:4243:
'$open_shared_object'/3: Não foi possível encontrar o módulo especificado (this stands for "it wasn't possible to find the especified module)".
ERROR: c:/program files/swipl/library/jpl.pl:4243:
c:/program files/swipl/library/jpl.pl:4243: Initialization goal raised exception:
library `java' does not exist (Please add directory holding java.dll to %PATH%)
ERROR: c:/users/User/desktop/system/medical expert system.pl:4:
Exported procedure jpl:jpl_c_lib_version/1 is not defined
And when I try to use one function of the code it shows:
ERROR: Undefined procedure: jpl:jni_func/3
ERROR: In:
ERROR: [14] jpl:jni_func(6,'javax/swing/JFrame',_10490)
ERROR: [13] jpl:jFindClass('javax/swing/JFrame',_10522) at c:/program files/swipl/library/jpl.pl:1631
ERROR: [12] jpl:jpl_type_to_class(class([javax|...],['JFrame']),_10554) at c:/program files/swipl/library/jpl.pl:3049
ERROR: [11] jpl:jpl_new_1(class([javax|...],['JFrame']),['Expert System'],_10606) at c:/program files/swipl/library/jpl.pl:169
ERROR: [10] jpl:jpl_new('javax.swing.JFrame',['Expert System'],_10664) at c:/program files/swipl/library/jpl.pl:138
ERROR: [9] interface2 at c:/users/User/desktop/system/medical expert system.pl:180
ERROR: [7] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
I kinda tried to put the folder containing java.dll to the PATH in System Variables but it keeps showing the same message
My SWI-Prolog is version 7.6.4 64 bits, I don't think there's nothing wrong with the code itself because there's no one complaining about it in the video I downloaded it from.
Edit: the message saying that java.dll is now gone and now there's only the 2 other messages remaining, and I've already included everything I thought it was relevant in the Path under System Variables.
Make sure that the CLASSPATH variable in System Variables includes the path to the jpl.jar file that is bundled with SWI-Prolog. As in example, in my Windows 7 VM, I get from within SWI-Prolog:
?- getenv('CLASSPATH', P).
P = 'c:/program files/swipl/lib/jpl.jar'.
All of my code that uses JPL runs fine in this variable definition. In addition, loading the JPL library should print something like (assuming a recent SWI-Prolog version):
?- use_module(library(jpl)).
% Extended DLL search path with
% 'c:/Program Files/Java/jre1.8.0_201/bin/server'
% 'c:/Program Files/Java/jre1.8.0_201/bin'
Update
Experiment with also defining the JAVA_HOME variable in System Variables. I'm on macOS where I use:
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home
The path would differ on Windows and depending on the Java version you have installed but should end with HOME.

How to run xmlread function in Octave?

When I run xmlread function in Octave, I get
>> xmlread()
warning: the 'xmlread' function is not yet implemented in Octave
Please read <http://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: 'xmlread' undefined near line 1 column 1
I have found a documentation, saying it is in io package of Octave-Forge. Unfortunately, just installing this package didn't help. It is said to set paths to xerces, but unfortunately I can't find xml-apis.jar of 2.11 version. I found only xercesImpl-2.11.0.jar, but adding of it alone didn't help. Adding it with ancient xml-apis-2.0.2.jar didn't help:
>> javaaddpath(fullfile('lib','xercesImpl-2.11.0.jar'));
>> javaaddpath(fullfile('lib','xml-apis-2.0.2.jar'));
>> xmlread();
warning: the 'xmlread' function is not yet implemented in Octave
Please read <http://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: 'xmlread' undefined near line 1 column 1
How to succeed?

Weird JavaGuard error?

I am using JavaGuard to obfuscate one of my .jar files and got this error:
# ERROR - corrupt class file: me/project/main/Main.class java.io.IOException: Incompatible version number for class file
format: 52 / 0 at
net.sf.javaguard.classfile.ClassFile.read(ClassFile.java:160) at
net.sf.javaguard.classfile.ClassFile.create(ClassFile.java:116) at
net.sf.javaguard.GuardDB.addClasses(GuardDB.java:415) at
net.sf.javaguard.GuardDB.startObfuscate(GuardDB.java:274) at
net.sf.javaguard.GuardDB.obfuscate(GuardDB.java:243) at
JavaGuard.obfuscate(JavaGuard.java:322) at
JavaGuard.start(JavaGuard.java:179) at
JavaGuard.main(JavaGuard.java:146)
What can I do to fix this? My code compiles fine and the .jar export has no errors. I have no problems with my code or .java files.
It looks like you are compiling your code using Java 8, then using a version of javaguard that does not understand Java 8 class formats. The format: 52 in the exception message is the class format version, indicating Java 8. This Wikipedia entry lists the possible values and the corresponding Java versions https://en.wikipedia.org/wiki/Java_class_file
This is hardly surprising - the last javaguard release appears to be a 1.0 beta in 2002. You may need to use another tool
For the "//INTERNAL ERROR//" thing you can use Luyten decompiler; It'll get your code.
For the "# ERROR - corrupt class file: me/project/main/Main.class java.io.IOException: Incompatible version number for class file format: 52 / 0 at" error, you may want to use a newer version of proguard.
I had this problem (using proguard maven plugin) and got it resolved using the 5.3.2.

Windows Error: Error 5, when decompiling minecraft server

I want to start create mods and so on to minecraft. I am a javaprogrammer myself, so the coding shouldn't be a problem. but to start the programming I need to decompile the server file from minecraft. Everything to do so is given and explained in a txt document, but nontheless I still get an annoying error.
I have checked my pth for JDK and JRE, have the latest version of both and all.
I really hope someone can help me. Here's the traceback:
File "runtime\decompile.py", line 143, in <module> main()
File "runtime\decompile.py", line 143, in <module> main()
File "runtime(options.config, options.force_jad) commands = Commands(donffile)
File "C:\Program Files\Java\MCP\runtime\commands.py", line 158, in __init__ self.checkfolders()
File "C.\Program Files\Java\MCP\runtime\commands.py", line 530, in checkfolders os.makedirs(self.dirtemp)
File "os.pyc", line 157, in makedirs
WindowsError: [Error 5] Access is denied: 'temp'
If I run as administrator I get following msg:
The system cannot find the path specified.
You'd safe my day if you could help me with this problem.
Which decompiler do you use? I'd start checking this commands.py line 530 for any clues what value does this dirtemp has. I'd recommend using the JD decompiler.
Also, I'd be surprised if Notch hadn't used any obfuscators to prevent decompiling. That means you'll get a bunch of unreadable gibberish Java sources.

Categories