Comments (32)
as Default:
Running "htmllint:all: task
Error; Error: not found: java
Although java is running on my windows 7 system.
-rich
from grunt-html.
I've tested it on my own Windows 7 machine and it works fine. I need more information to reproduce the issue.
from grunt-html.
Same problem on Win 8.1. Tried a fresh npm install in Windows default cmd with admin rights -- without success. I'm pretty sure it works on my Windows7 machine. I will try to verify that.
Any ideas?
from grunt-html.
Have you checked if you can run java --version
outside of grunt on the command line?
See also this StackOverflow entry, which has comments asking the same question: http://stackoverflow.com/questions/20264628/grunt-htmllint-error-cant-find-java
from grunt-html.
This works:
$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
from grunt-html.
Just to be sure though, are you running grunt
and java -version
from the same command line?
from grunt-html.
Yes.
from grunt-html.
What happens if you run java -jar [path to jar]
(drag and drop the actual JAR to be safer)?
from grunt-html.
This seems to work when using command line. I'm not sure what is meant with drag and drop?
$ java -jar node_modules/grunt-html/vnu.jar
Usage:
java -jar vnu.jar [--entities] [--errors-only] [--no-stream]
[--format gnu|xml|json|text] [--help] [--html] [--schema URL]
[--verbose] [--version] FILES
java -cp vnu.jar nu.validator.servlet.Main 8888
java -cp vnu.jar nu.validator.client.HttpClient FILES
For detailed usage information, use "java -jar vnu.jar --help" or see:
http://validator.github.io/
To read from stdin, use "-" as the filename, like this: "java -jar vnu.jar - ".
from grunt-html.
Well that is very strange....
from grunt-html.
Can you try this?
npm install which
node -e 'console.log(require("which").sync("java"));'
On my system that logs /usr/bin/java
. You should get something...
from grunt-html.
Getting an error:
$ node -e 'console.log(require("which").sync("java"));'
d:\GIT\_jQuery\jquery-ui\node_modules\which\which.js:83
throw new Error("not found: "+cmd)
^
Error: not found: java
at Function.whichSync [as sync] (d:\GIT\_jQuery\jquery-ui\node_modules\which\which.js:83:9)
at [eval]:1:30
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:456:26)
at evalScript (node.js:532:25)
at startup (node.js:80:7)
at node.js:902:3
from grunt-html.
Is Java in your PATH
?
from grunt-html.
No. I added it and tried a PATH var like this but without success:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\Java\jre7\bin
One question: do I need java AND javac (aka JRE or SDK)? It seems I've only installed the runtime.
from grunt-html.
You should only need the JRE
from grunt-html.
@fnagel did you ever get this resolved?
from grunt-html.
Nope, but I could try again... it worked before so...
from grunt-html.
Tried this again for datepicker (after merging master). Deleted node_modules directory and rerun npm install with admin privileges.
It still fails but I get a different error message:
Running "htmllint:all" (htmllint) task
>> Error: Exception in thread "main" java.lang.StackOverflowError
>> at com.thaiopensource.relaxng.impl.DuplicateAttributeDetector.startChoice(Unknown Source)
>> at com.thaiopensource.relaxng.impl.ChoicePattern.checkRestrictions(Unknown Source)
from grunt-html.
@fnagel the latest version should fix this problem
from grunt-html.
You may have to explicitly install this module if the version in package.json is out of date, so
npm install grunt-html
from grunt-html.
I've updated the jQueryUI package json to grunt-html 1.4.0 and did same installation process as described above. Same error.
Installing with npm install grunt-html
doesn't help either.
from grunt-html.
WHich version of Windows, 64 or 32 bits? What version of Java and what architecture of java (32 or 64)
from grunt-html.
Windows: 8.1 Pro 64bit
Java: 1.7.0_55 32bit
from grunt-html.
This stack size thing is a nightmare...
from grunt-html.
@fnagel It would probably help a lot to install 64bits JRE on a 64bits system but I'll see if there something that can be done.
from grunt-html.
@jzaefferer perhaps we have to detect the Java architecture instead of the system one.
from grunt-html.
It would probably help a lot to install 64bits JRE on a 64bits system
That should be worth a try.
perhaps we have to detect the Java architecture instead of the system one.
My installed java responds to java -version
(--version
is unrecognized, ugh). Parsing this looks terrible:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Gonna reopen this anyway.
from grunt-html.
From my research, we have too look for 64-Bit Server VM
If it's not present then it's 32bits
from grunt-html.
I've tried to change to 64bit architecture: installed 64bit, changed system path variable and rebooted -- command line still seems to use 32bit:
$ java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b14)
Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)
I will give it another try by removing java completely and then reinstall it.
from grunt-html.
I have absolutely no clue why but grunt htmllint (testcase is jQuery UI master branch) works now.
I did not change anything java specific (since my last comment). Can somebody confirm it#s working on Windows 8.1?
Anyway, I'm happy as I'm finally able to run all tests for jQuery UI.
from grunt-html.
"Did you try turning it off and on again?"
Let's hope this is now resolved and we can leave this ticket closed.
from grunt-html.
We still need to add a fix to detect the Java version. That's an issue that come's up fairly often with our developers.
from grunt-html.
Related Issues (20)
- wrong errors reported on Grunt-reporter HOT 1
- Every regexp I tried doesn't work
- Use vnu-jar package HOT 2
- Problem with angular 2 directive e.g *ngIf, (click), [class.selected]
- Please test 16.12.27 release candidate of vnu.jar HOT 26
- Grunt html vs. nu html checker HOT 1
- RegEx for ignore as array HOT 3
- Switch to eslint
- Write report in case of success HOT 1
- Support the --no-langdetect flag for vnu-jar HOT 1
- Fix coverage
- Remove space from chunkify for the last item
- Enable ESLint's consistent return rule
- Finish repo transfer HOT 3
- Improve coverage
- Move to async/await
- When validating a large number of files, results from previous chunks sometimes get overwritten HOT 8
- Doesn't work on Travis anymore HOT 5
- Fatal error: Cannot read property 'replace' of undefined HOT 7
- The angularJS ignore option in the main readme.md does not work ! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-html.