I am unable to link java classes when using the rascal shell interpreter. This the error message that I receive:
unexpected error: Cannot link method org.my.MyClass because: class not found
Using Eclipse's rascal shell works. Tried with both stable (0.8.0.201510190912) and unstable (0.8.0.201606061752) versions
I assume you are running the release jar using java -jar rascal-<version>.jar, then the only safe way I know how is to pack your Rascal sources and the necessary class files into the jar with the rest of Rascal. You might also try and extend the java classpath with the -cp option to java.
Related
We have a custom Skylark rule that invokes jar after using the Thrift compiler to generate .java files, modeled after genproto.bzl.
What is the recommended way to invoke an external jar command in a hermetic way? Should we use new_http_archive to pull in the JDK archive (and how would this work with the DMG Oracle provides for OSX) with something like jdk.BUILD?
You have #local_jdk//:jar that expose the jar binary coming from the jdk used by Bazel.
I have a groovy/grails jar file. I want to decompile it into groovy files. Is there any tool to do that. I have tried some online decopilers , they all decmpile the files into java not groovy. I have created the jar using gradle jar command. I'm using grails version 3.1.11 and groovy version: 2.4.7 and gradle verion: 2.13
You can use any Java decompiler, but you will not get Groovy code back, as no such tool exists (to my knowledge)
This is one of the weaknesses of non-Java JVM languages. Groovy does a lot of reflection and other such trickery in creating its bytecode, so if you decompile the .class file, you'll have a lot of noise. This is similarly reflected in Groovy stacktraces. You have to train yourself to find the signal despite all of the noise. The good news is that both Eclipse and IntelliJ can debug Groovy code nicely, so you can step through to find the issue you're dealing with.
I am trying to run the neo4j java unmanaged server extension example given below
https://github.com/neo4j-contrib/developer-resources/tree/gh-pages/language-guides/java/server-extension
i followed the readme and executed "mvn compile exec:java"..
but it looks like it is for JDBC driver.
my question is: How do i run the example server extension...?
./Zahoor
You need to compile the jar file using mvn package and drop the jar into your server's plugins folder. In conf/neo4j-server.conf set the following option:
org.neo4j.server.thirdparty_jaxrs_classes=example.extension.movies=/<mybaseurlpath>
To run the sample application of DynaForm (a dynamic web form generator) I followed the readme instruction:
DynaForm - a dynamic web form genrator
To run the sample application use your command line and type "ant".
Then open localhost:2000/ on your browser.
The build script requires ANT and JDK (at least Java 1.6) to be in the path.
The DynaForm's project site is hostet at:
http://code.google.com/p/xsd-web-forms/
Rein Raudjärv
May 23 2010
In my Mac I have ANT and JDK (with Java 1.6). When launch in my command line "ant" I have this error:
BUILD FAILED
/Users/colet/Desktop/dynaform/build.xml:64: /Users/colet/Desktop/dynaform/${env.ANT_HOME}/lib does not exist.
Maybe I misunderstood the sentence:
The build script requires ANT and JDK (at least Java 1.6) to be in the path.
what does "to be in the path" mean?
Thanks!
Please clone the DynaForm project from GitHub instead of Google Code:
https://github.com/reinra/dynaform
The newer version builds via Maven instead of Ant, so it's simpler and should work better.
Check that you have defined ANT_HOME environment variable correctly. Refer to Ant installation instructions, if needed.
I'm having problems building my project, using an Ant script, from the command prompt using Ant itself. It can't find a certain import for a particular Java file in my project (which has nearly 5,000 source files as it is). The import is included in a .jar package whose location I have set in the Ant file itself. (As a pathelement, along with other needed JARs that either are fine, or haven't tried to been used when the crash occurs). The crash happens with javac, with the simple message of "import etc.ect.* cannot be found at line etc" Oddly enough, I can build the project just fine from the Ant file using an IDE like Eclipse. Any ideas what could be wrong? Thanks!
Wow, the solution was completely unrelated. It was a dumb fault in the java code where the class was trying to import .* from a directory that only had folders in it. For some reason, Eclipse didn't seem to mind, but javac did!
Eclipse's root classloader contains a lot of classes, when you run ant from console there's much less.
Just tell javac task to use the required .jar, and you'll be fine.
You should post the stack trace, does it say "import required by ..."? ( I forget the exact text). Likely there's a jar that's available in your eclipse environment that is not included in your ant script. Look in the stack trace for the missing class to identify the jar that's not being included in your build.