The library: The error: The fix: Create a new Java file: Create the 2 specified directories as well, c:\temp\mongotemp and c:\temp\mongoartifacts Run the app. In the c:\temp\mongotemp you will see the mongo executable that the system policy was blocking from running e..
Category : java
Example script call: Shell script: Samp..
Download: https://db.apache.org/derby/releases/release-10_15_2_0.cgi create database mylocaldb maven: <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> <version>10.15.2.0</version> </depe..
Without the library, you can get this error: Could not locate the Phidget C library (libphidget22java.so). Make sure it is installed, and add it’ s path to LD_LIBRARY_PATH. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.0.RELEASE.jar!/:5.2.0.RELEASE] ..
#!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin start() { cd /opt/tomcat/current/bin/ /bin/su pi /opt/tomcat/current/bin/startup.sh } stop() { /bin/su pi /opt/tomcat/current/bin/shutdown.sh } case $1 in start|stop) $1;; restart) ..
First make sure we added the admin user: nano /opt/apache-tomcat-9.0.0.M18/conf/tomcat-users.xml Add this at the bottom of the config: <role rolename=”manager-gui”/> <role rolename=”admin”/> <role rolename=”admin-gui”/> <role rolename=”manager-script”/> <role rolename=”manager”/> <user username=”admin” password=”yoursecretpasswordhere” roles=”admin,manager-gui,admin-gui,manager,manager-script,manager-status”/> </tomcat-users> Next, to allow remote login from different IPs… Make sure we’re shut down: /opt/apache-tomcat-9.0.0.M18/bin/shutdown.sh Check processes: ps aux | grep tomcat ..
..
You need to install JDK8 because JDK11 and others won’t work. Otherwise, you’ll get errors like this one: Server VM is only supported on ARMv7+ VFP Install: sudo apt-get install openjdk-8-jre-headless openjdk-8-jdk-headless Verify: root@door:/home/pi/programs/doorswitch# javac -version javac 1.8.0_212 root@door:/home/pi/programs/doorswitch# java -version openjdk version “1.8.0_212” OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01) OpenJDK Client VM (build 25.212-b01, mixed ..
Source: https://github.com/ttww/JavaFrameBuffer The error: pi@pi2 ~/jfb $ javah -d src/main/c -classpath bin org.tw.pi.framebuffer.FrameBuffer Error: Could not find class file for ‘org.tw.pi.framebuffer.FrameBuffer’. The fix: #!/bin/sh jniResult=libFrameBufferJNI.so # Make sure to update these to your correct JDK path jniJdkHeader=/opt/jdk/current/include jniSysHeader=/opt/jdk/current/include/linux rm “$jniResult” echo “here is the correct compile command” javah -d src/main/c -classpath src/main/java org.tw.pi.framebuffer.FrameBuffer # rm ..
# install maven and git sudo apt-get update && sudo apt-get install -y maven git verify install pi@door:~ $ git –version git version 2.20.1 pi@door:~ $ mvn –version Apache Maven 3.6.0 Maven home: /usr/share/maven Java version: 1.8.0_212, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-openjdk-armhf/jre Default locale: en_GB, platform encoding: UTF-8 OS name: “linux”, version: “5.4.79+”, arch: “arm”, ..