I want to install Java with Chef 13 on Windows 7.
Installing from file is easy, but I want also to download it from Oracle archives. The thing is, Oracle requires special cookie - oraclelicense=accept-securebackup-cookie.
I've tried java cookbook, as it seems people did it without problems. Hovewer, after running Chef I get error:
Recipe: java::notify
* log[jdk-version-changed] action nothing (skipped due to action :nothing)
Recipe: java::windows
* ruby_block[Enable Accessing cookies] action run
- execute the ruby block Enable Accessing cookies
* remote_file[C:/Users/User\.chef\local-mode-cache\cache/jdk-7u79-windows-i586.exe] action create[2017-05-25T08:30:21+02:00] WARN: remote_file[C:/Users/User\.chef\local-mode-cache\cache/jdk-7u79-windows-i586.exe] cannot be downloaded from http://download.oracle.com/otn/java/jdk/7u79-b15/jdk-7u79-windows-i586.exe: 401 "Authorization Required"
[2017-05-25T08:30:21+02:00] WARN: remote_file[C:/Users/User\.chef\local-mode-cache\cache/jdk-7u79-windows-i586.exe] cannot be downloaded from http://download.oracle.com/otn/java/jdk/7u79-b15/jdk-7u79-windows-i586.exe: 401 "Authorization Required"
================================================================================
Error executing action `create` on resource 'remote_file[C:/Users/User\.chef\local-mode-cache\cache/jdk-7u79-windows-i586.exe]'
================================================================================
Net::HTTPServerException
------------------------
401 "Authorization Required"
Resource Declaration:
---------------------
# In C:/Users/User/.chef/local-mode-cache/cache/cookbooks/java/recipes/windows.rb
62: remote_file cache_file_path do
63: checksum pkg_checksum if pkg_checksum
64: source node['java']['windows']['url']
65: backup false
66: action :create
67: end
68: end
Compiled Resource:
------------------
# Declared in C:/Users/User/.chef/local-mode-cache/cache/cookbooks/java/recipes/windows.rb:62:in `from_file'
remote_file("C:/Users/User\.chef\local-mode-cache\cache/jdk-7u79-windows-i586.exe") do
provider Chef::Provider::RemoteFile
action [:create]
default_guard_interpreter :default
source ["http://download.oracle.com/otn/java/jdk/7u79-b15/jdk-7u79-windows-i586.exe"]
use_etag true
use_last_modified true
declared_type :remote_file
cookbook_name "java"
recipe_name "windows"
path "C:/Users/User\\.chef\\local-mode-cache\\cache/jdk-7u79-windows-i586.exe"
checksum nil
rights nil
deny_rights nil
verifications []
end
System Info:
------------
chef_version=13.0.118
platform=windows
platform_version=6.1.7600
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [i386-mingw32]
program_name=C:/opscode/chef/bin/chef-client
executable=C:/opscode/chef/bin/chef-client
As you can see in logs above, I've set ['java']['oracle']['accept_oracle_download_terms'] to true (execute the ruby block Enable Accessing cookies).
Since this cookbook didn't work for me, I've tried to do my own java cookbook:
windows_package package_name do
source source
action :install
installer_type :custom
remote_file_attributes ({
:headers => {"Cookie" => "oraclelicense=accept-securebackup-cookie"}
})
options opts
end
... and it still gets the same error.
Did anything change on Oracle site that downloading JDK doesn't work anymore? Or do I have to set firewall or something?
Oracle introduces changes like this from time to time, that's unfortunately common. Since nothing can be done about it from a regular user's perspective, the best solution is to host the packages yourself, and modify your node attributes to point to that source. That's what I do, with the attributes looking something like this (for linux and a samba share):
"java": {
"install_flavor": "oracle",
"jdk_version": "8",
"jdk" : {
"8" : {
"x86_64" : {
"url" : "file:///path/to/jdk-8u131-linux-x64.tar.gz",
"checksum": "the file's checksum"
}
}
}
}
This way, changes like the one made by Oracle are no longer problematic.
Related
In Java code I want to "touch" a file. I want to update the timestamps to the current time. The file uses ACL. And this seems to be the problem.
The file:
$ ll file.xml
-rw-rwxrw-+ 1 root root 8611 Oct 4 17:28 file.xml
$ getfacl file.xml
# file: file.xml
# owner: root
# group: root
user::rw-
user:tomcat8:rwx
group::r-x
mask::rwx
other::rw-
And my Java app runs from Tomcat 8 with user tomcat8. A sudo -u tomcat8 touch file.xml works. It also works if I completely remove ACL and set tomcat8 as owner. But this is not possible in the production environment.
So at first I tried Apache common-io:
FileUtils.touch(path);
This causes an IOException. I debugged it a bit more and found out that the library calls FileSystem.setLastModifiedTime which calls the Linux function utimes.
I debugged the Linux touch command and saw it calls another more modern function: utimensat(0, NULL, NULL, 0). It also calls dup2and duplicates the file descriptor.
So I built my own touch method in Java:
long time = System.currentTimeMillis();
FileTime fileTimeNow = FileTime.fromMillis(time);
BasicFileAttributeView fileAttributeView = Files.getFileAttributeView(derivative.toPath(), BasicFileAttributeView.class);
fileAttributeView.setTimes(fileTimeNow, fileTimeNow, fileTimeNow);
This throws an Exception too (Operation not permitted).
Internally it calls utimensat(69, NULL, [{1538666780, 483000000}, {1538666780, 483000000}], 0).
I can not set null on .setTimes(...). This call gets ignored. And there is no Java-way to duplicate a file descriptor (dup2). So I can not test further steps to make it more like Linux' touch.
How to make this working when a file uses ACL? I don't want to run external programs (touch).
If the file is not written concurrently, you can open it, read its first byte, and write it back again at offset zero. This will update the modification time of the file without requiring ownership permissions.
(By the way, the ACL looks really curious, particularly the other:: rw- part.)
Here's man utimensat:
Permissions requirements
To set both file timestamps to the current time (i.e., times is NULL, or both tv_nsec fields specify UTIME_NOW), either:
the caller must have write access to the file;
the caller's effective user ID must match the owner of the file; or
the caller must have appropriate privileges.
To make any change other than setting both timestamps to the current time (i.e., times is not NULL, and neither tv_nsec field is UTIME_NOW and neither tv_nsec field is UTIME_OMIT), either condition 2 or 3 above must
apply.
You have #1, but not #2 or #3. If you ask touch to explicitly set the time to the current timestamp, it fails as well:
$ getfacl test | sed -e "s/$USER/myuser/"
# file: test
# owner: root
# group: root
user::rw-
user:myuser:rwx
group::r--
mask::rwx
other::r--
$ touch -d "#$(date +%s)" test
touch: setting times of ‘test’: Operation not permitted
I don't have any good suggestions for what to do instead though. You could either make a no-op change to the file, or call touch as an external command:
String path="some path";
// See https://stackoverflow.com/a/52651585 for why we're not doing this via Java
int result = Runtime.getRuntime().exec(new String[] { "touch", "--", path }).waitFor();
if(result != 0) throw new IOException("Can't update timestamp");
I am trying to run an implementation a jason code that is using some Internal Actions. The interpreter is showing that it was not possible to find the "java" code of the internal action, as showed:
Server running on http://191.36.8.42:3272
[aslparser] [peleus.asl:29] warning: The internal action class for 'org.soton.peleus.act.plan(Goals)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.plan
[aslparser] [peleus.asl:42] warning: The internal action class for 'org.soton.peleus.act.isTrue(H)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.isTrue
[peleus] Could not finish intention: intention 1: +des([on(b3,table),on(b2,b3),on(b1,b2)])[source(self)] <- ... org.soton.peleus.act.plan(Goals); !checkGoals(Goals); .print("Goals ",Goals," were satisfied") /
{Goals=[on(b3,table),on(b2,b3),on(b1,b2)]}Trigger: +des([on(b3,table),on(b2,b3),on(b1,b2)])[noenv,code(org.soton.peleus.act.plan([on(b3,table),on(b2,b3),on(b1,b2)])),code_line(29),code_src("peleus.asl"),error(action_failed),error_msg("no environment configured!"),source(self)]
[peleus] Adding belief clear(table)
This mas2j file is as following:
MAS peleus {
infrastructure: Centralised
agents:
peleus;
}
Part of agent code (written by Felipe Meneguzzi) is showed bellow:
//The next line is line 28
+des(Goals) : true
<- org.soton.peleus.act.plan(Goals);
!checkGoals(Goals);
.print("Goals ",Goals," were satisfied").
+!checkGoals([]) : true <- true.
//The next line is line 40
+!checkGoals([H|T]) : true
<- .print("Checking ", H);
org.soton.peleus.act.isTrue(H);
!checkGoals(T).
I guess it is about the folder structure, how to set up Jason to search for java files in specific locations?
The folders structure is like this:
Peleus\src\org\soton\peleus for java files
Peleus\examples for mas2j and asl tested project
It all depends on how you are executing the application.
If you are using java, the CLASSPATH should be defined to include the missing classes.
if you are using jason script (that uses Ant), the .mas2j file should include the class path as well.
More on that in the FAQ. Notice that CLASSPATH is where .class files are found, not .java source code files. The error regards a missing class, not a missing source code.
these are the last lines of log and io hope anybody can help me cause i am neewbie but really wanna learn this to make my own roms for me and my friends
I have search a lot of time on google but need a bit more cause i dont make any changes its the original source code sync´d 1:1
where i must make changes ? and what i must change?
im sorry for my bad english i am german.
Copy: apicheck (/home/schnittenberg/slim/out/host/linux-x86/obj/EXECUTABLES/apicheck_intermediates/apicheck)
Install: /home/schnittenberg/slim/out/host/linux-x86/bin/apicheck
Checking API: checkpublicapi-last
Checking API: checkpublicapi-current
/home/schnittenberg/slim/out/target/common/obj/PACKAGING/public_api.txt:1700: error 17: Field android.R.id.monitor_box has changed value from 16908334 to 16908337
/home/schnittenberg/slim/out/target/common/obj/PACKAGING/public_api.txt:1706: error 17: Field android.R.id.seek_bar has changed value from 16908335 to 16908338
/home/schnittenberg/slim/out/target/common/obj/PACKAGING/public_api.txt:22817: error 3: Added class SlimSeekBarPreference to package android.preference
/home/schnittenberg/slim/out/target/common/obj/PACKAGING/public_api.txt:25299: error 5: Added public field android.provider.Settings.Global.POLICY_CONTROL_SELECTED
/home/schnittenberg/slim/out/target/common/obj/PACKAGING/public_api.txt:25509: error 5: Added public field android.provider.Settings.System.USE_NON_INTRUSIVE_CALL
/home/schnittenberg/slim/out/target/common/obj/PACKAGING/public_api.txt:25511: error 5: Added public field android.provider.Settings.System.VOLUME_ADJUST_SOUND
/home/schnittenberg/slim/out/target/common/obj/PACKAGING/public_api.txt:35624: error 4: Added public method android.view.inputmethod.EditorInfo.formalTextInput
You have tried to change the API from what has been previously approved.
To make these errors go away, you have two choices:
1) You can add "#hide" javadoc comments to the methods, etc. listed in the
errors above.
2) You can update current.txt by executing the following command:
make update-api
^^^^^^^^^^^^^^^^^^
NO. NO. STOP BEING LAZY. SERIOUSLY.
DO NOT DO THIS in CM. THIS IS A LIE. IT WILL BREAK THINGS.
To submit the revised current.txt to the main Android repository,
you will need approval.
build/core/tasks/apicheck.mk:62: recipe for target '/home/schnittenberg/slim/out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp' failed
make: *** [/home/schnittenberg/slim/out/target/common/obj/PACKAGING/checkpublicapi-current-timestamp] Error 38
make failed to build some targets (01:18 (mm:ss))
OUT_DIR=/home/schnittenberg/slim/out
find: "dummy": Datei oder Verzeichnis nicht gefunden
build/core/Makefile:46: warning: overriding recipe for target '/home/schnittenberg/slim/out/target/product/amami/system/etc/mkshrc'
build/core/base_rules.mk:550: warning: ignoring old recipe for target '/home/schnittenberg/slim/out/target/product/amami/system/etc/mkshrc'
No private recovery resources for TARGET_DEVICE amami
Docs droiddoc: /home/schnittenberg/slim/out/target/common/docs/doc-comment-check
frameworks/base/core/java/android/widget/SeekBar.java:43: error 101: Unresolved link/see tag "ProgressBar#setMax(int)" in android.preference.SlimSeekBarPreference
frameworks/base/telecomm/java/android/telecom/TelecomManager.java:36: error 108: Link to hidden class: PhoneAccount label=PhoneAccount
DroidDoc took 329 sec. to write docs to /home/schnittenberg/slim/out/target/common/docs/doc-comment-check
build/core/droiddoc.mk:158: recipe for target '/home/schnittenberg/slim/out/target/common/docs/doc-comment-check-timestamp' failed
make: *** [/home/schnittenberg/slim/out/target/common/docs/doc-comment-check-timestamp] Error 45
make failed to build some targets (06:51 (mm:ss)) ####
Platform: Windows 7 x64
JDK version: 7.0.25 x64 or 7.0.45 x64
JDK installation path:
C:\Java\jdk725 or default c:\Program Files\Java\jdk1.7.0_25\
Spring Framework Release: 3.2.4 or 3.2.5
UAC: enabled or disabled
gradlew build (after gradlew):
:referenceHtmlMulti FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':referenceHtmlMulti'.
Failed to compile stylesheet. 59 errors detected.
Try:
Run with --info or --debug option to get more log output.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':referen
ceHtmlMulti'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecute(ExecuteActionsTaskExecuter.java:46)
..
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: javax.xml.transform.TransformerConfigurationException: Failed to comp
ile stylesheet. 59 errors detected.
at com.icl.saxon.PreparedStyleSheet.prepare(PreparedStyleSheet.java:136)
at com.icl.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryI
mpl.java:127)
at com.icl.saxon.TransformerFactoryImpl.newTransformer(TransformerFactor
yImpl.java:79)
..
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:61)
... 70 more
BUILD FAILED
My question is: why did my build fail?
The problem happens when :referenceHtmlMulti task is executing.
If we look in groovy class we will see that XSLT transformation is used to create docbook-reference. Despite the fact, that Saxon is used (TransformerFactoryImpl is selected) the choosen SAXParserFactory is org.apache.xerces.jaxp.SAXParserFactoryImpl (I wonder why not to use com.icl.saxon.aelfred.SAXParserFactoryImpl).
IF we look what implementation of xerces is used by gradle we will see xercesImpl-2.9.1.jar, which is old enough.
Now let's find class URI in xerces sources. It represents a Uniform Resource Identifier (URI). On line 1134 we can find
else if (!isURICharacter(testChar)) {
throw new MalformedURIException(
"Opaque part contains invalid character: " + testChar);
}
Now let's look how this function works:
private static boolean isURICharacter (char p_char) {
return (p_char <= '~' && (fgLookupTable[p_char] & MASK_URI_CHARACTER) != 0);
}
We can see that function will return true if char comparision will return true also. But that means rather close limits of chars (from code 0 - 126 (~)). But what about non US-ASCII character set?
Let's read RFC 2396 about non us-ascii characters (that can exist in your windows path, representing your local language or can be found in account name, under which gradle unpacks itself and works): other catagory - The Unicode characters that are not in the US-ASCII character set, are not control characters (according to the Character.isISOControl method), and are not space characters (according to the Character.isSpaceChar method) (Deviation from RFC 2396, which is limited to US-ASCII). The set of all legal URI characters consists of the unreserved, reserved, escaped, and other characters.
So. URI identification fails. And that is the place where build code fails.
There are 2 solutions:
To make your account name or path consist only of US-ASCII characters.
To patch URI class (for example, by rewriting function isURICharacter)
I'm trying to implement the Ruby Java Bridge (RJB) gem to talk to JVM so that I can run the Open-NLP gem. I have Java installed and running on Windows 8. All indications, at least those I know of, are that Java is installed and operational. But, attempts to use RJB fail with the message "can't create Java VM". (I do sometimes get "undefined method `dlopen' for Fiddle:Module" in other cases, which is also indecipherable.)
I initially just installed JDK per defaults. Due to my 64-bit system, this installed 64-bit Java. I wasn't sure whether or not Ruby and RJB would talk to this, so I installed the 32-bit JRE. However, the error is the same.
Is there any further test I can run to ensure that JVM is working outside of Ruby?
Can someone tell me what I might need to do to run Windows/Ruby/RJB/JVM?
Thanks...
I am running Windows 8 with BitNami Rubystack and Ruby 1.9.3p448.
Java seems to be available according to testjava.jsp:
This is the code, including the URL where I found it:
class FiddleTry
# http://devjete.wordpress.com/2011/01/31/installing-rjb-1-3-4-on-windows-7-32bit-wo-vc/
require 'rjb'
out = Rjb::import('java.lang.System').out <== Line 5 is here
out.print('Hello Rjb from ')
p out._classname
end
Here are the error messages:
C:/Users/Richard/RubymineProjects/Utilities/fiddle_try.rb:5:in `import': can't create Java VM (RuntimeError)
from C:/Users/Richard/RubymineProjects/Utilities/fiddle_try.rb:5:in `<class:FiddleTry>'
from C:/Users/Richard/RubymineProjects/Utilities/fiddle_try.rb:1:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
I cannot find any additional information as to why it "can't create Java VM". It would really help if additional information was available to me. I would appreciate either that information or a fix for this. Thanks...
EDIT TO ADD INFORMATION REGARDING OPEN-NLP REQUIREMENT FOR RJB...
This is the code I am trying to run, taken from Github/Open-nlp:
class OpenNlpSample
ENV['JAVA_HOME'] = "C:/Program Files/Java/jdk1.7.0_25" if ENV['JAVA_HOME'].nil?
ENV['LD_LIBRARY_PATH'] = "C:/Program Files/Java/jdk1.7.0_25/bin; C:/Program Files (x86)/Java/jre7" if ENV['LD_LIBRARY_PATH'].nil?
# Load the module
require 'open-nlp'
gem_bin = File.join(Gem.loaded_specs['open-nlp'].full_gem_path, 'bin/')
# Set an alternative path to look for the JAR files.
# Default is gem's bin folder.
# OpenNLP.jar_path = '/path_to_jars/'
# OpenNLP.jar_path = File.expand_path('../../ruby/lib/ruby/gems/1.9.1/gems/open-nlp-0.1.4/bin',__FILE__)
OpenNLP.jar_path = gem_bin
# Set an alternative path to look for the model files.
# Default is gem's bin folder.
# OpenNLP.model_path = '/path_to_models/'
OpenNLP.model_path = gem_bin
# Pass some alternative arguments to the Java VM.
# Default is ['-Xms512M', '-Xmx1024M'].
# OpenNLP.jvm_args = ['-option1', '-option2']
OpenNLP.jvm_args = ['-Xms512M', '-Xmx1024M']
# Redirect VM output to log.txt
OpenNLP.log_file = 'log.txt'
# Set default models for a language.
# OpenNLP.use :language
OpenNLP.use :english
=begin
Examples
Simple tokenizer
=end
OpenNLP.load
sent = "The death of the poet was kept from his poems."
tokenizer = OpenNLP::SimpleTokenizer.new
tokens = tokenizer.tokenize(sent).to_a
# => %w[The death of the poet was kept from his poems .]
#Maximum entropy tokenizer, chunker and POS tagger
OpenNLP.load
chunker = OpenNLP::ChunkerME.new
tokenizer = OpenNLP::TokenizerME.new
tagger = OpenNLP::POSTaggerME.new
sent = "The death of the poet was kept from his poems."
tokens = tokenizer.tokenize(sent).to_a
# => %w[The death of the poet was kept from his poems .]
tags = tagger.tag(tokens).to_a
# => %w[DT NN IN DT NN VBD VBN IN PRP$ NNS .]
chunks = chunker.chunk(tokens, tags).to_a
# => %w[B-NP I-NP B-PP B-NP I-NP B-VP I-VP B-PP B-NP I-NP O]
#Abstract Bottom-Up Parser
OpenNLP.load
sent = "The death of the poet was kept from his poems."
parser = OpenNLP::Parser.new
parse = parser.parse(sent)
parse.get_text.should eql sent
parse.get_span.get_start.should eql 0
parse.get_span.get_end.should eql 46
parse.get_child_count.should eql 1
child = parse.get_children[0]
child.text # => "The death of the poet was kept from his poems."
child.get_child_count # => 3
child.get_head_index #=> 5
child.get_type # => "S"
#Maximum Entropy Name Finder*
OpenNLP.load
text = File.read('./spec/sample.txt').gsub!("\n", "")
tokenizer = OpenNLP::TokenizerME.new
segmenter = OpenNLP::SentenceDetectorME.new
ner_models = ['person', 'time', 'money']
ner_finders = ner_models.map do |model|
OpenNLP::NameFinderME.new("en-ner-#{model}.bin")
end
sentences = segmenter.sent_detect(text)
named_entities = []
sentences.each do |sentence|
tokens = tokenizer.tokenize(sentence)
ner_models.each_with_index do |model,i|
finder = ner_finders[i]
name_spans = finder.find(tokens)
name_spans.each do |name_span|
start = name_span.get_start
stop = name_span.get_end-1
slice = tokens[start..stop].to_a
named_entities << [slice, model]
end
end
end
=begin
Loading specific models
Just pass the name of the model file to the constructor. The gem will search for the file in the OpenNLP.model_path folder.
=end
OpenNLP.load
tokenizer = OpenNLP::TokenizerME.new('en-token.bin')
tagger = OpenNLP::POSTaggerME.new('en-pos-perceptron.bin')
name_finder = OpenNLP::NameFinderME.new('en-ner-person.bin')
# etc.
#Loading specific classes
#You may want to load specific classes from the OpenNLP library that are not loaded by default. The gem provides an API to do this:
# Default base class is opennlp.tools.
OpenNLP.load_class('SomeClassName')
# => OpenNLP::SomeClassName
# Here, we specify another base class.
OpenNLP.load_class('SomeOtherClass', 'opennlp.tools.namefind')
# => OpenNLP::SomeOtherClass
end
At this point in the code:
=begin
Examples
Simple tokenizer
=end
OpenNLP.load
The call chain is to dl.rb, fiddle.rb and jar_loader.rb. jarloader.rb starting line 43:
# Load Rjb and create Java VM.
def self.init_rjb
::Rjb::load(nil, self.jvm_args)
set_java_logging if self.log_file
end
At this point, I get the same error creating JVM. So, I reverted to attempting to run RJB. The error chain is as follows:
Fast Debugger (ruby-debug-ide 0.4.17, ruby-debug-base19x 0.11.30.pre12) listens on 127.0.0.1:59488
Uncaught exception: can't create Java VM
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:45:in `load'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:45:in `init_rjb'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:38:in `load_jar_rjb'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/jar_loader.rb:27:in `load'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:63:in `load_jar'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:71:in `block in load_default_jars'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:68:in `each'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:68:in `load_default_jars'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/bind-it-0.2.7/lib/bind-it/binding.rb:55:in `bind'
D:/BitNami/rubystack-1.9.3-12/ruby/lib/ruby/gems/1.9.1/gems/open-nlp-0.1.4/lib/open-nlp.rb:14:in `load'
C:/Users/Richard/RubymineProjects/Utilities/open_nlp_sample.rb:32:in `<class:OpenNlpSample>'
C:/Users/Richard/RubymineProjects/Utilities/open_nlp_sample.rb:1:in `<top (required)>'
First, I needed to uninstall Java x64 and install JDK x586 for 32-bit support.
Then, set JAVA_HOME as follows:
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_40
and add JAVA_HOME to my path:
%JAVA_HOME%\bin;C:\Program Files (x86)\Java\jre7\bin;
This resolved the "can't create Java VM' problem.
Setting $DEBUG=false, or commenting out the line, eliminated all other messages. $DEBUG mode displays error messages that may be caught and resolved so they can be ignored.
After the "can't create Java VM" problem was resolved, all other error messages were of this type and therefore were spurious.
JetBrains support for Rubymine solved this problem for me. They are very good, especially Serge, and I recommend their products because of their support.