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

Doesn't Open! #37

Closed
drewarteaga opened this issue Sep 14, 2018 · 4 comments · Fixed by #38
Closed

Doesn't Open! #37

drewarteaga opened this issue Sep 14, 2018 · 4 comments · Fixed by #38
Assignees
Labels
bug high priority Something that needs to be fixed urgently

Comments

@drewarteaga
Copy link

Describe the bug:

When I tried to run the file, it didn't work because there was a NoClassDefFoundError

To Reproduce:

  1. Download CItyManagement v0.8.1
  2. Run java -jar CityManagement-0.8.1.jar

Expected behavior:

The game should have started

Screenshots:

screen shot 2018-09-14 at 5 01 11 pm

Desktop (please complete the following information):

  • OS: macOS 10.13.1
  • Version: 0.8.1
  • Java vendor: Oracle
  • Java version: 1.8.0_161-b12

Stack trace:

Exception in thread "main" java.lang.NoClassDefFoundError: com/gauck/sam/Utilities/Utilities
	at com.samgauck.CityManagement.Economy.<init>(Economy.java:14)
	at com.samgauck.CityManagement.Economy.getInstance(Economy.java:29)
	at com.samgauck.CityManagement.Command.<init>(Command.java:23)
	at com.samgauck.CityManagement.Command.getInstance(Command.java:46)
	at com.samgauck.CityManagement.Main.<clinit>(Main.java:44)
Caused by: java.lang.ClassNotFoundException: com.gauck.sam.Utilities.Utilities
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 5 more

Additional context:

It happened as soon as I tried to start it.

@Samasaur1
Copy link
Owner

Working on it

@Samasaur1 Samasaur1 added bug high priority Something that needs to be fixed urgently labels Sep 14, 2018
@Samasaur1 Samasaur1 self-assigned this Sep 14, 2018
@Samasaur1
Copy link
Owner

This bug exists since 0.8.0, which is the first version when Utilities was external

@Samasaur1
Copy link
Owner

Samasaur1 commented Sep 14, 2018

Utilities is not included in the JAR file, and so is not included in the class path.

Running:

java -cp path/to/CityManagement-0.8.1.jar:path/to/Utilities-1.4.0.jar com.samgauck.CityManagement.Main

will work

@Samasaur1
Copy link
Owner

If the application plugin is applied, then gradle assembleDist is run, a zip file and a tar.gz file are created
CityManagement-0.8.1.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug high priority Something that needs to be fixed urgently
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants