B4J Question [solved] How to deploy/run webapp without ide/debugger

DonManfred

Expert
Licensed User
Longtime User
I have seen a few webapps and got them running on local pc from the b4j-ide....
But i want to write the programs to run on an other pc.

How do i deploy the project to run it on a Windows7-PC which will act as a server?

The "server-pc" is not my development pc.

Maybe i missed the info somewhere but actually i dont think i have read about it before.

Can someone give me a short help?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Assuming that #MergeLibraries is set to True then all you need to do is:

1. Copy the jar file and www folder to the server.
2. Run java -jar <yourjar>, or double click on the jar file.

If #MergeLibraries is set to False, which is useful in cases of remote servers then you also need to copy all the dependent libraries to a folder named libs.

If you are running it on Linux then you should use nohup to run the server. Otherwise the process will be killed when you log out.
 
Upvote 0

jalle007

Active Member
Licensed User
Longtime User
I have deployed files like this
/www
/libs - that includes all my libs selected i IDE
server.jar


using option MergeLibraries=false
now when i run server (java -jar server.jar) i get this

B4X:
# java -jar server.jar
main._process_globals (java line: 84)
java.lang.NoClassDefFoundError: org/eclipse/jetty/server/HttpConfiguration$Customizer
        at com.jalle.main._process_globals(main.java:84)
        at com.jalle.main.initializeProcessGlobals(main.java:75)
        at com.jalle.main.main(main.java:27)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.HttpConfiguration$Customizer
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 3 more

so what is wrong here , please?
 
Upvote 0
Top