Comments (7)
@swegs I have fixed the bug, please try with release 1.1.1.
I guess it's because the entry class org.eugene.App extends other class which is described here:
https://stackoverflow.com/a/38133937/3378204
I got this error using Maven, and I discovered the solution.
Error: Could not find or load main class com.mycompany.testapifactory.Main
I'm using java JDK version 1.7 on Linux, my
pom.xml
file was the default generated by Netbeans and I was using these commands to compile, which do work fine with a normal hello-world java application:mvn clean compile java -jar target/TestAPIFactory-1.0-SNAPSHOT.jar com.mycompany.testapifactory.Main
What happened:
It turns out my problem was that my Main method was extending something Exotic like this:
public class Main extends SomeExoticLibraryClass{ public static void main(String[] args){ //... } }
It was this extending of the main class that caused the above error.
TLDR solution:
Make sure your main class isn't extending any 3rd party classes. Refactor those out and away into their own classes. That error message is awful, and requires process of elimination to find out what to do.
from bigdata-file-viewer.
Tried your new version and now I'm getting
Computer:Downloads $ java -jar BigdataFileViewer-1.1.1-SNAPSHOT-jar-with-dependencies.jar Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at org.eugene.App.main(App.java:13) Caused by: java.lang.ClassNotFoundException: javafx.application.Application at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 10 more
from bigdata-file-viewer.
@swegs Thanks for your comment. At least we saw the progress we made, the main entry is not invisible now.
And for your current issue, the javaFX library is missed on your environment as mentioned in README.txt.
Make sure the Java has javafx bound. For example, I installed openjdk 1.8 on Ubuntu 18.04 and it has no javafx bound, I installed it following guide here [https://stackoverflow.com/questions/56166267/how-do-i-get-java-fx-running-with-openjdk-8-on-ubuntu-18-04-2-lts/56166582#56166582].
The javaFX library is not always in the java package and it depends version by version.
I'm afraid you need to install the javaFX library and put it to your local system.
from bigdata-file-viewer.
@swegs There is a similar thread https://stackoverflow.com/questions/58426650/how-to-create-javafx-programs-in-jdk-13.
The javafx library is removed in java11 and I guess the higher version java13 also doesn't have javafx bound.
I suggest you to install javafx library to your MAC or just installed multiple java on your machine. You can switch java version by setting the environment variable on your local machine.
from bigdata-file-viewer.
Thanks for the help.
from bigdata-file-viewer.
Thought I'd follow up on this a little bit with instructions I used to resolve my issue.
- Downloaded and unziped the JavaFX SDK (I went with version 11.0.2) from here
- Ran
export PATH_TO_FX=path/to/javafx-sdk-11.0.2/lib
- Finally ran
java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml -jar BigdataFileViewer-1.2.1-SNAPSHOT-jar-with-dependencies.jar
from bigdata-file-viewer.
@swegs Good summary, thanks for this follow up. These instructions might help others who run into same situation.
from bigdata-file-viewer.
Related Issues (20)
- Application does not start HOT 1
- Exception in thread "main" HOT 1
- Instead hardcoded "\\" HOT 2
- CSV delimiter. HOT 2
- The file is loaded into database redundantly HOT 1
- The column with String type's aggregation value is also calculated. HOT 1
- The NULL is returned as the max value. HOT 1
- Add pagination, do not load everything into memory HOT 2
- illegal character in column name HOT 3
- Some Types not implemented HOT 1
- Facing this exception Exception Can't redefine: _REDACTED HOT 4
- java.lang.NoClassDefFoundError: javafx/application/Application HOT 2
- How to view aggregates/charts? HOT 4
- Request custom schema-metadata HOT 2
- Error while loading Parquet local file HOT 1
- JavaFX Problem running on macOS Monterey with OpenJDK HOT 5
- WINDOWS EXCEPTION Error: A JNI error has occurred, please check your installation and try again HOT 1
- Releases are unusable HOT 4
- How to filter and export? HOT 1
- Exception when reading parquet file HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bigdata-file-viewer.