Coder Social home page Coder Social logo

Comments (13)

rubo77 avatar rubo77 commented on May 21, 2024

I tried downloading the latest Java SE Development Kit 17.0.1 from https://www.oracle.com/java/technologies/downloads/ and installing via

sudo apt install libc6-x32
sudo dpkg -i jdk-17_linux-x64_bin.deb

starting with java 17 gives the same error:

$ java17 ./start.jar 
Error: Could not find or load main class ..start.jar
Caused by: java.lang.ClassNotFoundException: //start/jar

from driftingdroids.

smack42 avatar smack42 commented on May 21, 2024

Please use this command:
java -jar start.jar

By the way, this start.jar is the compiled program "appstart": https://github.com/smack42/appstart

from driftingdroids.

rubo77 avatar rubo77 commented on May 21, 2024

When I try with -jar just nothing happens:

$ java -jar start.jar 
$ _ 

Now I tried

sudo apt-get install advancecomp
./buildjar.sh 

Which runs until this error:

Error: Unable to access jarfile /home/ruben/Programme/proguard6.2/lib/proguard.jar

I tried:

apt install libproguard-java
mkdir -p ~/Programme/proguard6.2/lib/
cp /usr/share/java/proguard.jar ~/Programme/proguard6.2/lib/

which gives me now:

$ ./buildjar.sh 
ProGuard, version 6.2.0
Reading input...
Reading program directory [/var/www/DriftingDroids/bin]
java.io.IOException: Can't read [/var/www/DriftingDroids/bin] (No such file or directory: bin)
        at proguard.InputReader.readInput(InputReader.java:219)
        at proguard.InputReader.readInput(InputReader.java:189)
        at proguard.InputReader.readInput(InputReader.java:167)
        at proguard.InputReader.execute(InputReader.java:95)
        at proguard.ProGuard.readInput(ProGuard.java:266)
        at proguard.ProGuard.execute(ProGuard.java:97)
        at proguard.ProGuard.main(ProGuard.java:591)
Caused by: java.io.IOException: No such file or directory: bin
        at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:50)
        at proguard.InputReader.readInput(InputReader.java:215)
        ... 6 more
unzip:  cannot find or open lib/driftingdroids.jar, lib/driftingdroids.jar.zip or lib/driftingdroids.jar.ZIP.
Failed stat file * [at void add_single(zip&, const string&, const string&, bool, bool, shrink_t):rezip.cc:358]
./buildjar.sh: Zeile 26: zipmerge: Befehl nicht gefunden
chmod: Zugriff auf 'lib/driftingdroids.jar' nicht möglich: Datei oder Verzeichnis nicht gefunden

I guess, I have to compilerun.sh first, but this gives also just an error:

$ ./compilerun.sh 
compile...
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
src/driftingdroids/ui/SwingGUI.java:151: error: diamond operator is not supported in -source 6
    private final JComboBox<String> jcomboRobots = new JComboBox<>();
                                                                 ^
  (use -source 7 or higher to enable diamond operator)
src/driftingdroids/model/Board.java:289: error: diamond operator is not supported in -source 6
        final List<Goal> result = new ArrayList<>(QUADRANTS[quadrant].goals);
                                                ^
  (use -source 7 or higher to enable diamond operator)
2 errors
4 warnings

run...
Error: Could not find or load main class driftingdroids.ui.Starter
Caused by: java.lang.ClassNotFoundException: driftingdroids.ui.Starter

from driftingdroids.

rubo77 avatar rubo77 commented on May 21, 2024

strange, that, if I edit SwingGUI.java, I still get the same error, as if it was still the old file somehow cached or so ;?

from driftingdroids.

rubo77 avatar rubo77 commented on May 21, 2024
$ java -Dappstart.verbose=true -jar start.jar
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: using java in /usr/lib/jvm/java-11-openjdk-amd64/bin
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: appstart dir: /var/www/DriftingDroids
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: launched from start.jar
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: look for application specific config file: start.properties
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: libs dir: /var/www/DriftingDroids/lib
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: classpath = /var/www/DriftingDroids:/var/www/DriftingDroids/lib/designgridlayout-1.11.jar:/var/www/DriftingDroids/lib/flatlaf-0.45-sources.jar:/var/www/DriftingDroids/lib/designgridlayout-1.11-sources.jar:/var/www/DriftingDroids/lib/flatlaf-0.45.jar:
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: vmoptions = -Xmx800M
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: main class = driftingdroids.ui.Starter
Dez. 12, 2021 3:01:55 NACHM. org.appstart.Starter main
INFORMATION: command line:
[/usr/lib/jvm/java-11-openjdk-amd64/bin/java, -Xmx800M, -Dapp.vm.options=-Xmx800M, -Dapp.main.class=driftingdroids.ui.Starter, -Dswing.defaultlaf=com.formdev.flatlaf.FlatIntelliJLaf, -cp, /var/www/DriftingDroids:/var/www/DriftingDroids/lib/designgridlayout-1.11.jar:/var/www/DriftingDroids/lib/flatlaf-0.45-sources.jar:/var/www/DriftingDroids/lib/designgridlayout-1.11-sources.jar:/var/www/DriftingDroids/lib/flatlaf-0.45.jar:, driftingdroids.ui.Starter]

from driftingdroids.

smack42 avatar smack42 commented on May 21, 2024

Yes, since release 1.3.9 the program requires Java 8 to build and Java 8+ to run.
https://github.com/smack42/DriftingDroids/releases/tag/1.3.9

I never use this script compilerun.sh myself. I build and run the program in Eclipse and only use buildjar.sh when I build a release package.

from driftingdroids.

smack42 avatar smack42 commented on May 21, 2024

I have now fixed and simplified the build script (ProGuard and advzip are not used anymore) and also updated README-developer.txt

from driftingdroids.

rubo77 avatar rubo77 commented on May 21, 2024

java-11-openjdk is Not Java 8+ ?

from driftingdroids.

smack42 avatar smack42 commented on May 21, 2024

Yes, java-11-openjdk is Java 8+

Appstart and DriftingDroids work fine with Java 8 and 11 on my Linux system.
I tested them some time ago on Windows as well, with Java 8, 11 and 17 (or 16? don't remember)

from driftingdroids.

rubo77 avatar rubo77 commented on May 21, 2024

still the app doesn't start with

java -jar start.jar

but this works:

./compilerun.sh

from driftingdroids.

smack42 avatar smack42 commented on May 21, 2024

Please use these commands:

./compilerun.sh   (and then quit DriftingDroids)
./buildrelease.sh
cd DriftingDroids_release
java -jar start.jar

from driftingdroids.

rubo77 avatar rubo77 commented on May 21, 2024

This works.

Maybe since *.jar is in .gitignore, the start.jar in the root folder of the repository is not updated?

I tried cp the new start.jar into the root folder, but from there it still doesn't start.

I added a description how to start in #28

from driftingdroids.

smack42 avatar smack42 commented on May 21, 2024

start.jar just needs appstart.properties in the same folder and the program components (jar files) in sub-folder lib.

IMO we don't need more documentation on how to launch the program.

Users download a release package from https://github.com/smack42/DriftingDroids/releases, then they unzip it, have a look at README.txt and find that they just need to doubleclick on start.jar. If they are really curious they can find more information in the user documentation.

Developers probably clone the entire Git repository and may have a look at README-developer.txt to get some initial information.

from driftingdroids.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.