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

Add installation instructions to the README #23

Closed
fhocutt opened this Issue Jul 25, 2014 · 11 comments

Comments

Projects
None yet
3 participants
@fhocutt
Copy link
Contributor

fhocutt commented Jul 25, 2014

New users will find it easier to get started if there are step-by-step instructions for installation for use/development.

@eldur

This comment has been minimized.

Copy link
Owner

eldur commented Jul 26, 2014

The readme contains actual Examples for reading/writing mediawiki content an links to code examples in test. Also a dependency copy section is provided. Can you give me an example, where are you looking for? What is missing for a java developer?

@eldur

This comment has been minimized.

Copy link
Owner

eldur commented Jul 26, 2014

If you are looking for a getting started with maven try this Maven in 5 Minutes

@eldur eldur added the question label Jul 26, 2014

@fhocutt

This comment has been minimized.

Copy link
Contributor Author

fhocutt commented Aug 5, 2014

#26 addresses this.

@eldur

This comment has been minimized.

Copy link
Owner

eldur commented Aug 5, 2014

#26 is merged

@eldur eldur closed this Aug 5, 2014

@fhocutt

This comment has been minimized.

Copy link
Contributor Author

fhocutt commented Aug 13, 2014

Today I've been trying to get a project containing the sample code and the given snapshot dependency to compile and run, and while it finally compiles, I now find it throws a runtime exception with java.lang.NoClassDefFoundError. There might be something wrong with the classpath although it is very unclear from online resources and the people I talked to.

My very basic sample code is here: https://github.com/fhocutt/jwbf-test/tree/master .

Once I get this running, I plan to improve the README and include step-by-step descriptions of how to get the sample code to run in the higher-level developerDoc that I'm writing.

Does it make more sense to reopen this or file another bug? I'm relatively new to Java but not to programming, and if I'm having this much trouble getting even a very simple bot to run using the instructions in the README, someone who's less experienced would have an even harder time.

@eldur

This comment has been minimized.

Copy link
Owner

eldur commented Aug 13, 2014

For me everything is fine ... I tried

$ git clone https://github.com/fhocutt/jwbf-test && mvn clean test

and your mainclass works without a NoClassDefFoundError.

@lorinczz

This comment has been minimized.

Copy link

lorinczz commented Aug 13, 2014

Do the versions of the system libraries match at compile and runtime? In Eclipse 1.5 is the default.

@fhocutt

This comment has been minimized.

Copy link
Contributor Author

fhocutt commented Aug 13, 2014

They do. Java version info:

$ java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)```

Maven version info:

$ mvn --version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.16.0-031600rc2-generic", arch: "amd64",
family: "unix"



On Wed, Aug 13, 2014 at 7:01 AM, lorinczz <notifications@github.com> wrote:

> Do the versions of the system libraries match at compile and runtime? In
> Eclipse 1.5 is the default.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/eldur/jwbf/issues/23#issuecomment-52051624>.
>
@eldur

This comment has been minimized.

Copy link
Owner

eldur commented Aug 13, 2014

I prefer the latest version from oracles hostspot ... I'm not sure if there are some problems with OpenJDK on ubuntu64 (or other OSs)

The following combinations are tested:

  • windows32/64 + oracle java
  • centos64 + oracle java
  • ubuntu32/64 + oracle java
@fhocutt

This comment has been minimized.

Copy link
Contributor Author

fhocutt commented Aug 14, 2014

More information on what I tried is in this gist: https://gist.github.com/fhocutt/0221c1a35265ce7cda33

@eldur eldur reopened this Aug 14, 2014

@eldur

This comment has been minimized.

Copy link
Owner

eldur commented Aug 14, 2014

try if my pull request will work (this is more java/maven releated, and has nothing with this lib 😉).

mvn clean test

has the following output

Running opw.jwbf.app.JavaBotTest
Hello JWBF!
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
HITCHHIKER'S GUIDE TO THE GALAXY FANS
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.543 sec

(If you are not interested in a logging system you can ignore the warnings from SLF)

But it depends on your target application how to package and execute it.

A simple use case could be a "jar with dependecies", so you can run your java application like

$ java -jar yourTool.jar

and do not have create the CP manually. Is this interesting for you?

(btw: IDEs like eclipse/intellij/... have maven integrations out of the box, so you can run main classes easier )
(btw: the exec-plugin in build section can be used to call build related external tools)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.