Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Codes run as JNLP with IcedTea but don't from within Eclipse!
Codes run as JNLP with IcedTea but don't from within Eclipse! [message #1772492] Mon, 11 September 2017 13:31 Go to next message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
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

Re: Codes run as JNLP with IcedTea but don't from within Eclipse! [message #1772507 is a reply to message #1772492] Mon, 11 September 2017 16:10 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
No doubt you're still forgetting that the folder structure must match the package names in the *.java files so these files should be in InternalFrameDemo/src/components/*.java but this has been explained to you before.

Ed Merks
Professional Support: https://www.macromodeling.com/
[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 Go to previous message
RajibKumar Bandopadhyay is currently offline RajibKumar BandopadhyayFriend
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

Previous Topic:Invalid certificate while installing eclipse
Next Topic:Eclipse Oxygen is broken: Splash shows on startup, then Eclipse closes
Goto Forum:
  


Current Time: Fri Apr 26 07:39:26 GMT 2024

Powered by FUDForum. Page generated in 0.08252 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top