Can't run java program in Eclipse - javaw error [message #1785427] |
Fri, 13 April 2018 16:49 |
Nikos LazCob Messages: 9 Registered: November 2016 |
Junior Member |
|
|
I have been using Eclipse a long time for Java programming. I stopped using it for a while and i came back to it yesterday and upon running a program i get the following output:
Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
I know this is the help screen of `javaw` which is very strange. It doesn't seem to see my file. I am on Windows 8.1 x64.
- Eclipse can build just fine
- I can both compile and run java files from the terminal
- latest java 8 jvm jre installed from Java website today v1.8.0_162
- System EnvVars:
1. CLASSPATH: `.;C:\Program Files\Java\jdk1.8.0_162\lib;C:\Program Files\Java\jre1.8.0_162\lib;C:\aspectj1.8\lib`
2. JAVA_HOME `C:\Program Files\Java\jdk1.8.0_162`
3. PATH includes: `C:\Program Files\Java\jdk1.8.0_162\bin`
- I've looked everything at my eclipse.ini and it looks fine. It's almost identical to the equivalent eclipse i have for Linux which works great.
- I have gone to the "Debug" tab to see what command Eclipse actually executes, and its `C:\Program Files\Java\jre1.8.0_162\bin\javaw.exe` which looks good, it's in my default "Installed JRE"
- I set all Eclipse settings back to their defaults
I've been troubleshooting this all day. I now give up on Eclipse Java, unless someone can help with this. This has occurred once again in the past but i solved it back then, by simply updating Java.
|
|
|
|
|
|
|
|
|
|
Re: Can't run java program in Eclipse - javaw error [message #1785453 is a reply to message #1785451] |
Fri, 13 April 2018 22:58 |
Nikos LazCob Messages: 9 Registered: November 2016 |
Junior Member |
|
|
I am at a loss, truly.
I uninstalled Java and eclipse completely, rebooted. Reinstalled java, setup envvars, setup eclipse again new folder, new workspace, configured and i still get the exact same error.
I can still compile & run from command line though.
When the error occurred initially i had no -vm options, i added them later trying to fix the issue, it made no difference. The newly installed eclipse doesn't have a -vm option either.
[Updated on: Fri, 13 April 2018 23:04] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03404 seconds