Where to find notes.exe from within an RCP plug-in - java

I currently have an RCP Eclipse plug-in that goes into IBM Lotus Notes. I need to call the notes.exe binary with some arguments (kind of like from a .bat file), and I know how to do that when I know WHERE Notes is installed.
How do I find out where IBM Lotus Notes is installed, so I can know where to call the notes.exe from?
NOTE: Please don't suggest I look in the typical install folder, I'd like to be able to do it regardless of whether it's the typical default folder or not. Thanks

Look in the Windows registry under HKEY_CLASSES_ROOT\Notes\shell\open\Command
See answers to this old StackOverflow question for Java code that can read/write the registry.

Platform.getInstallLocation() points to the [Notes_install]/framework/rcp/eclipse folder
Just remove the suffix and you have the Notes install

Related

JAVA SE 8, JDK-8u151.exe installation doesn't include src.zip file [duplicate]

I installed the JDK8u40, but only find the javafx-src.zip.
Where can I find the source code for JDK? The src.zip?
Below is what I get after installation:
And btw, I didn't see the installation wizard! This is quite strange.
ADD 1
Today I tried several Java installation packages. All are downloaded from Oracle official site.
jdk-6u45-windows-i586.exe
jdk-7u75-windows-i586.exe
jdk-8u20-windows-i586.exe
jdk-8u25-windows-i586.exe
jdk-8u31-windows-i586.exe
jdk-8u40-windows-i586.exe
Both 6u45 and 7u75 installed well on my box. I can see the install wizard. And the src.zip is installed.
But 8u25 ~ 8u40 all installed silently. And no src.zip file is installed because I have no chance to select it in the wizard.
I am not sure if this is my fault or someone at Oracle made a mistake.
As #SubOptimal commented, the /s option indicates a silent install. I am wondering if there's an option to force the GUI install wizard to open.
I am using Windows 7 Enterprise x64 Build 7601 SP1
Make sure the Source code is not disabled when downloading.
Then as you can see on the picture, selecting "Source Code" will tell you exactly where it is located.
Notice that I've downloaded the 32 bits version to make sure to reproduce the same use case as you.
Edit
As per your new edits and comments, it seems what you want to know now is why you don't see the installation wizards. I'm pretty sure this is due to old-set registry key.
Run the following command
reg query hklm\software\microsoft\windows\currentversion\installer\UserData\S-1-5-18\Products /f "java" /s | find "HKEY_LOCAL_MACHINE"
Now, navigate to each of the returned path browsing with regedit and delete their entire parent (the big hexa number).
Re-try the installation and I'm pretty sure you will see the wizard.
As for the sources, Oracle documentation specify how to download them in silent mode.
jdk.exe /s ADDLOCAL="SourceFeature"
This is the way I got the src folder from jdk-8u172-windows-x64.exe file without installing.
Step1: Download jdk-8u172-windows-x64.exe file (Java SE Development Kit 8u172) from oracle site
Step2: Extract it and navigate to the path:
\jdk-8u172-windows-x64.rsrc\1033\JAVA_CAB9
Step3: Right click on file named "110" and extract it.
You will get the src.zip file.
It took me little while to figure this out. I hope it will help others.
Enjoy debugging Good Code!
I don't know why/where the src.zip is, but as an alternative, if all you want is the source and somehow the proposed method doesn't work for you, you could always pull directly from the JDK8u40 source tree.
You will need Mercurial instead of Git. This link talks about the hg clone command
Quoting from the OpenJDK Java.net site
The corresponding master forest jdk8u can be cloned using this command: hg clone http://hg.openjdk.java.net/jdk8u/jdk8u;cd jdk8u;sh get_source.sh .
In addition, the source code for the last release, 8u40, is available by cloning the 8u40 master forest : http://hg.openjdk.java.net/jdk8u/jdk8u40. The final build of that release was tagged as jdk8u40-b25.
There are differences between OpenJDK and Oracle's, though subtle
download JDK 8 from following link
http://www.oracle.com/technetwork/java/javase/jdk-8-readme-2095712.html
src.zip comes in-built with it
if you JDK installer silently skips installing the source. just open the control panel > programs an features and find Java. Right click on it and select change and then select the
source (option) ;)
Download the JDK
Run the Installer, but stop right away
Extract src.zip from C:\Users\<your_username>\AppData\LocalLow\Oracle\ss180121.cab
You can extract .zip from .cab with tool like 7Zip
Taken from

Using launch4j, will end user still need the JRE installed?

I just wonder if I use launch4j to convert jar to executable (exe file) on Windows. If I take the executable (and other created files if there is any) to another computer which doesn't have JRE installed and I don't have administrative permission, will the executable file still work? Many thanks!
-updated from here-
I didn't try launch4j yet and from reading doc I didn't quite understand really and I didn't think I get my answers. Reading english literature is very different from reading a technique doc. I have a very limited IT knowledge.
I did do a bit search here. I found someone says launch4j is just a wrapper and still need jre installed in the end user's computer, but the the post was 4 years old. So after some research I'm still not 100% sure if I need install jre in the destination computer. For me if jre is an absolute need in the destination computer, then I can forget about using launch4j as I know I won't get jre installed there. However I got a feeling launch4j maybe can somehow bundle jre with the exe file and the exe file can then be run on any computer without jre installed. I'm just trying to confirm things I'm unsure about.
So the answer I'm looking for is
1) yes still need jre installed, then I can't use launch4j
2) no you don't need jre installed, then I will learn how to use launch4j
3) depends, then I will probably give a try
However, I don't think I should be punished by being marked down because my lack of background knowledge. Although the original post does look like some random post. Thanks.
So for beginners and people who don't have an IT background like me, here's the definite answer for my own question.
"Hi guys.
I just wonder if I use launch4j to convert jar to executable (exe file) on Windows. If I take the executable (and other created files if there is any) to another computer which doesn't have JRE installed and I don't have administrative permission, will the executable file still work? Many thanks!"
"Hi,
The JRE is still required, the executable will not work without it. However, you can bundle the JRE with your application so even if the user does not have Java installed it is possible to run the app.
Best regards,
Grzegorz"
"Thanks Grzegorz!
And just a small question if you could briefly explain. I noticed you used the word "posssible", does that mean there are some cases you still can't run it?
I will try it out anyway cheers!
Joe"
"No, there are no special cases here, if you bundle the JRE it will work.
Cheers"
original post is here at this Link
Cheers!

Problem with java-doc for standard java library

I recently started using Ubuntu and installed netbeans 6.9.1. I seem to be missing some javadocs tho that get installed with the windows version.
Basically the netbeans docs are there but when the code completion comes up it only tells me the function prototype. Where theres usually a description it says that the javadocs are not found and they should be added in the platform or library manager.
Basically I just want the docs explaining the methods for basic java, swing, and awt. Anyone know what files it is i want to be getting, and can I do it all with apt-get?
OS:
Ubuntu 10
Probably you have not installed java-doc package:
sudo apt-get install sun-java6-doc
or what ever is suitable for you.
I had the same problem. Solution is very simple:
You have to download "Java SE 6 Documentation" from this page (in Additional Resources list)
http://www.oracle.com/technetwork/java/javase/downloads/index.html
It is a zip file (~50 mb). Put this file to some place you like(I suggest you to put it to the JDK directory, but you can put it to your home directory) and then open NetBeans.
Select Tools -> Java Platforms. Then select JDK on the left window. In the Javadoc tab, click Add ZIP/Folder and choose file you recently download.
When you done this, your javadoc in code completition windows will work correctly.

Eclipse Generate Javadoc Wizard: what is "Javadoc Command"?

I want to generate the javadocs for an open-source code-base I'm using. But I'm being asked for a "Javadoc Command" by the Eclipse Generate JavaDoc wizard and the help doesn't explain what this means. Is it wanting the path to the javadoc binary/jar or something else?
Yes, presumably it wants the path to the javadoc command line tool that comes with the JDK (in the bin directory, same as java and javac).
Eclipse should be able to find it automatically; are you perhaps running it on a JRE? That would explain the request.
Yes, it is asking for the application/executable that is capable of creating Javadoc. There is a javadoc executable inside the jdk's bin folder.
You may need to add a JDK (Java Development Kit) to the installed JRE's within Eclipse
Go to Window->Preferences->Java->Installed JRE's
In the Name column if you do not have a JDK as your default, then you will need to add it.
Click the "Add" Button and locate the JDK on your machine.
You may find it in this location: C:\Program Files\Java\jdk1.x.y
Where x and y are numbers.
If there are no JDK's installed on your machine then download and install the Java SE (Standard Edition) from the Oracle website.
Then do the steps above again. Be sure that it is set as the default JRE to use.
Then go back to the Projects->Generate Javadoc... dialog
Now it should work.
Good Luck.
Had this problem and solved typing this : C:\Program Files (x86)\Java\jdk1.7.0_51\bin\javadoc.exe
There are already useful answers to this question above, however there is one more possibility which I don't see being addressed here.
We should consider that the java is installed correctly (that's why eclipse could have been launched in the first place), and the JDK is also added correctly to the eclipse. So the issue might be for some reason (e.g. migration of eclipse to another OS) the path for javadoc is not right which you can easily check and modify in the javadoc wizard page. Here is detailed instructions:
Open the javadoc wizard by Project->Generate Javadoc...
In the javadoc wizard window make sure the javadoc command path is correct as illustrated in below screenshot:

How do I properly repackage the JRE installer in my installer?

I've got a Java application that I'm writing an installer for. We're using the AdvancedInstaller program to create our installer (well, we're evaluating it currently, but will definitely purchase a license soon), and although it has special support for Java applications, it is geared more towards repackaging them as desktop-type apps, and our software is a series of Java services and other utilities which doesn't make sense to distribute in EXE-wrappers. The target audience for this software is very specific, and we know that our software will probably be automatically distributed on freshly-imaged Windows 2003 Server machines. So requiring Java as a prerequisite basically makes more work for some poor sysadmin, and I'd rather avoid that if at all possible by repackaging the JRE's installer inside of our own.
I discovered that if I tried to execute the JRE's installer as a pre-install step from my MSI, it complains that another installer is already running (mine, of course), so it bails out. When I try to add the JRE installer as a software prerequisite in the AdvancedInstaller project (as a bundled EXE, not a URL link), it never seems to actually get installed, despite me trying to force-install it.
What's the best way to repackage the JRE? I'm not really a Java guy, so I don't know too much about how other developers deal with this same problem, short of requiring their users to hunt out and install the JRE on their own. The ideal solution here would be for us to find a EXE installer which can be executed from inside of another MSI installer, or if it's possible, to just package all of the files inside of the JRE and then create the appropriate registry and environment variables. How should I go about doing this?
I have not idea if this is "the way" to do it, but confronted with a somewhat similar problem, we simply archive an installed JRE with the rest of our application files and make sure that all our start scripts don't use java ..., but rather ..\..\jre\bin\java ... or similar. The JRE is unpackaged as part of our installation process in a subdirectory of where we install and that's that.
I agree with bdumitriu's answer:
a simple zip of a jre is enough, unless you want to link that jre to:
default java (meaning you must add java.exe of the unzipped jre to the path, before any other java path references)
default java for some script (you could define JAVA_HOME as referencing your new unzipped jre, but that may have side effects on other script also using JAVA_HOME before that new JRE)
file associations like .jnlp or .jar files (this requires some registry modifications)
browser java plugin registration (which requires also registry modifications)
If the last two points do not interest you on the desktop concerned by this deplyment, a simple zip is enough.
http://www.syswow64.co.uk/2013/05/java-7-update-21-1721-enterprise.html
The issue on many blogs and articles is around creating the 'deployment.config' and 'deployment.properties' files for an enterprise deployment. In my case i wanted to set the security level to 'Medium', but everytime I open the Java control panel it was set to the default HIGH setting.

Categories

Resources