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

jar does not launch #12

Closed
all-the-good-ones-are-gone opened this issue Jul 27, 2018 · 8 comments
Closed

jar does not launch #12

all-the-good-ones-are-gone opened this issue Jul 27, 2018 · 8 comments

Comments

@all-the-good-ones-are-gone

Downloaded the jar, as not running Debian based (openSUSE Tumbleweed)

java -jar tokentool-2.0.jar run
Error: Could not find or load main class net.rptools.tokentool.client.TokenTool

Is Oracle required? Currently using java-1_8_0-openjdk. Should I upgrade to OpenJDK 10 or 11?

@Azhrei
Copy link
Member

Azhrei commented Jul 28, 2018

It works for me on macOS High Sierra running Java 9:

$ java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
$

Since the JAR is just a zip file, try unzipping it and piping it into grep looking for the class:

$ jar -tvf tokentool-2.0.jar

When I do that, one of the first files printed out is TokenTool.class and that's the one that the error is referring to.

Offhand, I'd say there's something weird with your Java installation.

@Phergus
Copy link
Contributor

Phergus commented Jul 28, 2018

Or TokenTool 2.0 requires Java 9+.

Probably should go ahead and move to 10 or 11 and try again.

@Azhrei
Copy link
Member

Azhrei commented Jul 28, 2018

The MANIFEST.MF says this:

Manifest-Version: 1.0
Implementation-Title: tokentool
Target-Compatibility: 1.8
JavaFX-Preloader-Class: net.rptools.tokentool.client.SplashScreenLoade
 r
Implementation-Version: 2.0
Built-By: appveyor
Built-Date: Mon Mar 19 15:47:05 PDT 2018
Source-Compatibility: 1.8
Built-JDK: 1.8.0_162
Implementation-Vendor: RPTools
Main-Class: net.rptools.tokentool.client.TokenTool

So it looks like Java 8 should work, but it would need the JavaFX libraries; he may not have those. But if that were the case, I would expect the error to be that the JFX classes can't be found, not TokenTool. Although it does say, "Cannot find or load", so perhaps it's the JFX dependencies on TokenTool that are causing the problem.

We'll see what he says about his environment and whether he can try Java 9.

@Phergus
Copy link
Contributor

Phergus commented Jul 28, 2018

That's probably it. Perhaps there is a separate install for the JavaFX libs and OpenJDK?

@all-the-good-ones-are-gone
Copy link
Author

@all-the-good-ones-are-gone
Copy link
Author

Replaced the java version:

> java -version
openjdk version "11-internal" 2018-09-25
OpenJDK Runtime Environment (build 11-internal+20-suse-1.1-x8664)
OpenJDK 64-Bit Server VM (build 11-internal+20-suse-1.1-x8664, mixed mode)

Also checked the jar, and find net/rptools/tokentool/client/TokenTool.class (as well as TokenTool$1.class and TokenTool$2.class).

After upgrading, I'm now getting the following:

> java -jar tokentool-2.0.jar 
Error: Could not find or load main class net.rptools.tokentool.client.TokenTool
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

So it sounds like javafx is not installed. However, I'm not finding anything called javafx or javaFX or JavaFX. Is it part of another package?

@Azhrei
Copy link
Member

Azhrei commented Jul 28, 2018

You’ve probably figured this out by now, but Google says OpenJFX is a sub project of OpenJDK. Where to find it for openSUSE is unknown to me; you’ll need to ask Google yourself, probably including some additional information about your setup.

I’m certainly glad that the error message is more clear when using an updated version of the OpenJDK!

@all-the-good-ones-are-gone
Copy link
Author

Yeah, I popped on my server and found openjfx in the Debian repos, but it appears that there was a change two years ago to do with a licensing conflict so it's not packaged in the openSUSE repos.

I can either build it myself (but I have no interest getting ant and friends set up again on my machine), maybe find an unofficial repo that has it, or else install Oracle Java.

Thanks All.

JamzTheMan added a commit that referenced this issue Mar 29, 2019
* #7: Add PDF Extraction 

Initial check-in of PDF Extraction code, working beta 1!

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

Adjustments for better window resizing.

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

Updated travis.

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* Cleanup

 * Ignore eclipse .settings
 * Updated PDFBox libs
 * Updated Gradle Wrapper to 4.7

Task-Url: JamzTheMan/MapTool#37

Signed-off-by: Jamz <Jamz@Nerps.net>

* PDF Enhancements

 * Removed ImageGallery fxml/controller - unneeded complexity
 * Added PDF Window i18n title
 * Changed sentry.io logging to ERROR
 * Added caching of main PDF image render
 * Fixed auto resizing of main PDF image
 * Added drag/drop from PDF extract buttons

Signed-off-by: Jamz <Jamz@Nerps.net>

* #9: Pog filenames substitute %20 for spaces

	* Properly decode file names for saving to file
	* minor cleanup on other files

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/9

Signed-off-by: Jamz <Jamz@Nerps.net>

* #10: Add arrow key nudges

 * Added 1 pixel nudge on arrow keys

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/10

Signed-off-by: Jamz <Jamz@Nerps.net>

* #13: Allow user supplied image for background - WIP

	* Added button to supply background image
	* updated token preview clipping to use background image

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/13

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

	* Updated Travis CI to install latest java via brew
	* Updated config to use environment variables from Travis config.
Should be generic now for upstream repo

Task-Url: JamzTheMan#12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

	* Updated Travis CI to install latest java via brew
	* Updated config to use environment variables from Travis config.
Should be generic now for upstream repo
	* Updated Appveyor config
	* WIP - working on errors in travis...

Task-Url: JamzTheMan#12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

 * Removed DLL from Inno Setup template
 * Add TokenTool.iss to .gitignore as this is built for every deploy
 * Moved Vendor to gradle.properties so it's static for the repo

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

 * Version now grabbed from Tag. If no tag, version = SNAPSHOT+Commit

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

 * Added missing platform x64 config for appveyor...

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

	* Changed gradle deploy to run only 'before_deploy' (was always
running)

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* Update .appveyor.yml

* #8: Bug in pdf-extract-feature branch

 * Can now drop PDF files to open them
 * ImageIO lib updated, no longer throws error

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/8

Signed-off-by: Jamz <Jamz@Nerps.net>

* #14: Add a keyboard shortcut to take a screen capture.

 * Added shortcut to Capture Screen menu option per request
 * Updated and added other shortcuts to menu options

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/14

Signed-off-by: Jamz <Jamz@Nerps.net>

* Layer support WIP

* #13: Allow user supplied image for background

 * Added drag and drop areas to denote if image is portrait or
background
 * Added layer selection menu button to drive scroll/rotate events WIP
 * Changed Preference saving to handle ImageView's a little easier
 * Added system.exit to kill any lingering threads from PDF extractions
 * Updated Paste/Screen Capture/PDF Extract to put image on currently
selected layer
 * All child windows now remember position and size
 * Swipe touch event should move 1 page at a time now
 * New menu option to Reset Settings to factory defaults

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/13

Signed-off-by: Jamz <Jamz@Nerps.net>

* Logging and Build changes

 * Sentry now logs OS
 * Sentry now configures as Development on non tagged commits.
 * Sentry bumped to 1.7.5
 * gradle.properties now hole vendor and sentry DSN for more flexibility
 * Adding a tag now configures Sentry to Production mode, sets Release
version and kicks off Deployment in CI

Signed-off-by: Jamz <Jamz@Nerps.net>

* #13: Allow user supplied image for background

 * Help -> Reset menu now has confirmation/cancel dialog
 * FXML/UI tweaked to better handle ImageViews to remain centered on
stage resize (background and portrait) and refactored code to simpler
binding

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/13

Signed-off-by: Jamz <Jamz@Nerps.net>

* #13: Allow user supplied image for background

 * Right click on pdf extract sets background vs portrait
 * Sentry.io only logs in Production mode now
 * WIP: Portrait naming

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/13

Signed-off-by: Jamz <Jamz@Nerps.net>

* #17: Imported PNG overlays coming in at 100x100

 * Fixed png thumbs being imported at default thumb size of 100

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/17

Signed-off-by: Jamz <Jamz@Nerps.net>

* #19: Add ESC key to cancel Screen Capture

 * Added esc key event capture
 * Added highlighting to drag icons

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/19

Signed-off-by: Jamz <Jamz@Nerps.net>

* #13: Allow user supplied image for background

	* Final tweaks on new save options, can now save portrait with
backgound options on drag and drop along with normal token image

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/13

Signed-off-by: Jamz <Jamz@Nerps.net>

* New Overlays

 * A few new overlays added
 * AppSetup will only install new overlays since last version installed
 * TODO: i18n properties still need to be updated...

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/13

Signed-off-by: Jamz <Jamz@Nerps.net>

* Misc

 * Added some card type overlay bases
 * Added label under overlay name above overlay tree to dispaly native
overlay dimensions, eg 512 x 512
 * Updated i18n files with new externalized strings

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/13

Signed-off-by: Jamz <Jamz@Nerps.net>

* Misc

 * i18n'd Layer Menu button

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

 * Fixed bug with brew per
Homebrew/homebrew-cask#49716

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

 * PDF image extraction now on it's own service thread
 * Added progress indicator for long image extractions

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #7: Add PDF Extraction

 * Spotless...
 * Tagged!

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/7

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

 * getting the appveyor key to work?

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

 * Another try at env vars

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* #12: Update CI config and install to Java 10

 * YAT

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* Still testing AppVeyor...

* YAT WTF

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>

* 12: Update CI config and install to Java 10

Task-Url: http://github.com/JamzTheMan/TokenTool/issues/12

Signed-off-by: Jamz <Jamz@Nerps.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants