setting up java workspace in remote location - java

Forgive me for if its a dumb question.
I am new to java.
I want to set up my java workspace in a remote machine(server) and access the workspace from my desktop.
1) Is it required to have java installed on that remote machine?
2)While running the project whose computational resource(RAM) would be used i.e. my desktops or the remote servers'.

if you are using eclise as IDE for development or Any IDE you need to install JDK on computer that you work(server or client)so if you are working on remote server you need to install JDK on it
and
you should have a remote connection if you are in windows ,use Remote Desktop ,
second question
if you are using a server as working computer that computer takes RAM to compile and run Java
not your computer .

1) Is it required to have java installed on that remote machine?
Yes , of course you need it to be installed on the target computer you are accessing through remote
2) While running the project whose computational resource(RAM) would be use
While accessing jvm will use the RAM of the computer where it is being used , your pc doesnt get used only your network data usage would be used
Hope this helps!!

Related

SpringBoot 3 AOT/GraalVM/Native: Build native binary from Windows to run on Linux

Small question regarding SpringBoot 3 and the new AOT Native binary with GraalVM please.
I am building my java SpringBoot 3 app on a Windows machine (no judging please!) in order to scp the binary on a Linux host.
I followed the GraalVM installation guide and could install GraalVM, generate the binary image. The binary runs fine on my Windows machine.
Actually, I had another Linux machine, where I installed GraalVM, generated the binary image. The binary image would run fine on the Linux machine.
However, this Linux machine to "build the binary" is not available anymore.
Therefore, I am building the native image using Windows, hoping it can run on Linux (concept which works with a plain old .jar)
Unfortunately, the Linux machine cannot run the binary (probably because it was built on Windows).
May I ask how can I achieve building the SpringBoot 3 native binary from my Windows machine, and then be able to run it on any other Linux machine please?
(If possible, with something simple, without having me to install a dual boot windows/ubuntu, or having to pay a cloud provider CI/CD pipeline)
Thank you
Unless you are stuck with some dated Windows desktop with no means of updating to release from ~2019 release, you should go with WSL or Docker and replicate your missing Linux machine.

Installing Java on a Flash Drive

I'm really tired of computers not having the necessary Java version I need, or I don't have admin privileges to install it. I've seen tons of windows tutorials, but I'm on a Mac. So can someone tell me how to put Java 7/8 on a flash drive, and how to create a script to run a jar file with the version on my drive I have selected? Thanks! I'm on Mac OS X 10.10
Based on your comment to another answer
I have a computer I can do it on with admin privileges
It sounds like you just want to have the JVM/JDK on some portable media that you can run from after you plug it into another computer. This should be simple assuming you only plan on using it on comparable systems. For example, you won't reliably (or at all) be able to install Mac x64 java binaries on a flash drive and try to run it on a Windows machine.
So assuming you only intend to run it on comparable machines, it's as simple as copying the directory structure from the root of the Java install directory. On my Mac OsX 10.9.5 it's /Library/Java/Home. Once you have it on the drive, you just plug it into another Mac. It should automount and you open up a terminal to the root of that mount. cd into the $JAVACOPY/bin (where $JAVACOPY is the directory structure you copied) and you can run ./java -version to verify you are running it.
If all is well after doing that, you can launch any JAR file from that flash drive mount directory with
cd /Volumes/flashMount/Java/Home/;
./bin/java -jar /Users/myuserid/myJar.jar
Keep in mind that Java doesn't strictly require any of the formal install process that systems like Mac and Windows surround it with. All of the fluff involved with "installing" java is about setting up the system to use whichever Java version is installed without the user having to know or care. But you can have as many versions of java as you want in the file system without "installing" them and they should all function just fine (ignoring classpath collisions for certain libraries.)

Configure Intellij to use a Jvm of a guest VM, it's possible?

I want to know if it's possible to use intellij in a host machine
for compile and build java source code that resides in a guest
VM.
For example, I'm using a windows machine with virtual box. If I preffer to
install Intellij in this OS and keep the source code on guest OS (ubuntu
running on Virtual Box), where are java and maven configured. So I would be
able to use the java/maven of ubuntu for deal with code there are on
ubuntu too but using de IDE remotely.
In this scenario I just to know if I could set the IDE preferences to use
a java compiler and interpreter and the maven in a remote machine/VM
It's make sense?
If this possibility exists, the is a resource for reading about it?
Thanks.
As I understood it's not possible as IntelliJ will need to use local JVM installed on host computer. It cannot use JVM of a remote or Virtual PC.

Remote Java development with Eclipse (or something else)?

I'm fairly new to Java development, and people have been suggesting I use Eclipse as an IDE for the work I'm doing. My code lives on a linux box (running Ubuntu of some fairly recent version), but I use a MacBook as my main computer. I've been ssh'ing into the linux box to work on the non-Java code, simply using vim and have done the same up to this point with the java code, compiling it from the command line. From what I hear, Eclipse would be fairly useful in managing the project's code, but from all I've found, it seems I need to run it locally with the code; i.e., either with the code on my Mac or Eclipse on the linux box, not with Eclipse on the Mac and the code on the linux box.
Any one else in a similar situation that has a working solution they can explain?
The first thing you should do is set up a revision control system. I recommend SVN. Then install Eclipse on your Mac with the Subclipse plugin so you can check out the code to your local machine and work on it locally. You can deploy the code to your linux box in a number of ways. The simplest might be to simply check out the code from SVN on your Ubuntu box.
You can also write and compile your Java code on your workstation, and then export it and ftp it (as a jar file) up to the host where it will execute as needed. Eclipse also has a remote debugging feature that you can use to look into the remote JVM from your workstation, so you can step through it using the IDE as it runs.
You could install Subversion on your Ubuntu box and connect to it on your MacBook, which has Eclipse installed. You also need to install a Subversion client in your Eclipse (which is an easy thing to do). I'm sure Google will fill in some gaps.
If your bandwidth is big enough and the Linux box can run Eclipse on its own, you can tell the Linux box to use your Mac X11 display.
A frequent way to do this, but a bit slow, is to start X11 and then use "ssh -X linuxbox" (or "ssh -Y linuxbox") to get the X11 forwarding. Test with xdpyinfo, and then just run Eclipse in your ssh'ed in shell.
If you mount the Linux box as a drive on your Mac, you should be able to point Eclipse at the code. I do that at work, where my code resides on a Solaris box, yet I'm running Eclipse (and NetBeans) to edit that code on Windows.
The only catch is that you need network access to that machine.
Another option is to run a remote graphics server like FreeNX on the Linux server, then connect to it from your Mac with the FreeNX client. You can then have Eclipse installed on the Linux server and just use your Mac as a display client, which avoids any syncing problems. NX works pretty well over low-bandwidth connections; a number of the developers at my company use this method to connect to our office servers from home.
From your description it sounds like you're not allowed to store the code locally on your mac. I'm in a similar situation, where my company doesn't allow you to store stuff on your home computer (I have a mac at home, and a Linux and a PC at the office). I've found that Eclipse is responsive enough when you remote desktop or VNC to it, if that's allowed by your company.
If I'm misunderstanding you, then source control is your friend - develop on the mac, check in, and execute on the other machine. Alternatively, you may want to use rsync. I did this thing when I had to develop an Eclipse plugin for multiple platforms and it worked fairly efficiently.
You could try using the Remote System Explorer architecture. I've not used it myself so I can't say how well it works, but this blog describes how to use RSE to browse remote files.

run a web project developed in Java run on both windows and Linux platform

I have a web project developed in java. I am using the Windows platform and accessing the project from the Windows machine itself. How can I make the project run on a Linux machine? I am using jboss server and deploying the project.
Regards
Java is Cross-Platform, MySQL also. You can have your application server running on one server and the database on another. You can even have your Appserver on Linux and your database on Windows and your client on MacOS.
If you run into any specific problem, please let us know, but everything should be transparent unless you wrote some very bad Java code ...
Java is a Cross-Platform language. Just deploy your JAR/WAR/EAR in a JBOSS running on a Linux Box.
Java can run on many platforms only if any platform specific coding is not done for example file separator are different in windows, linux and Mac.
You need Jboss for linux and deploy your web application it should just work fine.
Java can run on many plarforms including linux and windows. You can develop project anywhere and run on any server.
I suggest you, install a linux on virtualbox and deploy it on linux directly. Also you can try cruise control for deploy automatically.

Categories

Resources