Is it possible to develop a java application using jdbc on a windows laptop, and then deploy the jar to an ubuntu VM?
I have a small application that connects to a database on the VM (using IP address). This works fine on Windows in IntelliJ if I run it within the IDE. It also works fine if I move the project to Intellij on Ubuntu and run from within the IDE. But I want to deploy a JAR file to the Ubuntu platform. When I do this I get "No suitable driver found for jdbc..."
I have tried:
Installing jdbc on ubuntu using "sudo apt-get install libmysql-java".
Adding the Platform Independent current jdbc driver as a library.
Including this library in the jar artifact when building.
Adding the ubuntu jdbc to the CLASSPATH (export CLASSPATH=$CLASSPATH:/usr/share/java/mysql.jar)
I can't be the only person who wants to develop on Windows and deploy to Ubuntu?
Related
I have a Windows virtual machine with OpenJDK 13 installed that I would like to setup as a Jenkins node/agent.
When I create the node configuration using the Jenkins UI and select Launch Method: Launch Agent by connecting it to the master it provides a link to download slave-agent.jnlp
On a system with the original jdk/jre older than version 9, which contains java web start, if I run that jnlp file, it brings up a window with a menu that includes an option File - Install as A Service
However, as OpenJDK (and I believe any JRE/JDK versions greater than 8) do NOT contain Java Web Start, I cannot seem to gain access to that option.
I am able to successfully run java -jar agent.jar -jnlpUrl https://jenkinsserver/blah/slave-agent.jnlp -secret blah -workDir "somedirectory" and have the node register with Jenkins, but it is not running as a service.
I had an older agent that was still using old version of JRE, so I looked at its Jenkins service configuration and unfortunately it seems to be relying on executable(s), .config file(s), and xml file(s), which I cannot determine the source of, beyond they must be created when running the "Install as a service" instructions from slave-agent.jnlp
I also attempted to use IcedTea-Web which is apparently supposed to be a Java Web Start replacement, but I've had no success.
Can anyone tell me how to setup a Windows machine running OpenJDK as a Jenkins node/agent with the Jenkins node/agent components running as a Windows service?
I had a similar issue and now I use NSSM.
Download NSSM
Open a cmd and install the service (I used JenkinsService as Servicename):
<path to nssm.exe>\nssm install <Servicename>
Insert the path to the jdk to the field Path
add the rest to the field Arguments:
-jar agent.jar -jnlpUrl https://jenkinsserver/blah/slave-agent.jnlp -secret blah -workDir "somedirectory"
Click on install the service
Now you can check the new service JenkinsService in the windows service manager. As soon as it's running you can check the connection to the master.
If you want to setup a Java base application as a service, I believe the best option would be to use Procrun from Apache. It is the exact method that Tomcat uses.
I am trying to install the Websphere Application Server (32bit) in Ubuntu 14.04.3 (64bit) using the IBM installation manager a silent install and a response file.
The commands I am using are:
sudo ./IBMIM --launcher.ini silent-install.ini -input
ibm_im_response_file.xml -acceptLicense
In the logs I see the following:
WARNING: /opt/IBM/WebSphere/AppServer/bin/iscdeploy.sh: 44:
/opt/IBM/WebSphere/AppServer/bin/iscdeploy.sh:
/opt/IBM/WebSphere/AppServer/java/bin/java: not found
although this file exists, but it's a link to /opt/IBM/WebSphere/AppServer/java/jre/java
EDIT: same happens when using the GUI
EDIT2: I tried doing the same under Ubuntu 12.04 and it worked. Apparently there is some problem regarding the 32bit version that is related to the ia32-libs package that is no longer available in 14.04.
If you are trying to Install Websphere Application Server through Installation Manager then you need to select IBM SDK provided with Websphere Application Server.
If you don't choose the IBM SDK you will be need to enter the JAVA Path in next steps.
I am trying to run some map-reduce programs on a remote server of Hadoop 2.0.0, which is running on CentOS 6.4 using ssh.
I am using Eclipse LUNA on my windows 8 machine.
Is there a way to run the programs directly on my Eclipse without converting them to JAR files?
If hadoop is running on a linux machine, you can not connect directly from windows. The connection has to be SSH.
I hope you are looking for something like this:
https://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.rse.doc.user%2Fgettingstarted%2Fgusing.html
The correct answer (similar) to this is here:
Work on a remote project with Eclipse via SSH
I am using Eclipse Juno with windows 7 (64 bit) and i want to create an executable jar for my AWS-EC2 server (running ubuntu 12.04 32bit) with an external jar (AspriseOCL.jar).
My external jar is for linux (which will fit to my server).
Can i create this?
Thanks in advance!
java is not OS based, so it wil work on any platform,
java generates bytecode that is running inside the virtual machine, so if java is installed , it will work
I am after a all round installation and introduction to Glassfish.
(ie Your boss has told you need to develop your web applications for glassfish instead of tomcat)
Installing
Installing Glassfish onto your own PC for testing.
Download the installer file off the glassfish website
Move the installer jar to the location you wish the files to be installed. Once
installed, the install folder can not be moved. If you are not sure where to place it on OS/X or Linux, drop the installer jar into /usr/local/, this will result in your appserver being installed as /usr/local/glassfish
Run the installer with extra memory java -Xmx256m -jar glassfish-installer-xxx.jar
Run the configuration script: cd glassfish; lib/ant/bin/ant -f setup.xml
Starting the app server
To start glassfish with the default configuration type bin/asadmin start-domain domain1. This will result in the following URL's becoming available:
Admin website http://localhost:4848/
Application site http://localhost:8080/
The default administrator username and password are:
Username: admin
Password: adminadmin
IDE support
Eclipse support
The easiest way to get Glassfish working under Eclipse 3.5 is to use this software Update url (https://ajax.dev.java.net/eclipse) inside Eclipse.
Caveats and warnings
For those used to storing application settings and configuration in a context.xml file, glassfish does not support this.
Moving on from here
The following links are also very useful:
Guide to JMS in glassfish
Guide to JMS in glassfish in Netbeans