Error not suitable symbol found ?

Hi, I have post many questions here, and all my questions get great answers from this forum. Now I have other question again here is
I have been finish create function in MATLAB, I want the result from MATLAB implement to web, so people can know what I made and can access too. To implement it, I using Java package as compiler. I have been finish package too. but my problem is in Java language, I do not know much about Java can call funtion from MATLAB. In Java I want user can Input image the result is string.
here is my code :
import java.io.File;
import java.io.IOException;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;
import com.mathworks.toolbox.javabuilder.*;
import semua.*;
class myImage
{
public static void main(String[] args)
{
BufferedImage image = null;
File f = null;
Object[] result = null;
Class1 theImage = null;
//readimage
try
{
f = new File("D:\\skripsi\\leaf\\leaf");
image = ImageIO.read(f);
}
catch(IOException e){
System.out.println("Error: "+e);
}
try
{
theImage = new Class1();
result = theImage.semua();
System.out.println(result[0]);
}
catch (IOException e)
{
System.out.println("Exception: " + e.toString());
}
finally
{
theImage.dispose();
}
}
}
But I get error in this line code :
result = theImage.semua(); //error line 30 : not suitable symbol found
How I can fix this code? If anyone here know about this, I hope I get help. Thank you any answer will be must appreciated

6 Comments

import semua.*;
I do not seem to find a Java class by that name? The closest I find is a book by Semua Bisa Menjadi, with the title Programmer Web Java - Case Study ?
Oman Wisni
Oman Wisni on 14 Jan 2019
Edited: Oman Wisni on 14 Jan 2019
semua is the name of my function, like name makesqr in function makesqr.
yes I used semua for name my function, cause in that function call any function..
Well we have no reference for the symbols or methods available in Class1 or semua.*
does the name used affect?
You need to be consistent, and also avoid any keywords, and also avoid anything that you use from other packages.
I just follow java code from this link https://www.mathworks.com/help/compiler_sdk/gs/create-a-java-application-with-matlab-code.html I only change the name makesqr to semua, and some code where in there to create a integer but my input is image.

Sign in to comment.

Answers (0)

Asked:

on 14 Jan 2019

Commented:

on 15 Jan 2019

Community Treasure Hunt

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

Start Hunting!