Unable to add java files with package statement
Hi all,
I have the following problem. I add to my project(JBuilder8) a set of java files that
they have in their headers the statement...
package jp.gr.java_conf.tame.swing.table;except one with statement...
package jp.gr.java_conf.tame.swing.colorchooser;If i try to compile the project i get the following message many times for
each file...
"AttributiveCellRenderer.java": Error #: 901 : package
jp.gr.java_conf.tame.swing.table stated in source
C:\Development\JBProjects\cellspan\AttributiveCellRenderer.java does not
match directory . at line 4, column 36What i have to do to embed correctly the java files?
Thank you for advance, kostas.
Sounds like your source file is in the wrong directory. The directory the file's in has to match the package.
Similar Messages
-
BUG: error rebuilding SQLJ files along other java files with generic
I have done a rebuild on a package containing some SQLJ files, and (consistently) got the following error:
C:\TeleMessage\trunk\src\telemessage\db\impl\dbAdmin.sqlj
Error(44,18): Java Parsing. Encountered: <
Expected: <IDENTIFIER> ...; "[" ...; The error at the cursor in the given file is not possible, since there was no '<' there, and besides - if I non-aggresively changed the file, e.g. narrowed imports, changed whitespace or added comments - the error remained in the same location.
I went and done a search using regex in the package, for a line starting with 17 chars followed by a '<'.
I found it in one of the normal JAVA files (not-SQLJ), at line 44 (surprise!) - in a Java 5 generics declaration, e.g. Map<String,Integer>. the 18th character was indeed the '<'.
I'm guessing that the SQLJ translator (accidentally?) parses non-SQLJ files.
If this cannot be fixed, it is really bad - it is one thing that JDeveloper cannot support Java 5 language features because of its dependancy in the SQLJ translator (which is not known to be upgraded until version 11g if at all), but the inability to compile SQLJ files in a project containing other non-SQLJ java files with Java 5 features is hard.
I could only workaround this by rebuilding SQLJ files one at a time!
I also have another type of error, when rebuilding the same project in a higher-level pacakge (root or "Application Sources"):
C:\TeleMessage\trunk\src\dbtools\CallbackNumberFiller.sqlj
Error(24,8): Missing semicolon.
Error(24,8): Unbalanced curly braces.Again, the specified file could not be the one to blame - the location of the error is in the middle of the public modified keyword in a method declaration; nothing is neither missing nor unbalanced.
This appears to be different, as it pops in the log near the end of the build process, when the JSPs are being built, specfically during the time the message log fills with "writing <...>" lines (after "translating <...>" and "compiling <...>".
I can consistently reproduce both cases - please advise how I can help you find out what causes this.
Regards,
Yaniv KundaFirst of all, this bug not JDeveloper's problem, but the SQLJ team's.
You can read more posts about this:
Re: BUG: Cannot translate SQLJ files with Java5 generics code
Re: How to use SQLJ with Java 1.4 and 1.5?
Re: SQLJ discontinued??
And if we're at it, this is strange - I can't seem to find the oracle doc you quoted...
SQLJ 11g? The latest release is a part of JPublisher 10.2 available from
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
I also didn't find anything on google on 11g, nor about the part number you specified.
Didn't find any Java 1.5 supporting SQLJ translators from other vendors as well.
Do you have any link to this statement?
But if we examine this bug again, the problem involves JDeveloper passing Java 5 featured JAVA files to the SQLJ translator.
Isn't there a way to instruct the translator to use CLASS files compiled by a normal Java 5 compiler, instead of trying to compile the files itself?
Regards,
Yaniv Kunda -
Unable to open PDF files with Adobe Reader, Mac trying to open files with QuickTime instead, but not succeeding. HELP!
Hi BDAqua,
Thanks for the info, I dragged a PDF to desktop ctrl-, get info. change all to open with adobe.
Problem solved, many thanks for a quick response.
Barry69 -
Unable to open d800 files with cs6 and camera raw 8.3
unable to open d800 files with cs6 and camera raw 8.3
Have you used Nikon Transfer on those files? Early versions are known to corrupt files so that ACR can't read them. Nikon has since fixed the bug so new versions are safe.
Here's a thread (with a fix) in the Lightroom forum: https://forums.adobe.com/message/6253962 -
How to remove files with package manager?
CanI remove file with package manager
For example if there is a file /apps/cq/ui/widgets/source/widgets/form/RichText.js in Author Instance A, then I delete RichText.js file using crxde. Then I create a package remove_richtextjs.zip with filter /apps/cq/ui/widgets/source/widgets/form/
Then I open another instance Author Instance B, there is an exact same file /apps/cq/ui/widgets/source/widgets/form/RichText.js. Is it possible that if I apply remove_richtextjs.zip, an RichText.js will be removed from Author Instance B?
ThanksYou don't have to pay to remove files. Just drag them to the Trash and Empty the Trash.
-
Unable to add certain files to iTunes Library or iPod
For some reason, whenever I try to add some files with an .avi format to my iTunes Library or iPod just won't let me. I've tried the add file/folder option and it simply doesn't work. It does absolutely nothing. It won't let me drag/drop to the Library, only iPod. But when I try drag/dropping it to the iPod (as I've succesfully been able to do in the past with other files)I get an:
"[File Name].avi" was not coppied to the iPod "[iPod Name]" because it cannot be played on this iPod.
Thanks in advance for the help.sorry all. i restarted iTunes after i downloaded and installed QT and everything started working. total retardedness on my end
-
Associating .java files with JDeveloper in Windows
Is there some mechanism via by which I can load a .java file in a currently instance of JDeveloper (905p) on Windows (2K) from the command line?
I want to be able to associate .java files with JDeveloper with appropriate actions defined, so that when I double-click on a .java file in Windows Explorer, it gets opened up in the currently running JDeveloper instance ... rather than opening a new instance of JDeveloper?
ThanksHi,
There's no easy way to do this at the moment. However, in the 10g production release, functionality has been added to associate .java files (and other artefacts e.g. .jpr files) with JDeveloper.
Thanks,
Brian
JDev Team -
Ok, so im pretty new to this JSP lark and have a question.
I have Java Classes resting in .java files, i need to know how
do i link these files to my .jsp page so that the classes/variable etc.
declared with the java files are recognised when they are come
across in the .jsp file.
I dont know if I have explained that properly.Just include this statement at the top of your jsp:
<%@page import="yourpackage.yourclass"%>
The .java files should of course be compiled into .class files prior to using (and you don't include the extension when importing). -
How to deal with #ifdef in .java files with javadoc tool?
My .java file included some '#ifdef' & '#endif' sentence. So when I used javadoc tool to generate the .html files, error happened. Can anyone give me some indication how to resolve the problem, provided that the source code can not be changed because it was written by others. Waiting for your reply and thanks in advance!
Hi, got the same problem, have stuck for all day on this and yield no progress.
my source code contain
#ifdef
and
#endif
it is source code (not comment), the only compile with a special preprocessing tool call
"sjpp.jar".
I need to generate Javadoc there.
the error is
[javadoc] C:\TEMP\cellml_visual_checkout\cellml_api\java\src\org\cellml\CNode.
java:101: illegal character: \35
[javadoc] #ifdef JENA
if I pass in encoding parameter when I do javadoc,
say, -encoding "PROPROC",
then there is different error
[javadoc] Constructing Javadoc information...
[javadoc] Standard Doclet version 1.5.0
[javadoc] Building tree for all the packages and classes...
[javadoc] java.lang.Error
[javadoc] at sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEn
coder.java:361)
[javadoc] at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.ja
va:381)
[javadoc] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136)
[javadoc] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:146)
[javadoc] at java.io.OutputStreamWriter.write(OutputStreamWriter.java:204)
[javadoc] at java.io.PrintWriter.write(PrintWriter.java:384)
[javadoc] at java.io.PrintWriter.write(PrintWriter.java:401)
[javadoc] at java.io.PrintWriter.print(PrintWriter.java:532)
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDocletWriter.printLink
(HtmlDocletWriter.java:1045)
[javadoc] at com.sun.tools.doclets.formats.html.MethodWriterImpl.printRetu
rnType(MethodWriterImpl.java:361)
[javadoc] at com.sun.tools.doclets.formats.html.MethodWriterImpl.writeSign
ature(MethodWriterImpl.java:148)
[javadoc] at com.sun.tools.doclets.internal.toolkit.builders.MethodBuilder
.buildSignature(MethodBuilder.java:176)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
any help will be appreciated.
thanks
Bill -
Managing java files and packages
Hi,
I am just starting out with java and have reached the stage where I want to store my files in packages and the correct directory structure. I have read through the sun link below and have a question they seam to miss. They say that .java and .class files should be kept in separate places. ie sources and classes directories with the package directory names below. But I have found that unless you have the .class files you are referencing in the same directory as the .java files when you come to compile you will get an error so they have to be stored in the same directory???.. Does this make sence or have I gotten it all wrong.
Thanks
Joolz
http://java.sun.com/docs/books/tutorial/java/interpack/managingfiles.htmlYou should put path containing your classes in your classpath. There is a -classpath option in javac.
-
Unable to add aspx file to document library using REST and JSOM in SharePoint Hosted App
Hi,
I am unable to add an aspx file to document library. I was actually trying to create a WIKI page and upload to Pages library but that wasn't working so I tried simple document library. It keeps failing with Access Denied error. I have checked
the blocked types and aspx is not included. I can upload it directly from the browser so that shouldn't be the case. I have read that it can be achieved with CSOM but I need this to work with a SharePoint Hosted App. Here is my JSOM:
factory = new SP.ProxyWebRequestExecutorFactory(appweburl);
context.set_webRequestExecutorFactory(factory);
appContextSite = new SP.AppContextSite(context, hostweburl);
oWeb = appContextSite.get_web();
oList = oWeb.get_lists().getByTitle('Documents');
fileCreateInfo = new SP.FileCreationInformation();
fileCreateInfo.set_url("mywiki.aspx");
fileCreateInfo.set_content(new SP.Base64EncodedByteArray());
fileContent = "<%@ Page Inherits=\"Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=15.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c\" %> <%@ Reference VirtualPath=\"~TemplatePageUrl\"
%> <%@ Reference VirtualPath=\"~masterurl/custom.master\" %>";
for (var i = 0; i < fileContent.length; i++) {
fileCreateInfo.get_content().append(fileContent.charCodeAt(i));
newFile = oList.get_rootFolder().get_files().add(fileCreateInfo);
context.load(newFile);
context.executeQueryAsync(function () {
alert('yo');
}, function (sender, args) {
alert(args.get_message() + '\n' + args.get_stackTrace());
If I change the file extension to "txt", it works. Same with REST implementation, it works with "txt" but fails with "aspx". Maybe what I am trying to do will not work using JSOM or REST. Any suggestions? Your
help is always appreciated.
Regards,
kashifYour code works fine in both my on-premises and SharePoint Online. I have given the app full control, so I suspect this is a permissions issue. I would check your permissions on your appmanifest. Must be something to do with publishing permissions. Try
giving full control and work the permissions down.
Blog | SharePoint Field Notes Dev Tools |
SPFastDeploy | SPRemoteAPIExplorer -
How to create a .java file with multiple classes
I have all the below classes declared in a file say ABC.java under
a common package called somepackage
Abstract class A
Void abstract metod1();
Void metod2();
Class B
void method3();
Void method4();
Class C
void method1();
Void method2();
In Client.Java
On compiling the Client.Java I get errors
Import somepackag.*;
Class Samp extents A
void Method1()
Public class Client
A a1 =new Samp(); //error undeclared class A
B b1 = new B1();//error undeclared class B
C c1 = new C1();//error undeclared class C
is it possible to have all the class declared in one file ( i dont need mutiple classes, as this file will be autogenerated , i need all classes in one file) and use the classes inside this in the some client app
regards
MPPeetzore wrote:
As long as you have only one public class and your .java file is named after it you shouldn't have any problem.I did exactly that, but still i get the same error "Cannot find symbol"
i have used the import command on top as import somepackage.*;
Edited by: mpjava on Jun 2, 2009 1:29 AM
Edited by: mpjava on Jun 2, 2009 1:30 AM -
Add WaterMarkFrom File with 0 points from top leaving some space in the top
Hi,
I tried to add a water mark image from a file with 0 points from the top. But still it is having some extra space on the top.
The issue is that I need to place a text and an image at same vertical position from the top of pdf. But image leaves some extra space.
Can you please help me with this
Thanks,
VKP1I cannot duplicate your experience. When I add a watermark from a file, and
the file has content that fills the page completely, I do not see any white
space between the top or the left edge when I place it at the top left
corner, with 0pt offset.
How are you placing the watermark?
Karl Heinz Kremer
PDF Acrobatics Without a Net
[email protected]
http://www.khkonsulting.com -
Unable to Load CSV file with comma inside the column(Sql Server 2008)
Hi,
I am not able load an CSV file with Comma inside a column.
Here is sample File:(First row contain the column names)
_id,qp,c
"1","[ ""0"", ""0"", ""0"" ]","helloworld"
"1","[ ""0"", ""0"", ""0"" ]","helloworld"
When i specify the Text Qualifier as "(Double quotes) it work in SQL Server 2012, where as fail in the SQL Server 2008, complaining with error:
TITLE: Microsoft Visual Studio
The preview sample contains embedded text qualifiers ("). The flat file parser does not support embedding text qualifiers in data. Parsing columns that contain data with text qualifiers will fail at run time.
BUTTONS:
OK
I need to do this in sql server 2008 R2 with Service pack 2, my build version is 10.50.1600.1.
Can someone let me know it is possible in do the same way it is handle in SQL Server 2012?
Or
It got resolved in any successive Cumulative update after 10.50.1600.1?
Regards HarshHello,
If you have CSV with double quotes inside double quotes and with SSIS 2008, I suggest:
in your data flow you use a script transformation component as Source, then define the ouput columns id signed int, Gp unicode string and C unicode string. e.g. Ouput 0 output colmuns
Id - four-byte signed
gp - unicode string
cc - unicode string
Do not use a flat file connection, but use a user variable in which you store the name of the flat file (this could be inside a for each file loop).
The user variable is supplied as a a readonly variable argument to the script component in your dataflow.
In the script component inMain.CreateNewOutputRows use a System.IO.Streamreader with the user variable name to read the file and use the outputbuffer addrow method to add each line to the output of the script component.
Between the ReadLine instraction and the addrow instruction you have to add your code to extract the 3 column values.
public override void CreateNewOutputRows()
Add rows by calling the AddRow method on the member variable named "<Output Name>Buffer".
For example, call MyOutputBuffer.AddRow() if your output was named "MyOutput".
string line;
System.IO.StreamReader file = new System.IO.StreamReader( Variables.CsvFilename);
while ((line = file.ReadLine()) != null)
System.Windows.Forms.MessageBox.Show(line);
if (line.StartsWith("_id,qp,c") != true) //skip header line
Output0Buffer.AddRow();
string[] mydata = Yourlineconversionher(line);
Output0Buffer.Id = Convert.ToInt32(mydata[0]);
Output0Buffer.gp = mydata[1];
Output0Buffer.cc = mydata[2];
file.Close();
Jan D'Hondt - SQL server BI development -
Unable to add XML files to genericObjects Folders using Webdav - cFolders
Hi All
I am not able to add XML files to genericObjects Folders using Webdav in cFolders
What could be the reason.. When I try to copy, it says "cant read from source file"
Regards,
AbyYes.. I downloaded the ECN.XML file from se80, edited and then used "Uplload and replace"..
Also I did the same thing to add some more vocabulary in the cfx text XML, so that it would reflect correctly to map with Additional attributes in the PDX profile.
Regards,
Aby
Maybe you are looking for
-
Hi, could some one please tell me how to reset my Iphone 5 ,after i had fully reset back to factory settings ,whilst I left find my Iphone in settings, when I tried to do just this my old e-mail and Apple id was still registering the device with the
-
When viewing a note in the bridge how do you switch to landscape full screen mode?
When viewing notes in the Bridge, there are two modes after pressing messages. One is portrait where the note being viewed shows in full screen after going to it from the inbox list. The other is in landscape where the inbox list is on the left and
-
I know that everyone here is just going to redirect me to another post on the forum... I have already looked at the 15 most recent pages of posts and I have tried everything that might have anything to do with my problem. Whenever I connect my iPod T
-
Itunes Artwork Problems with Lion
I've noticed some problems lately with Lion and artwork from Mp3 files no longer being seen in the Finder. Im a new Mac user (only a few weeks) and had lots of issues with itunes from the data transfer but finally was able to get everything working
-
How do I find my iPad MAC address to connect to the Internet!