on WIN XP SP3 and Netbeans 6.7.1 IDE,
I have installed Java SDK 6.17 which includes JavaDB. I set the JavaDB directory to ...\Java\JavaDB at the Java installation script with %DERBY_HOME% set accordingly and %PATH% including %DERBY_HOME%\bin
Later on I installed GlassFish-V3 Prelude which - surprise surprise - comes with its own JavaDB and silently installs that into a JavaDB directory under the GlassFish path.
Q's
I don't want to have duplicates. Can
I remove one of these installations
without spoiling Netbeans.
How can I verify which of the two
JavaDB's Netbeans is actually using
Can I eventually configure GlassFish
in a way to use the JavaDB I
installed as part of the SDK
Thanks for any hints (as on superuser.com I didn't get any replies :-( )
I don't want to have duplicates. Can I remove one of these installations without spoiling Netbeans.
If really you want to remove one of them, I'd suggest to remove the one that comes with your JDK and to leave the one bundled with GlassFish v3 (GlassFish expects it to be there when using some commands which can be extremely handy, e.g. during development). But honestly, I wouldn't spend too much time for the 4.5 MB extra space used.
How can I verify which of the two JavaDB's Netbeans is actually using
To verify, go to the Services tab, expand the Databases node and right-click on Java DB and select Properties.... You should get the following window:
alt text http://netbeans.org/images_www/articles/65/ide/java-db/javadb-props.png
As documented in Working with the Java DB (Derby) Database, "If you have the GlassFish Server registered in your NetBeans IDE installation, Java DB will already be registered for you."
Can I eventually configure GlassFish in a way to use the JavaDB I installed as part of the SDK
I don't know, but... why would you do that, why is it such a concern, don't you think you're wasting your time? Now, as I said, if this is really an issue, remove the version bundled with your JDK instead.
PS: GlassFish v3 is out, GlassFish v3 prelude is outdated, you should upgrade.
MikeD!
After many years, I am using NetBeans again. As I realized many features are included but others get "lost". I am planning to install several versions.
In NetBeans 6.7.1, to know what version of Java DB NetBeans is using, right click the Java DB node and ckeck the properties.
The path next to the label Java DB Installation tells you what installation is currently in use.
The path next to the label Database Location is used as the value for the property derby.system.home. This property tells Java DB where to create/find the individual databases folders. Besides, this folder holds two files called derby.properties and derby.log.
*derby.properties* establishes persistently system-wide properties.
Do not worry about duplicates. As you can see NetBeans uses 1 at a time. Nevertheless, as a recommendation, choose an installation and stick to it. During my tests I changed the path to the Java DB Installation several times and played with the user authentication properties inside derby.properties and eventually NetBeans could not create new databases in the regular way. So, I had to re-install NetBeans (I use the OS independent zip).
Regarding GlassFish, I have not experimented yet. But, it is reasonable to think that there is some limited set of options about using a different version of Java DB. For example, NetBeans 6.7.1 Java DB support fails if you set the netbeans_jdkhome property so that it points to a JDK version equal or higher than 1.7.0. That tells us something, right?
I will try to tell you anything useful I find out during my tests.
George
Related
I have been searching for hours on how to backup the schema for my database through Netbeans 8.2 I just want to backup my work in the event of computer failure. I tried using command line but no resource is up to date yet on how to properly backup for windows 10 and Netbeans 8.2. Any solution would be greatly appreciated.
NetBeans does not offer this feature. You can only grab and recreate the structure of single tables (Under Services / Databases / [your database] / right click on any table). But this does not include any containing data.
Shashanth mentioned already some alternatives where I would like to add HeidiSQL which does an awesome job.
If you want to implement this as a feature in your own application you probably want to call mysqldump from your program (see this question in addition to the thread provided by Shashanth)
Been using Java for a number of years, but the recent warnings about zero-day exploits concerning the JRE are troubling.
I am considering the following approaches (all on a Windows 7 Ultimate/64 bit machine):
Disabling Java in all browsers (long since done)
Uninstalling Java outright (and hence removing C:\Windows\System32\java.exe, java2.exe, and javaws.exe)
Downloading the Java JRE & JDK into another volume (F:\Java64\jdk1.8\jre), and having all java dependent apps (eclipse, minecraft, etc.) point directly to it.
The questions I have are:
Will this prevent most if not all java centric malware?
Can I configure the java updater to update the java JDK/JRE in F:\Java64\jdk1.8\jre) without having it reinstall into C:\Windows\System32 behind my back?
Desktop Java was never really a vector for malware, the browser plugin was. So disabling it in browsers should suffice. Moving it to another volume or deleting the files from %Windir% will not change anything. Uninstalling does pretty much the same as disabling the browser plugin.
The runtime (and the JDK, for that matter) does not need to be installed in order to use it.
I recommend the following:
make a copy of the JRE, somewhere new, or perhaps one per dependent app
uninstall it
check your browser(s) for plugins and delete/disable them if they got left behind
delete the java.exe files in %windir% if they get left behind
do not point the PATH or any environment variables at a copy of the JRE
While removing or disabling the browser plugin may be sufficient, I personally wouldn't trust that it will remain removed or disabled. The Java automatic updater, for example, might inadvertently reinstall them.
Of course, doing this means that you don't get automatic updates. But Java security issues that affect legitimate programs are rare.
Last night a new Java 7 update has been released: 7u65. I have a web application where a service applet is loaded, and after the update, my tests on different PCs did not show issues nor wrong behaviors.
Later, I started to receive issue reports related to my product's Java service applet. All the reports came from users who updated Java JRE to 7u65 (from 7u60):
The applet was not loading at all. I display a "Loading" screen when the application starts, and this was not being displayed. Also, all the services provided by my Java applet were unavailable.
After changing the Java Control Panel's advanced configuration to always show the console (in one of the PCs where this issue happened), I discovered that the applet was not even launching the Java console.
Using the same station where the error happens, trying to access java.com to check the current java version, the Java applet is loaded and the console is displayed without errors.
All tests were performed after clearing Browser and Java Cache, and even after removing the installed certificates (mine is a valid signed applet).
I checked the Java 7u65 release notes and none of the mentioned changes seem to affect my applet. Also, there were no issues while using Java 7u60.
I don't have any clues about what is going on, perhaps because the java update was released hours ago. As the Java console can not be displayed even if I configure Java Control Panel to do so, I can not tell if there is any exception. I can not reproduce the issue in my PCs (Windows 8, nor Windows 7, both at 64 bits), but the issue has been reported on Windows 7 PCs.
One of my friends told me that this seems to be happening on machines where Java 7u60 was in use, and then it was updated to Java 7u65 with no deinstallations. Also, this tends to happen in older OS (ie: WinXP) which is more natural.
I write this question because it seems very odd that some PCs have this issue, and some others not. I'd like to know if any one else is having this issue, knows what could be the reason, or has discovered/applied any solution to it. Also, I'd like to share the solution if I ever happen to find it.
Thanks.
Edit:
External references, related to the same Java version (JRE).
Internet Explorer crashing after updated Java to 7u65: An issue with the same JRE version, this time with Internet Explorer and Firefox.
RS Loading Issue (Java) ~ READ: An issue related to the same JRE version update, this time, in a Java Game.
The future of Java on Windows XP:
This end of support announcement has been misread as "Java no longer works on Windows XP" or "Oracle will stop Java updates from being applied on Windows XP". These statements are not correct.
I just ran into this exact problem with one of my applets.
It looks like some changes were made to the handling of the 'java-vm-args' and 'java_arguments' params in 7u65.
'java_arguments' seems to no longer work, when it is specified, my applet will silently fail without even launching the JVM.
I have had the same problem.
I delete C:\Users\${USER}\AppData\LocalLow\Sun
When i reloaded the web page containg the appelets. The JRE recreated this folder again.
And evrything was OK.
There is no big difference between the folders contents .. but it worked.
It seems to be a bug in the jRE
It seems that oracle has changed something with processing default plugin java arguments,
that caused problem in new java.
When upgrading from older version of java it is possible that value for
deployment.javaws.jre.0.args (or deployment.javaws.jre.1.args)
is not defined in
C:\Users\${USER}\AppData\LocalLow\Sun\Java\Deployment\deployment.properties
If you add
deployment.javaws.jre.0.args=
to deployment.properties, applet will work.
It can be done through Java Control panel also:
Java -> View -> double click on Runtime Parameters cell for java 7u65 to enter edit mode -> OK -> Apply
java-jvm-args solution didn't work for me, applet was launched but arguments were ignored.
Oracle has released an update that resolves this specific issue via version 7u67
http://www.oracle.com/technetwork/java/javase/7u67-relnotes-2251330.html
As Miloš Ratković wrote, if customer hasn't string in deployment.properties
deployment.javaws.jre.X.args=
where x is number of java installation for version 7_65 (number of java installation for particular version is X in string deployment.javaws.jre.X.product=1.7.0_65), Java applet failed to start.
For my case I have a solution - don't pass any arguments for my applet.
In my javascript code for starting applet I'm just comment
<param name="java_arguments" value="some arguments">
string
Also, if you delete the directory C:\Users\${USER}\AppData\LocalLow\Sun, during next startup of java applet java write new deployment.properties with correct java args string
Uninstall java 7 update 65 and reinstall java 7 update 55 Download the windows x86 offline version
Go to Java control panel and uncheck: automatic update
When the next window comes up, click on "do not check"
then click on "apply" and "ok"
close all browsers and reopen them to continue your work
This has worked for me every time so far and I have been doing this for the last two weeks now with "0" issues.
Sorry, this is not the answer. I was trying to verify the feedback about JRE 7u65 not able to accept "java_arguments"; however, I setup a Windows x32 and installed (new) 7u65 without upgrade from any older version. With the "java_arguments", the machine is able to load the applet in IE8 and FF30, when few specific PCs do fail the same applet with upgraded u65.
I have a long standing domino application that uses embedded views to display data. This application has been moved from a server 2003, 32 bit, domino 8.5 environment to a new server 2008 R2 64 bit domino 8.5.3 FP6 environment.
I have everything up and working as before with the exception of embedded views. They are giving a SecurityException "Missing required Permissions manifest attribute in main jar: http://*.com/domjava/nvapplet.jar".
I have confirmed that the actionbar.jar, editor.jar, nvapplet.jar, and outline.jar are the current version on the server. I have even replaced them with the version from the IBM download (http://www-01.ibm.com/support/docview.wss?uid=swg21662233).
I can get this to work by displaying the view as HTML instead of Java Applet, but I don't understand what the issue is with the java version?
There were major security changes to Java in relation to applets. You can download the latest applets here.
http://www-01.ibm.com/support/docview.wss?uid=swg21662233
You may need to clear your browser cache if it still persists after that.
[update] The question now mentions that you installed Fixpack 6, installed the Jars then uninstalled Fixpack 6.
When you uninstall a fix pack, it reverts the files it touches back to what they were before the fix pack was installed. Although I have no details on it, it is quite likely that the updated security applets were also added to fix pack 6 (as it's the last fix pack for R8.5.3).
So during the uninstall the applets look the same as FP6 and it reverts them.
To solve this, after the revert you would need to drop in the updated applets again.
If the issue still persists at this point, you need to open the Java Console on your browser and update your question with the logs it generates (as it pertains to the error).
Turns out this situation may have been a little unique, but I will post it here for future reference in case anyone else runs into this. The server was a fresh build of windows and domino all the way up to 8.5.3 FP6. The FP6 installer date stamps the jars in question with the install date of the system. So in my case I had people come to the site, download the jar with a file date newer than 1/17/2014, which is the date of the files IBM put in the fix mentioned above. Those files are a simple flat copy so they always maintain the 1/17/2014 date. Anyway, any user that came and picked up the newer date files 3/1/2014 for example would keep those files or rev date in their local java machine cache and ignore the 1/17/2014 file I had replaced them with, thus they continued to show the problem. Only by manually clearing their cache from the java were they able to pick up the 1/17/2014 file and no longer have the issue.
Actually from what I was told via IBM FP 6, does not include the fixed .jars. That was my main problem assuming it did.
How can I pack a Java application and MySQL installation files in a single exe file? Can I install the MySQL files automatically in background (or without any inputs from user)? This is just to simplify the installation procedure.
Java is cross platform, MySQL isn't, so you'd have to create various installers for multiple platforms with different MySQL binaries. If you want to include MySQL source code for non Windows systems, then that's another story... so I assume you want just an installation for Windows.
First of all, get an installation software that you'll feel comfortable with. There is a nice list of free and non free installers on Wikipedia.
Second thing, you can do a silent MySQL installation. How it's done is explained here.
But note that doing a silent MySQL installation without user's permission doesn't sound too good to me, since MySQL isn't exactly lightweight software and you might mess up something if a user already has MySQL somewhere installed.
So, by doing this, you have to be extra careful to check if port 3306 is already up and running (default MySQL port), and other sanity checks to see if there's a possibility of another instance lurking in the background.
It would be better if you at least informed your user that MySQL will be installed. Think about these details, because they might be dealbreakers so some of your users.
Use Java Web Start to launch the application.
JWS offers an ExtensionInstallerService that can be used for installing MySQL. Here is a small demo. of the ExtensionInstallerService.