Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while building ScrollView. #1289

Closed
MehulBhardwaj91 opened this issue Jan 24, 2018 · 18 comments
Closed

Error while building ScrollView. #1289

MehulBhardwaj91 opened this issue Jan 24, 2018 · 18 comments

Comments

@MehulBhardwaj91
Copy link

Environment

  • Tesseract Version: Version 4.0
  • Commit Number:
  • Platform: Ubuntu 16.04.
    After running
    make ScrollView.jar
    I get the following error
    ./com/google/scrollview/ui/SVImageHandler.java:19: error: package javax.xml.bind is not visible import javax.xml.bind.DatatypeConverter; ^ (package javax.xml.bind is declared in module java.xml.bind, which is not in the module graph)
    It seems that in Java 9 this module has been deprecated which is most probably causing this error. I have looked online but can't find a way around this. I am not a Java expert so I don't know what's the possible solution to this.

But this is definitely something that should be looked into and other deprecated packages as well.

@toxic-0518
Copy link

I encountered the same problem in Mac OS High Sierra 10.13

@toxic-0518
Copy link

It seems that using JDK 8 can solve this problem. @MehulBhardwaj91

@shanalikhan
Copy link

Facing same in java 10

@MehulBhardwaj91
Copy link
Author

@toxic-0518 : Since this was optional, I went ahead with the training without it. Didn't try it with JDK 8.
@shanalikhan : I would recommend going ahead with training without it.

@shanalikhan
Copy link

Thanks, i thought its necessary, i have made it work by install JDK 8 and now training is in process.

@zdenop
Copy link
Contributor

zdenop commented Sep 29, 2018

Can somebody familiar with java make it work on various Java version (8-10)?

@amitdo
Copy link
Collaborator

amitdo commented Sep 29, 2018

I think that scrollview should be disabled by default.

@zdenop
Copy link
Contributor

zdenop commented Sep 29, 2018

well it is build just on user request e.g. user want it. But build seems to work only on old java. So we need to modernize it as we did with cpp code.

@amitdo
Copy link
Collaborator

amitdo commented Sep 29, 2018

it is build just on user request e.g. user want it.

./configure --help

...
--enable-graphics enable graphics (ScrollView) (default)
--disable-graphics disable graphics (ScrollView)
--enable-embedded enable embedded build (default=no)
--disable-openmp do not use OpenMP
--enable-opencl enable opencl build (default=no)
--enable-visibility enable experimental build with fvisibility
(default=no)
--enable-multiple-libraries
enable multiple libraries (default=no)
--disable-tessdata-prefix
don't set TESSDATA-PREFIX during compile
--enable-debug turn on debugging (default=no)

Of course, changing the default will not solve the problem, but I still think we should change it, because scrollview is not necessary for most users.

@zdenop
Copy link
Contributor

zdenop commented Oct 6, 2018

@amitdo : above mentioned issue has nothing to do with default building setting --enable-graphics.
I afraid disabling 'graphics' can bring more problems: I have on my TODO list testing one debug variable that start ScrollView, and without it tesseract will not finished. But ScrollView windows is not shown... So we should be careful.

@amitdo
Copy link
Collaborator

amitdo commented Oct 6, 2018

Okay :-)

@nguyenq
Copy link
Contributor

nguyenq commented Oct 10, 2018

Attached is the fix, which is to download the required jaxb-api-2.3.1.jar. The files should be placed into java folder, replacing the existing ones. I tested it with Oracle Java 10 on Ubuntu.

java.zip

@zdenop zdenop closed this as completed in 9d84968 Oct 10, 2018
@zdenop
Copy link
Contributor

zdenop commented Oct 10, 2018

Thanks nguyenq!

@amitdo
Copy link
Collaborator

amitdo commented Oct 10, 2018

Some distros have old java versions.

Will ScrollView still work with or without that jar?

@zdenop
Copy link
Contributor

zdenop commented Oct 10, 2018

I tested it with java-1_8_0-openjdk and it worked for me.

@amitdo
Copy link
Collaborator

amitdo commented Oct 10, 2018

@zdenop
Copy link
Contributor

zdenop commented Oct 10, 2018

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants