When attempting the tutorial tool install the tool loads into the system and does not import into the vtl template. Does anyone know if there are any steps missing from the documentation?
https://docs.nomagic.com/pages/viewpage.action?mobileBypass=true&spaceKey=MD190&title=Installing+custom+tool
https://docs.nomagic.com/pages/viewpage.action?mobileBypass=true&spaceKey=MD190&title=Importing+custom+tool+to+template
I verified that the file pulled into the jar was a .class file with the corresponding package, and the import matches the documentation.
Related
I am trying to run a mp4 video in Java using Processing.
I'm trying to use Intellij IDEA, but when I try to import processing.video.* it doesn't find the video library.
Where can I find and how can I import this library?
You need to do two things:
Find the .jar files (and any other files) required by the library.
Add those files to your classpath.
You can find the library files in your Processing directory. For me mine are in C:\Users\kevin\Documents\Processing\libraries\video\library, but it's going to depend on your OS and where you installed Processing.
You can also build the library yourself from this GitHub repo.
Now that you have those files, you can add them to your classpath. Since you're using Intellij, the links in Slaw's comment should get you pretty far:
Correct way to add external jars (lib/*.jar) to an IntelliJ IDEA project
Working with libraries - Intellij
I have the following line of code in a .groovy file for testing:
GenerateShipConfirmsForBatch gscb = new GenerateShipConfirmsForBatch();
Ctrl-clicking on the GenerateShipConfirmsForBatch takes me to GenerateShipConfirmsForBatch.class in a .jar, and not the .java file, even though I have the class correctly imported at the top. I want it to reference the .java file so it will pick up changes I make to the .java file.
Any help would be greatly appreciated!
First guess - Wrong import
What you wrote seems to me like you have class with the same name in 2 different packages or in imported project instead of in open-able java class. When you import class be careful that you import the one you want to use.
Eg. annotation class Service is wildly used in different packages.
import org.springframework.stereotype.Service;
import com.google.web.bindery.requestfactory.shared.Service;
Just check that you are using the correct import.
Second guess - Incorrectly set modules
If you are having the multi-module application you have to set correctly the parent project to properly address this issue as well as child projects where the links should be as well.
In Maven it is done using pom.xml. It is very nicely addressed in Maven - Guide to Working with Multiple Modules.
In Gradle it is done using build.gradle. You can read more about it Gradle Multi-Module Project Setup.
Basics about classes
Local class
Idea is linking local .java files in preference instead of .class therefore if this is happening I'd recommend reinstalling Idea as I cannot find the correct approach.
Linked class (from external library)
If you have imported external library it WILL link to .class as it is decompiled from .jar file.
What you can do is either download .jar with source codes, if you are using Maven Projects click on Download Sources and/or Documentation.
Just because you have the class imported at the top does not mean that you can view the source code (e.g., .java file). If this class is coming from a dependency defined in your pom.xml or build.gradle file then you likely won't have access to view the source code. However, if this is a separate module you have at the top level of your project, then you'll be able to view the .java file. If this library is open source then I'd suggest cloning it in your project and adding it as a module. That will solve your problem.
You can install Java Decompiler IntelliJ Plugin from here: https://plugins.jetbrains.com/plugin/7100-java-decompiler-intellij-plugin
It allows you to display all the Java sources during your debugging process, even if you do not have them all
I'm trying to run the NWaling.java file found here. the code present at the link that I mentioned makes use of the jaligner library. I have downloaded this Java package from here. inside the zip folder there is a JAR file. I'm developing the code using eclipse. whenever I add this JAR file to the code there are some classes missing for example:
import jaligner.NeedlemanWunschGotoh;
&
import jaligner.matrix.MatrixGenerator;
also in the entire zipped folder there isn't any pom.xml file to allow me to import the entire folder as a maven project to eclipse. can somenone suggest me how to import this jaligner library and use it in eclipse? thanks.
You can download a community implementation of the jaligner algorithm from here.
Take a look at this project sources where you may perhaps find all the searched artifacts.
The full Eclipse project with the NWalign.java can be found here including .classpath file with all dependencies listed there.
This is a very basic question, but I can't seem to find an answer. I've just installed BaseX (V.7.8.1 on Win7 PRO/64- bit) and have it running successfully through their GUI. I am now trying to run queries locally via their JAVA examples (from GitHub - specifically their RunQueries.java example). I've created a test project in Eclipse and placed the RunQueries.java code there to try to run it. But, the BaseX imports are not being resolved :
import org.basex.core.*;
import org.basex.core.cmd.*;
import org.basex.data.*;
import org.basex.io.serial.*;
import org.basex.query.*;
import org.basex.query.iter.*;
import org.basex.query.value.item.*;
Should the general install of BaseX put these packages in the correct place? If not, what do I need to do to find & get these package components properly into my directory structure? Appreciate any help.
You need to add the BaseX.jar file as an external JAR to your Eclipse project. You can do this by right-clicking on your project in Package Explorer, then Build Path > Add External Archives. I am assuming you also run their GUI from this JAR file, so you should have it. If not, you can download it here.
If you are also interested in the internal workings of BaseX; you can actually download their source from GitHub.
I'm trying to upload a file via FTP client using Java, but when trying the:
import org.apache.commons.net.PrintCommandListener;
the PrintCommandListener is show in red. I verified my library and it does include commons.net. What should I do?
PrintCommandListener is in fact in Apache Commons Net. For example, if you download the current version, the jar you need to include in your build path is commons-net-3.3.jar. If this single jar is seen by your compiler, then the class should be recognized. Make sure there are no other classes called PrintCommandListener (for example custom ones that you might have written) in your build path.
If using an IDE (such as eclipse) make sure the jar is on your build path. For example, with Eclipse right click project, go to Java Build Path and click Add JARs. Navigate to the location of your jar file and add it.