GithubHelp home page GithubHelp logo

Comments (8)

Smarthard avatar Smarthard commented on May 13, 2024 2
1. Have a jdk & maven installed

2. Navigate to the java directory

3. execute `mvn package`

4. Find the jar at `target/*.jar` (probably `target/Anime4K.jar`)

5. Execute the jar (probably `java -jar target/Anime4K.jar`)

You missed step 2 and a half: mvn install. So full steps would be:

  1. Have a JDK 12 & maven installed
  2. Navigate to the java directory
  3. execute mvn install
  4. execute mvn package
  5. Find the jar at target/NextGenAnimeEnhancer-1.0-SNAPSHOT.jar
  6. Execute the jar java -jar NextGenAnimeEnhancer-1.0-SNAPSHOT.jar [File_In] [File_Out] (Scale) (Push_Grad_Strength) (Push_Strength)

P.S. It can be done on Windows as well.

from anime4k.

kellerkindt avatar kellerkindt commented on May 13, 2024 1
  1. Have a jdk & maven installed
  2. Navigate to the java directory
  3. execute mvn package
  4. Find the jar at target/*.jar (probably target/Anime4K.jar)
  5. Execute the jar (probably java -jar target/Anime4K.jar)

from anime4k.

upbit avatar upbit commented on May 13, 2024

I compiled with my macos, it should work under linux too (requires JDK12)
https://drive.google.com/file/d/1I1bTTtNtT2VhpXJMXawAS4ekYOSnRrKC/view?usp=sharing

from anime4k.

AaronFeng753 avatar AaronFeng753 commented on May 13, 2024
  1. Have a jdk & maven installed
  2. Navigate to the java directory
  3. execute mvn package
  4. Find the jar at target/*.jar (probably target/Anime4K.jar)
  5. Execute the jar (probably java -jar target/Anime4K.jar)

Hey, do you have a compiled jar for windows?? I tried to compile one, but there are a lot of exceptions.

from anime4k.

kellerkindt avatar kellerkindt commented on May 13, 2024
  1. Have a jdk & maven installed
  2. Navigate to the java directory
  3. execute mvn package
  4. Find the jar at target/*.jar (probably target/Anime4K.jar)
  5. Execute the jar (probably java -jar target/Anime4K.jar)

Hey, do you have a compiled jar for windows?? I tried to compile one, but there are a lot of exceptions.

Nope, I also compiled it on Linux

from anime4k.

ddouglas87 avatar ddouglas87 commented on May 13, 2024

Doesn't seem to be working for me:

git clone https://github.com/bloc97/Anime4K.git
cd ~/Anime4K/java/

bunny@Lovely:~/Anime4K/java$ mvn package
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.mycompany:NextGenAnimeEnhancer:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-jar-plugin @ line 49, column 17
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] -----------------< com.mycompany:NextGenAnimeEnhancer >-----------------
[INFO] Building NextGenAnimeEnhancer 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ NextGenAnimeEnhancer ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/bunny/Anime4K/java/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ NextGenAnimeEnhancer ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/bunny/Anime4K/java/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ NextGenAnimeEnhancer ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/bunny/Anime4K/java/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ NextGenAnimeEnhancer ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ NextGenAnimeEnhancer ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ NextGenAnimeEnhancer ---
[INFO] Building jar: /home/bunny/Anime4K/java/target/NextGenAnimeEnhancer-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.784 s
[INFO] Finished at: 2019-09-19T20:56:49-07:00
[INFO] ------------------------------------------------------------------------

cd target/
bunny@Lovely:~/Anime4K/java$ ls target/
classes  generated-sources  maven-archiver  maven-status  NextGenAnimeEnhancer-1.0-SNAPSHOT.jar

bunny@Lovely:~/Anime4K/java/target$ java -jar NextGenAnimeEnhancer-1.0-SNAPSHOT.jar 
Exception in thread "main" java.lang.NoClassDefFoundError: com/aparapi/Kernel
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at com.bloc97.anime4k.Main.<clinit>(Main.java:24)
Caused by: java.lang.ClassNotFoundException: com.aparapi.Kernel
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 10 more

I'm on Mint 19.2 (Ubuntu 18.04) using java 12.0.2 2019-07-16 and Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T08:06:16-07:00)

from anime4k.

ddouglas87 avatar ddouglas87 commented on May 13, 2024

Seems to be working, somewhat.

bunny@Lovely:~/Anime4K/java/target$ java -jar NextGenAnimeEnhancer-1.0-SNAPSHOT.jar '/home/bunny/Desktop/test_original.png' '/home/bunny/Desktop/test_a4k.png'4
after clEnqueueNDRangeKernel, globalSize[0] = 1030000, localSize[0] = 256
!!!!!!! clEnqueueNDRangeKernel() failed invalid work group size
Sep 21, 2019 8:29:29 PM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
WARNING: Device failed for ImageKernel, devices={NVIDIA<GPU>|Java Alternative Algorithm|Java Thread Pool}: OpenCL execution seems to have failed (runKernelJNI returned -54)
com.aparapi.internal.exception.AparapiException: OpenCL execution seems to have failed (runKernelJNI returned -54)
	at com.aparapi.internal.kernel.KernelRunner.executeOpenCL(KernelRunner.java:1263)
	at com.aparapi.internal.kernel.KernelRunner.executeInternalInner(KernelRunner.java:1712)
	at com.aparapi.internal.kernel.KernelRunner.executeInternalOuter(KernelRunner.java:1383)
	at com.aparapi.internal.kernel.KernelRunner.execute(KernelRunner.java:1374)
	at com.aparapi.Kernel.execute(Kernel.java:2897)
	at com.aparapi.Kernel.execute(Kernel.java:2854)
	at com.aparapi.Kernel.execute(Kernel.java:2829)
	at com.bloc97.anime4k.ImageKernel.process(ImageKernel.java:71)
	at com.bloc97.anime4k.Main.main(Main.java:60)
Sep 21, 2019 8:29:30 PM com.aparapi.internal.kernel.KernelRunner fallBackToNextDevice
WARNING: Trying next device: Java Alternative Algorithm

I have OpenCL installed and have used it in Waifu2x projects successfully.

from anime4k.

hirios avatar hirios commented on May 13, 2024

Thank you all! <3

from anime4k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.