Codes run as JNLP with IcedTea but don't from within Eclipse! [message #1772492] |
Mon, 11 September 2017 13:31 |
RajibKumar Bandopadhyay Messages: 58 Registered: July 2014 |
Member |
|
|
I have these JNLP file running fine from my IcedTea but not from within Eclipse separately. One compiles, the other doesn't.
I have checked the subdirectory within the Workspace folder at ../workspace/InternalFrameDemo
The ../src folder has two files, InternalFrameDemo.java and MyInternalFrame.java, attached herewith.
The .project file is: <?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>InternalFrameDemo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription> and the .classpath file is <?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="bin"/>
</classpath>
But the compiler stops at Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at InternalFrameDemo.main(InternalFrameDemo.java:144)
Also, the command $ javac InternalFrameDemo.java yields:
InternalFrameDemo.java:114: cannot find symbol
symbol : class MyInternalFrame
location: class components.InternalFrameDemo
MyInternalFrame frame = new MyInternalFrame();
^
InternalFrameDemo.java:114: cannot find symbol
symbol : class MyInternalFrame
location: class components.InternalFrameDemo
MyInternalFrame frame = new MyInternalFrame();
^
2 errors
But the class file MyInternalFrame.class is already there, formed by $javac MyInternalFrame.java
Why is this so?
[Updated on: Sat, 16 September 2017 04:58] Report message to a moderator
|
|
|
|
[Solved] Codes run as JNLP with IcedTea but don't from within Eclipse! [message #1772527 is a reply to message #1772507] |
Tue, 12 September 2017 01:50 |
RajibKumar Bandopadhyay Messages: 58 Registered: July 2014 |
Member |
|
|
No, Sir! I remember your lesson here [Re: How to compile & run a multi-class & a complete program?] and also the subsequent posts.
But on hindsight, that lesson was just the opposite scenario! The notepad application did not have the package Notepad declared in the beginning, so there I had erroneously put all those files within the Notepad subdirectory under the root directory!
You had specifically stated: Ed Merks wrote: But these .java files don't declare a Notepad package; so they must be ad the root.
But I did not have the experience at that time to appreciate that your phrase "Notepad package" (quoted above) used the word "package" as a Keyword, not until reading your current post!
I did not know enough to understand that the declaration "package components;" at the very beginning meant that the source files had to be within a directory "components" under the root, and that the word "package" was a Keyword!
Now that I understand the whole scenario, I have assimilated it within my schema.
On hindsight I would've required a statement of the kind, "But these .java files don't declare the keyword 'package' in the declaration 'package Notepad' at the very beginning; so they must be at the root."
I apologise for making you write the second time. But the third time will never again occur, I assure you!
[Updated on: Fri, 15 September 2017 06:24] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.08205 seconds