Installation for a college DBMS Project - java

I have created a simple database application as a part of my college assignment. I have used Java (Eclipse IDE) and MySQL (command-line and phpMyAdmin) for the purpose of creating and using the database on a stand-alone application. The thing is that my database is stored on the localhost.
An easy way to make my application usable on another person's computer would be to convert it into an Executable JAR (since, I am using Java). However is there any way by means of which I can also install the database directly to the other person's computer (on the localhost)?
Something like an installer or so?
I read online that a simple thing would be to manually install MySQL and create the database. But I don't know PHP and typing the MySQL commands / using phpMyAdmin would be the only choice. But is there any better way to go about doing it?
Thanks for any help.
EDIT1:
I don't know if this helps but I have no previous knowledge regarding creating installers for projects. All I have done until now has been exported either as an executable JAR or as source code. I am still studying.
EDIT 2: Creating an installation for a java project <- is a similar question but it does not help my cause. It recommends not using MySQL. Our college has compulsorily asked us to use MySQL and nothing else. That is what they taught us and expect us to work only with it. Please help.

You don't need PHP here, so don't worry about not knowing it. PHP is just another programming language (a web-based interpreted one), and isn't going to help you install MySQL.
You should probably ask your instructor for assistance, because anything we come up with would be a guess about how they intend for your to operate, whereas they know and have done this before many times. That being said, we can make reasonable guesses toward helping you.
You could probably have one master MySQL installation that all your installed Java applications access. This is probably what you want, rather than installing the MySQL application on each individual computer. Your Java application then connects to your college's MySQL server rather than localhost. This requires configuring the MySQL server for remote access, but if that's what they want you to do they probably have already done so.
The other option is to have an installer that actually installs MySQL and runs a series of scripts to import the expected database structure. I can't imagine this is actually the intention, but there are many different installers that can help with this, and it depends how what platform you're developing for as to which automated installation tool might work best for you. You can, to a large degree, script the installation of the official source, so you may simply be able to tweak that once you find the customization options you need, then wrap that in a simple shell script which first installs MySQL then imports your database structure. I can't imagine this is what your school intends, but that's how you would do it if it were. That or Chef, Puppet, or your distribution's built-in package manager. Too many options to cover them all thoroughly here.

Related

Will Oracle Universal Installer mess up my existing database setup?

I'm asking here because I haven't been able to get a clean answer from Oracle, so I wanted to see if there were any Oracle experts out here!
As a high-level overview of what I'm trying to accomplish, I want to get a recently-moved two-way interface to authenticate through the served ASMX file to authenticate the username and password against an Oracle DB. I am getting an 'Invalid Credentials' SOAP Header Exception error on the web interface. In reviewing the setup of the old IIS server, I see there's an Oracle Data Provider installed on it. When I search for this ODP.Net provider, I see it's included with a configuration tool called the Oracle Universal Installer.
When I begin the install, I see it copying over a bunch of java JRE files, so I exited out as I was concerned it would mess up my existing setup. (This is the OXI server, not the App/DB server)
So my question is...would installing Oracle Universal Installer mess up my existing environment? (I realize this question is extremely specific to a particular environment) I've taken a snapshot of both my OXI and DB servers as a just in-case...I guess I am looking for a little extra comfort before continuing.
Thank you
In terms of Java I don't think so. The installer copies java files into sub-folder of your Oracle folder and that's it.
However, for other components it might do a lot and also break your existing application. It may overwrite the ODP.NET provider, change your PATH variable, etc.
Your question has to be more specific.

Java applets are no longer supported - what's the alternative? (File manipulation - shell commands)

I have a question about how to manipulate files from the browser, currently we are using a java applet. To create some folders, replace/delete save some files/folders and execute a shell command with parameters. As we know Chrome no longer supports the npapi and therefor java applets, FireFox will soon follow and my guess is that IE will not stay behind forever.
So the actual question is what's the best way to go?
Should we think about creating plugins (but this then should be done for all major browsers - a lot of work)
Or do you recommend to install an external program, what we can launch on the users system? By for instance associating a specific extension, or by adding a url scheme?
What about this Java Web Start? Does this allow us to communicate with the domino api?
Any other technologies that would be better?
The website we are building is using IBM Domino 9.0.1 XPages (JSF).
Answering to your use case: content management system.
For adding files the HTML5 files API should do all you need. There are plenty of examples including multi file uploads.
It gets trickier when you want to provide a round-trip edit experience. Like you click something and Word, Excel, Impress, Photoshop opens and you edit. When you save it all goes back to Domino.
The solution here is wevDAV. You can even expose Domino views as folders in Explorer / Finder / Nautilus.
For Domino there is a project on OpenNTF that implements WebDAV for documents/attachments on Domino (I wrote it). It might be your best bet.
I think we should be making a distinction here:
things like file access can be done using HTML5 file access, but
things like local administration definitely aren't something that need or should be done from within the browser.
In fact, I always hated that Java suggested that users "need not install any software" to do this and that on their machine, which was a straight lie, considering they downloaded Java Software, had to tell their Java Policy framework to trust that and then that software was able to make local changes. That's just as unsecure as downloading any (signed) executable and making your user execute it.
Java's portability¹ doesn't apply to your use case, as it seems; "executing a shell command" sounds as non-portable as it gets. So, in the end, you either only have one platform you address, or one solution for every platform, in which case you gain no portability by the fact that the same Java executable can run on all JREs (given that's the case, even).
I'd say: It's a good time to let Java for Desktops die, especially since you don't seem to be doing anything that Java is good at² in your application.
As it sounds, the average installer framework can do what you want without you writing any code. There's plenty out there, especially for Windows, which you seem to be addressing; take microsoft's .MSI as an example. You'd end up with a two click, signable, trustable, updateable solution that wouldn't need the user to keep a JRE installed or secure at all.
CLARIFICATION: I really don't hate Java; I don't find it's the greatest language or has the best ecosystem, but whatever makes your application work is fine.
Now, you mention:
To be clear, we are creating a Document Managing System, which used to be on the Lotus Notes client and that we are trying to port to the Web.
That does in fact sound like it might be a good idea to chose any browser and embed that. In fact, Firefox is "merely" an application around a browser core, and you might just modify it (e.g. by writing an extension) to fit your needs. It's not really a "web application", that way, but it would meet your requirements of integration with a web application and local administrative access. I furthermore recommend thinking twice about the shell scripts you need to run locally -- maybe their job can be more easily replaced by another program or even something that is "web compatible" than calling them with local privileges from your web application.
¹ (which was a big thing back in the day, but honestly, Java applications nowadays are about as portable as your average .Net or Qt based application on desktop OSes, but never quite feel completely like home -- it's like portabilities ugly sister if you're portable, but only offer the minimal common subset of functionality and look and feel on each platform)
² ... whatever that might be!

Apache MINA Vysper documentation?

I plan on making an instant messaging app on Android and iOS, where you can chat to other people with the app, along with some custom features.
I’m going to use the XMPP protocol, and make a custom extension for it. I plan on making a Java application running on Amazon Web Services (AWS) so it's scalable.
After researching server options I’ve decided to use Apache Vysper.
However, I’ve never made a proper Java application before, and have never used XMPP, AWS or Vysper – so I’m rather reliant on good documentation :-)
The Apache Vysper project is very new and so the docs are a bit sparse. I was wondering if I was missing something, should I be using the general MINA docs as well? Are there other resources
elsewhere I don’t know about?
“Apache Vysper can run stand-alone or embedded into another
application.”
To be honest I’m just as lost when it comes to working out what to use to make a Java application anyway. Do you know if the AWS Java SDK has everything I need to make an application to use on AWS? And then is it a simple matter of integrating Vysper into this? Or do I need to make a Java application using something such as the Spring framework?
Thanks for taking the time to help me. If you know anything that could clarify the situation I would really appreciate it :-) --and sorry be being a bit useless, but hey, we've all got to start somewhere right ;)
First of all, as the founder of Vysper I apologize that the documentation is lacking completeness.
To answer your question(s).
Most Java applications bring their own ready-to-go start scripts with them.
Vysper is no exception. You get the pre-packaged download here:
http://mina.apache.org/vysper-project/downloads.html
Ok, before running it, you need to have Java installed, whether you're on your own machine, AWS, a server or a virtual machine anywhere else. Get it from Oracle, or use the package management of your Linux distribution. Make sure that after installing Java, you can execute "java -version" on the command line and you are all set.
Then, unpack the Vysper download, change to the bin/ directory and execute "run.sh" or "run.bat", depending on your OS.
Please note that support for Vysper - besides here on StackOverflow - is available on the MINA user mailing list here:
http://mina.apache.org/vysper-project/mailing_lists.html

How to make a browser based IDE to code in the cloud?

I have read a bit about cloud and browser based IDE's.
I am planning to make a Java based bare bones IDE by integrating a compiler to code in the cloud. This is for educational purpose as I am just determined to learn to develop cloud based IDE.
I want it to be something like eclipse Orion but i want it to allow for coding in java. It should allow users to code, compile and run java programs by directly writing .java files and not by converting the .js files into java files.
Can someone please suggest me an existing cloud that I should use for this. And also, I am just a beginner and I have no clue about how to proceed and the articles that I am required to read.
Please do let me know what I should begin with and the cloud that suits my needs the best.
Thank you very much in advance.
You should look at projects like Mozilla SkyWriter, which implement the bare bones editing functionality
(There have been a lot of change lately. There seems to have been migrated to Ace)
You can use Codenvy and put your code on a Git repository. Then, you could build automatically once you have done the push using a CI tool like Jenkins. Now, I have an environment in which I use a Jenkins instance as a Service and also a runtime environment so I can get a continuous deployment pipeline. This video will show you, in a graphical way, what I am talking about.
Koding provides you with a full Ubuntu machine, with root, so it's able to run and do what you want, programming wise.
The reason i'm suggesting Koding though, is that they have a Framework to develop your IDE for the Koding VMs themselves.
The logic here, is that making IDEs is challenging, but the biggest challenges is ensuring security between your IDE users. Using another VM platform would mean that you don't have to manage the security of your VM, and focus entirely on your IDE.
Let me know what you think :)
For virtual/cloud hosting try one of the following:
Rackspace
VPS Farm
I like vpsfarm because it is cheap and pretty bare bones.
For the IDE itself, I would first create a webapp that can upload and compile and run arbitrary java code, without adding libraries or J2EE. That alone will be a good undertaking for one dev.

Possible to check for files on users computer from website?

I know this question brings up a lot of security issues, but is it possible to check for files on a user's HD from a website? We have a software application and would like to be able to check for certain files-types on the user's cpu before they download our software.
Again, I realize this is intrusive and a security issue but wanted to ask anyway. If this is possible, would it be done with some type of Java or ActiveX control?
I would appreciate anyone pointing us in the right direction.
thx!
I suppose using either Java or ActiveX would work, but only where Java or ActiveX exist. Obviously, users of browsers other then IE don't get ActiveX, and I'm not sure the penetration of Java, or Java Webstart installs. I'm sure its not anywhere near everyone.
If your goal is to validate a system before installing some complex software with dependencies, I would suggest having a separate package that just does the validation. Especially if it is just a single .exe (not requiring installation), spending 30 seconds doing this in prep for some complex download, install, reboot, fail cycle seems like a good tradeoff.
It can be done with an ActiveX control. The user would, of course, be prompted for permission for this, but since sites like Panda Security can do a virus check via an ActiveX control, then it's definitely possibe to write one to list the files on a HD.
I'm not sure if the Java Sandbox will allow this, so I'll defer the question of doing this via a Java Applet to REAL Java developers. (I haven't been a Java developer since 1.14, and I was never any good at it.)
Java Web start can do this with the proper settings http://www.ibm.com/developerworks/java/library/j-webstart/

Categories