This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Is there any online IDE for Java?
Is it possible to use eclipse for java coding from internet for eg Browser based IDE or using on some server present on internet cloud?
I am using a machine on which I cannot save eclipse, and java libraries etc but can use internet.
Can anyone suggest me something.
You can try Orion it's a web based Eclipse (from the Eclipse Team)
Options:
Install Eclipse on a computer where you can and then use one of many products to access remote computers (VNC, TeamViewer, ...)
Install Eclipse on a Linux box and use Linux's ability to run programs on remote machines. But here you would have to install X server on the local (the machine you cannot save Eclipse on) machine
I bet there are other options too. :)
Remote access to your own computer at home could be a solution.
Performance depends on how fast your connection is.
Ports have to be open (default: 3389).
Personally I think the best way to do this would be to set up a build server (or continuous integration server) such as hudson or teamcity. You could then edit your code in a web editor (or simply a more lightweight editor) and just commit and push it to the build server. The build server then does all the heavy lifting and tells you if the build/passed or failed. It can even be set up to run your unit tests!
You might want to reference this question in regards to tips on how to set this up. If you use Github you get the added bonus of being able to use Ace to edit files - though I would suggest using a more robust editor and pushing your repository up manually.
If you are really keen on building on the internet you can check out compilr which sounds like what you really want (though I wouldn't recommend it - you really need you own build flow!)**.
** does not imply that the compilr service is not a good one
Related
I want to work remotely on my project but my project files are on the other machine in my office. I don't want to use Desktop Sharing because it uses a lot of traffic and it is slow. I want to work with my LOCAL intellij but files would serve from my computer in office. Is there any approach?
I don't think it will work, IntelliJ is built around the idea that the files are on the local drive, and if its a descent project it still will be slow.
Depending on your security settings, internet speed, etc.
You can try the following:
At work create a network drive that stores the code and on your local computer map this drive, so intelliJ will "think" that its a regular File System but in fact the files will be stored remotely. I personally believe that it will be really slow, but you can try, this is the closest answer to your question I believe.
Use X Server and stream the graphics from the intelliJ that runs on your server at work to your local PC. In such a setup the computer at work will run the intelliJ process and all the files will be stored there too. Your Local PC will show the graphics. Usually this works when you have linux at work, I do this sometimes with programs like MobaXTerm, probably there are others
Connect to you computer with remote desktop on Windows - as you say its slow but its still a solution, probably faster internet can solve the issue :)
By far the best option I can recommend: Use git's distributed nature. Assuming your project is managed by git (and if it isn't - consider using source control anyway).
Then checkout the copy of the project from... Here are two options:
Option a: ...from the remote central repository that hosts the source files of your project in your organization
Option b: ... from your computer at work, you can define in git the "remote source" (this question is not about git, I know but you can use (git remote add <your computer at work> + chose the protocol that will work for you best: ssh, git internal protocol, http, etc)
Then you'll compile the project locally (you might have to install build tools like maven, gradle, etc. on your local computer and then by using your locally installed IDE you will be able to develop fast. Now when you're ready to "submit" your code - you can push it upstream. In the option A it will be the remote repo like you probably already do at work, with option B you will push to remote branch on your computer at work.
This will be pretty fast and I used to work like this a lot of times.
I read SO q&a about launch java as windows service wrappers, but can't find/choose product, suitable for my requirements :
Wrapper reads all java launch parameters from config file. In registry must be only commands to run wrapper itself - path to exe and maybe path to config. Always grant admin rights to change app parameters in registry is not comfortable.
Working dir and path to application also must be in config. I want to place all wrapper files deep into program, because user not intrested in it.
No dependencies(.net, python, etc). I don't want to extend requirements of my program.
Free for every windows OS, include win64.
Simple and lightweight. Size of my program with all 3rd party jars is 12Mbytes. I don't want to add 20Mbytes wrapper.
Automaticaly restart if app process dies.
Preferably single exe files for all windows platform.
I try and lookinkg throught different wrappers and tired a bit. Best suitable till now is:
jslwin (http://jslwin.sourceforge.net), but i don't know how mature it is(version 0.99). Also parameter lists in config is a bit complex(need to edit parameters quantity).
winrun4j (http://winrun4j.sourceforge.net), but i don't know how mature it is(version 0.45). Also it needs a special class for working as a service.
Also i try or look throught:
YAJWS (http://yajsw.sourceforge.net/) too big (30mb), can't make it work with custom files layout.
Advanced Installer (http://www.advancedinstaller.com) too big (50mb).
nssm (http://nssm.cc/) store launch parameters in registry(no config)
winsw (https://kenai.com/projects/winsw) .net required, stops after process dies
commons-daemon, procrun (http://commons.apache.org/proper/commons-daemon/index.html) store launch parameters in registry(no config), can't understand this product, i think it's complex.
jsmooth (http://jsmooth.sourceforge.net) complex and old(last update 2007)
javaservice (http://forge.ow2.org/projects/javaservice/) old (last update 2006)
runasservice (http://runasservice.sourceforge.net/) requires .net
windows rktools - sc, instsrv, srvany (http://support.microsoft.com/?scid=kb%3Ben-us%3B137890&x=16&y=7) - store launch parameters in registry(no config)
jwrapper (http://www.jwrapper.com/) seems not what i need. It packs java program in exe file with JRE. It's not about windows services.
firedaemon (http://www.firedaemon.com/) not free. And maybe it's not what i need.
launch4j (http://launch4j.sourceforge.net/) cool ability "search or download java". Maybe i add something like this to simplify installation, but it is still not about subj.
Java service wrapper (http://wrapper.tanukisoftware.com/) not free for win64.
Tell me please which wrappers suits my needs? Or maybe i think wrong about wrappers above and some of them suits my needs to?
I have had similar issues over the years. Its not that they all are inferior, its that they are all pretty hard to integrate nicely with your own project.
You may want to check out stork: https://github.com/fizzed/stork
It'll help create launchers for your Java console or daemon apps, and they will work across all major platforms. There is also a maven plugin in case you wanted to tie it into your existing build process.
I'm not sure if JWrapper will fulfil all the requirements like 1 and 2 in the way that you want it since rather than you dictating how it does the launch and where it puts things etc JWrapper instead handles that stuff in its own way but it does produce executables for win/mac/linux and more importantly it does support windows service installation as well as macos and linux daemon installation:
http://www.jwrapper.com/guide-installing-a-service.html
The service support though is for paid licenses, the free version doesn't currently support it.
Disclosure: I work for JWrapper
I've been developing in Java using VIM or Notepad++ editors and my java code is on remote linux machine. For small changes, I just putty/vnc to the remote linux machine; for big changes, I use Notepad++ as it has FTP integrated into it. In Notepad ++, I browse the remote files, download the files I want to edit, and just saving the file saves the file back the remove linux machine.
What I'm missing with notepad++ is intellisense, autocode complete, and couple of features that will help me code faster.
I've used Eclipse before where I could code locally, and integrate with version control. However in this case, the files are located remotely and I cannot integrate with version control.
Any one else in a similar situation that has a working solution they can explain?
This is the goal of Eclipse's Target Management (TM) and Remote Systems Explorer (RSE) projects: http://www.eclipse.org/tm/ . Also see their FAQ: http://wiki.eclipse.org/TM_and_RSE_FAQ
You can try something like SSHFS, then you can remotely mount the remote files and treat them as if they were local. If you have a huge project, maybe it's not efficient enough, or if you have a crummy connection. But it's a nice way to bring remote resources local to your machine.
Addenda:
I don't know much about Windows, but I found this link.
Regarding rsync, rsync is a manual after the fact process. With SSHFS you can save or build files, "alt - tab" over to the terminal window and the files are already on the server. We've used it for PHP development. Edit files locally, save the files, tab to the browser on the server and hit refresh -- shazam.
Okay, from the mention of putty I infer you're running Windows.
Choice number one: get an operating system.
Sorry, I just had to say it.
Okay, you've really got two choices.
Choice one: use some kind of distributed configuration management system. Among the possibilities are darcs, bazaar, git, and mercurial. Subversion can access files remotely, so it can do the same thing in limited senses. In all of these cases, you can basically replicate your files to the local machine and return them using simple commands that more or less optimally transfer the files.
Choice two: use a remote file system. SSHFS, and FTP file systems are good. I'd recommend ExpanDrive, which I've used very happily for some years on Macs. It's now available for windows too.
Perhaps the easiest version of this is DropBox, which replicates files across all your machines, including Linux. It's not very real-time, but it doesn't sound like you need that. I use DropBox between home, laptop, and work (on a linux machine) and by the time I've gotten to the office, all my changes at home are replicated.
I have finished writing a Java Desktop application with a mySQL database. I want to make the application run outside netbeans and let it be installed on other computers. I know about building the project and creating the runnable jar file, however this requires me to export the database itself to the other computer I want the application to run on.
My question is two parts:
1)Is there a way I can create a setup file that also installs the database and the application together?
2)Also my database path is hard coded, does that mean I have to change the code every time I install my application for someone, what is the better way to do that?
Thanks
Yes. You can use some setup builder, like InnoSetup, for example. Personally, however, I like giving my customers a zip file, which they extract wherever they like. The executable jar should be able to handle everything by itself (I like it where there is no need to install the software, just unpack and run).
If it is hardcoded, then yes (but, what do you mean by hardcoded? path to file? ip address?). You should use properties or configuration files for paths and other external things your software depends on. The software should read from those files. Upon startup check for presence of such file(s) - if missing, the user should be shown a window in which the config can be entered.
As for deploying MySQL with your code - consider using a server for that, so that your users are not forced to install MySQL, instead they connect to it over the net. If you need the database only for storing data locally, why not using SQLite or a similar, file-based db engine?
The above answers are just suggestions and more-less reflect the way I am thinking. I would be happy to hear from someone with more experience. Nonetheless, I hope the answers help a little :)
I agree with Sorrow.
If I have to use MySQL, it is normally over the net since I don't want to allow my clients pass through the hazzles of installing MySQL themselves. If however you am stuck with using MySQL locally, investigate MySQL unattended installations + NSIS Installer.
If you can use any db you want, I just use javadb/derby. It comes bundled with most Java installations these days and if not all you need is to add a jar file to you application.
As per 'hardcoding' paths, I really don't understand what you mean. You really don't have 'paths' as it were, I am assuming what you mean is connection string. You don't have to hardcode your connection string, just put some parameters in a properties file and construct your connection string from them.
1) Is there a way I can create a setup file that also installs the database and the application together?
See my answer to Java based Standalone application.
2) Also my database path is hard coded, does that mean I have to change the code every time I install my application for someone, what is the better way to do that?
Have the DB installer pop a JFileChooser to ask the user where they want to install the DB. Store that path using the JNLP API PersistenceService. Here is my demo. of the PersistenceService.
So I'm working on a project where I would like to be able to have the user browse the Active Directory to find a machine or workstation. I already know that you can envoke this directory search in the command prompt by using:
rundll32 dsquery,OpenQueryWindow
I'm using java for my project and I understand how to capture input from a command that I execute in the program but currently, at home, I'm not connected to a domain so I cannot test what the command returns when a user selects a computer or if it even returns anything. Could someone test this for me and tell me what it returns.
Also, if anyone has any better ideas on how to achieve this without relying on window's tools, like maybe a Java API for Active Directory Services?
Instead of calling an API function using rundll32, you should use a Java based LDAP library which will encapsulate the work in front of the Active Directory (so you won't have to parse the results by yourself).
Also, if anyone has any better ideas on how to achieve this without relying on window's tools, like maybe a Java API for Active Directory Services?
Choosing a pure Java library could help you run your application on many platforms (as opposed to using Windows' rundll32 which will limit you to Windows platform)
Check out this thread: https://stackoverflow.com/questions/389746/ldap-java-library.
currently, at home, I'm not connected to a domain so I cannot test what the command returns
There are solutions for this kind of testing problems. You should read about mocking: http://en.wikipedia.org/wiki/Mock_object
Good luck!
Tal.
Talk to the AD via the LDAP API.