I have created a google-app-engine Java project in Eclipse using Google's Eclipse plugin. I had tried to deploy my application using terminal as follows:
~$ appcfg.py update /home/crimson/Music/Testing5/InitialData/
But it shows the following error:
appcfg.py: command not found
How to solve this?
If you developed a Java application using Google App Engine, you shouldn't use appcfg.py, that is meant for Python projects. See the documentation of Google App Engine for more details on how to deploy a Java-based project. In a nutshell, you will need appcfg.sh if you are on Linux or Mac OS X, or appcfg.cmd if you are on Windows.
If you are using linux try this following step :
Go to your appengine-sdk/bin
type chmod u+x appcfg.sh
run this command --> sh appcfg.sh rollback [your app war path location]
Related
I am trying to install Spring Boot CLI in Ubuntu. I am new to spring boot and was trying to learn it. I have already installed Gradle and groovy but did not find anything online to install Spring boot CLI.
please follow the code
sudo apt install unzip zip
curl -s https://get.sdkman.io | bash
source "/home/username/.sdkman/bin/sdkman-init.sh"=
sdk install springboot
spring version
The Spring boot CLI install guide link
Spring boot CLI
You can read the docs for installation steps:
Manual installation:
Download the Spring CLI distribution: you can find the latest version link here.
Extract the downloaded zip file to any path of your choice.
Prerequisite: Make sure you have Java JDK v1.8 or above (check INSTALL.txt file from extracted archive in Step-1). You can check your JDK version using command: java --version.
Add the spring CLI script's path to $PATH environment variable:
For example, you can add below lines to your .bashrc file in *nix systems:
export SPRING_HOME=/path/to/your/extracted-spring-cli/spring-2.4.0
export PATH=$SPRING_HOME/bin:$PATH
After saving the .bashrc file, run $ source .bashrc to reload the environment variables you just added.
(optional; and not for Windows user) Shell auto-completion scripts are provided for BASH and ZSH with the extracted archive in Step-1. Add symlinks to the appropriate
location for your environment. For example, something like:
ln -s /path/to/your/extracted-spring-cli/spring-2.4.0/shell-completion/bash/spring /etc/bash_completion.d/spring
ln -s /path/to/your/extracted-spring-cli/spring-2.4.0/shell-completion/zsh/_spring /usr/local/share/zsh/site-functions/_spring
To check if you are using BASH or ZSH, run the command: $ echo $SHELL.
DONE: To test if you have successfully installed the CLI you can run the following command: spring --version.
Here is detailed instruction on how to do it, much more useful than official one, at least for manual installation. One more thing - to make path change permanent you might need to logout - login, as "source /etc/profile" will be effective only for currently opened terminal.
Use this link to get a detailed instruction on how to download the Spring framework successfully, It really helped me a lot after long time of making research.
https://www.decodejava.com/download-and-install-spring-framework.htm
I currently developed an Eclipse application which also has a headless build available to integrate with some other application. We created a .exe for our application. What I need is when the installation of our application is completed the headless build should be register as window service. The headless build is started using a batch file which contains following :
set WORKSPACE=
java -jar plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -pluginCustomization plugin_customization.ini -application myapplication.app.HEADLESSAPP -data %WORKSPACE% -noExit -isHeadLess
When we run this .bat file it starts our application in Non UI mode.
I tried following things so far:
Tried sc.exe command but this didn't work.
Then I converted my .bat file to .exe and then tried sc.exe(give error 1053) and NSSM(executable path always refer to nssm.exe instead of my application).
So basically I need a way to to register this .bat or .exe file as windows service so that it launch my headless application.
UPDATE :
Tried this :
set SERVICE_NAME=TESTSERVICE
set SERVICE_TITLE="TESTSERVICE"
set ECLIPSE_DIR=%~dp0
"%~dp0TESTSERVICE.exe" install %SERVICE_TITLE% --Startup=auto --StartMode=java --StartImage="%ECLIPSE_DIR%eclipsec.exe" --StartPath="%ECLIPSE_DIR%\" ++StartParams="-noSplash -pluginCustomization plugin_customization.ini -application com.eu.ales.hvac.ipm.headless.app.HEADLESSIPMDT -data \"%ECLIPSE_DIR%workspace\" -configuration \"%ECLIPSE_DIR%configuration\"" --LogPath="%ECLIPSE_DIR%\" --LogLevel="Error" --LogPrefix="service"
but getting this
To run a headless Eclipse RCP application as Windows service I use successfully Apache Commons' prunsrv.exe (download here) for several years.
Step-by-step instruction to run Eclipse Infocenter (which is a headless RCP application and contained in all Eclipse IDE packages) as Windows service:
Preconditions:
A Java JRE or JDK is installed
An Eclipse IDE is installed, e. g. eclipse-SDK-4.7-win32-x86_64.zip
Download commons-daemon-1.0.15-bin-windows.zip from http://www.apache.org/dist/commons/daemon/binaries/windows/
Extract prunsrv.exe from root directory of the downloaded ZIP archive into your Eclipse installation directory
In the Eclipse installation directory create the file install_as_service.bat with following content:
set INFOCENTER_PORT=8088
set INFOCENTER_TITLE="Eclipse Infocenter"
for %%i in ("%~dp0") do (set INFOCENTER_DIR=%%~dpi)
set INFOCENTER_DESCRIPTION=Port: %INFOCENTER_PORT%, Location: %INFOCENTER_DIR%
"%~dp0\prunsrv.exe" install %INFOCENTER_TITLE% --Description="%INFOCENTER_DESCRIPTION% " --Startup=auto --StartMode=exe --StartImage="%INFOCENTER_DIR%eclipsec.exe" --StartPath="%INFOCENTER_DIR%\" ++StartParams="-noSplash#-application#org.eclipse.help.base.infocenterApplication#-data#\"%INFOCENTER_DIR%info_center_workspace\"#-configuration#\"%INFOCENTER_DIR%info_center_configuration\"#-vmargs#-Dserver_port=%INFOCENTER_PORT%#-Xms420m#-Xmx420m#-XX:MaxPermSize=256m" --StopMode=exe --StopTimeout=300 --StopImage="%INFOCENTER_DIR%eclipsec.exe" --StopPath="%INFOCENTER_DIR%\" ++StopParams="-noSplash#-application#org.eclipse.help.base.infocenterApplication#-data#\"%INFOCENTER_DIR%info_center_workspace\"#-configuration#\"%INFOCENTER_DIR%info_center_configuration\""#-command#shutdown --LogPath="%INFOCENTER_DIR%\" --LogLevel="Error" --LogPrefix="service"
Double-click install_as_service.bat
Press Windows+R, enter services.msc and click OK
=> The list of services should contain Eclipse Infocenter
Start the service Eclipse Infocenter
In a web browser open http://localhost:8088/help/index.jsp
=> Eclipse Help should be shown in the web browser (similar to https://help.eclipse.org)
To uninstall the service, first stop the service and then run prunsrv.exe delete "Eclipse Infocenter"
is it possible to run an executable jar file (command line based) in android?
one of my friend told me that it is possible to run executables written in C. Is it possible for java too? I will run the tool through adb shell.
Android uses the Dalvik VM, whereas you need the Java VM to run a jar-file. So no, you can't run a jar-file on android.
You can install an app built as an APK through adb:
adb install my_apk_file.apk
And once inside an adb shell, you can launch an APK application using the am command. See How to start an application using android ADB tools?
But I don't think there's a way to directly run a jar file the way you can do so on a desktop operating system, because Android doesn't use the standard Java VM.
I think you would need to embed your .jar file inside a minimal Android application that invokes the jar and prints results to stdout. Then you would build that APK and install/run it as I described above.
is it possible to run an executable jar file (command line based) in
android?
possible, check "adb shell input" shellscript -> "exec app_process"
shell#flo:/ $ ls -l /system/bin/input
-rwxr-xr-x root shell 203 2015-11-10 01:44 input
https://android.googlesource.com/platform/frameworks/base/+/oreo-release/cmds/input/input
# Script to start "input" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/input.jar
exec app_process $base/bin com.android.commands.input.Input "$#"
The only problem with running a jar inside Android is the JVM which under Android is a Dalvik VM which cannot run JSE compiled java programs.
You can however use JBed which runs a whole JSE JVM under Android: http://jbed.en.malavida.com/android/
You cannot directly run jar files in android as android runs on Dalvik Virtual Machine, whereas to run jar files you will need Java Runtime Environment which has Java Virtual Machine.
Note: You will need root access and a file manager with root access:
But you can run it, for that you have to install an application Jbed.apk and copy lib jbed.so to your system\lib folder. Then you can run jar/jad files from the application on your android device.
Here's the link to jbed: http://jbed.en.malavida.com/android/
Read the full post here on XDA Developers:
XDA Developers, Run jar/jad on Android
There are few posts which claims that there are ways to convert jar to apk, I haven't tried it myself:
jar to apk
If it doesn't works you may need to use an emulator:
How to do a clean deployment into app-engine dev server?
I am using google app-engine java and command line tools (ant, ant runserver).
When I submit new request through chrome, I am getting response from my old code.
I am not sure where my old code was cached. Am I missing anything?
Checked following things,
class file timestamp, ~\app1\war\WEB-INF\classes
servlet-mapping
cache setting in jsp,
I am not able to locate, compiled .class file for .jsp
other details,
app-engine java sdk 1.6.3.
JAVA_HOME=C:\glassfish3\jdk7
JRE_HOME=C:\glassfish3\jdk7\jre
chrome (latest)
windows vista
Maybe you are running the application twice via a zombie process? check using netstat -o (in the command line) which process is holding the port and kill it or just reboot.
I want to try the Google Eclipse plug-in for the Google App Engine, but I get stuck in the tutorial...
I want to start the web application from the Google tutorial, but when I click on "RUN AS > Web Application", I only see this message on the console:
Usage: <dev-appserver> [options] <war directory>
Options:
--help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest
-s SERVER SDK version.
--address=ADDRESS The address of the interface on the local machine
-a ADDRESS to bind to (or 0.0.0.0 for all interfaces).
--port=PORT The port number to bind to on the local machine.
-p PORT
--sdk_root=root Overrides where the SDK is located.
--disable_update_check Disable the check for newer SDK versions.
What's the problem? It seems like the command to start the server is wrong, but I haven't edited it... can someone help?
It is because your launch configuration file (location: WORKSPACE/.metadata/.plugins/org.eclipse.debug.core/.launches)is corrupt. All you need to do to solve this problem is to delete the existing launch configuration (in Run > Run configurations)
Check if your Eclipse Project or GAE SDK has spaces in the path.
The problem occurs when using blank spaces in the project name.
"Run Configurations> Arguments > Program Arguments", insert quotation marks in the project path. i.e.:
--port=8888 --disable_update_check {PATH}\My Project
To:
--port=8888 --disable_update_check "{PATH}\My Project"
I found it from this thread
Thanks a lot
Some additional information to what's already been said.
You need to install "m2eclipse" otherwise you will not have the "run as" option.