Placing java file in src folder
hi my dear friends,
i am new to webdynpro , but i did some sample examples
ok fine,,, but i want to create xxx.java file . how to create that file
in src package how to place that .java file
please help me
thanks,
tony
hi Naga
Thanks for giving valuable information
my problem is solved
thanks
Similar Messages
-
Is it necessary to put .java file in 'bin' folder
when ever i am creating a .java file i have to put that in bin folder then only javac compiling the file.
otherwise its not compiling the file.
how can i compile my java file by putting in any folder of mine?
even if i am creating any folder inside the bin folder then also its not compiling my .java file.when ever i am creating a .java file i have to put
that in bin folder then only javac compiling the
file.That's a huge mistake. You should never do that.
otherwise its not compiling the file.
how can i compile my java file by putting in any
folder of mine?Add the Java /bin directory to your PATH so the operating system can find the javac.exe and java.exe apps.
even if i am creating any folder inside the bin
folder then also its not compiling my .java file.Then you've got a bigger problem. You must have compiler errors that you need to read and fix in your source code.
% -
No java file in application folder
After most recent update of Java, the Java does not work. Looked for Preference file in application file and there is not one. What do I do?
Applications > Utilities > java Preferences.
http://support.apple.com/kb/DL1572 Gives you an idea what the update did if it was 2012-006
However, I understood there was a later one than that which removed Java SE6 altogether and provided a redirect to Oracle's website to download the latest Java 7 version.
Can't find that one on Support Downloads now? -
Java File Missing while import
Hi,
When I try to import a project into the workspace, only one java file is missing(showing error : R3View does not exist).
Before I import the project, the folder contains that java file in gen_wdp folder. but after import, it doesnt. It automatically got deleted. I dint know how it happens. I have taken one copy of that java file. So I have created a new java file(R3View.java) in gen_wdp folder and copied the code. Now it works fine. I have taken this backup folder.
When I try to import it next time, the same problem exists. Actually the folder contains all the java files before import.
Why this problem occurs? Kindly help me out.
Regards,
KalaiHi,
As abhilash stated the folder gen_wdp always have generated code based upon web dynpro metadata.
You cann't contribute code by placing any souce file in this directory. That you have to do in some source directory that is generally "src\packages".
If you place code in gen_wdp folder and reload the project, do a dc build, or simple project build ....... the file will get deleted.
Regards,
Ashwani Kr Sharma -
Problem in compiling a java file
hello...
i placed all my java file in the folder C:\nmt
and i run the following command to compile it...
javac -sourcepath C:\nmt testabc.java
now it showing an error..
cannot read testabc.java
javac -sourcepath C:\nmt -d C:\nmt testabc.java
to produce the output in the C:\nmt folder but it shows the same message...pls tell what worng here??
samYou don't have a testabc.java file in the directory.
-
Creating .jnlp files from .java files
Last resort: Ask on the forums. I'm having a lot of trouble creating .jnlp files with only a .java file. For some reason if I do create project, the project does not run correctly, but when I make the file and run the file alone, it works perfectly fine. Most of the tutorials that I have read online ask me to do weird manifest .class stuff (in order to make JAR files, which i have failed to do even after attempting to make one after 3 hours). And still, when it comes to make the .jnlp file, I don't quite understand anything. When putting it on the web, I'm planning not to use php (html is in my mind right now), and I have aborted every single attempt at making the JAR files and whatnot.
At this point, I'm not asking for anything other than a link to a tutorial that actually works, because all that I have tried (for the JAR files, especially) have been giving me errors. By the way, one really bothersome output that comes up is the "illegal option: j" when I use the Tool for the JAR file, and I have no idea what that means--I google it and find nothing. The .java itself extends JPanel, so it isn't really an applet.
How to: Run an Applet
Create an Applet Class by clicking File > New > File > File Type > Java Classes > Applet Class.
Enter a name and path for the applet and click Finish.
Build the file by pressing F7.
Create an Applet HTML file by clicking File > New > File > File Type > Other > HTML Applet.
Enter a name and path for the applet and click Finish.
Open the HTML file in JCreator and modify the applet tag to match the name of the applet class.
Open the Project Settings window and select the HTML file as the Run parameter.
Click the Run Project button.It isn't really a code, but I tried doing this and the HTML Applet said code = ".class" Again, I don't have a class for the file. And when you do the "File > New > File > File Type > Java Classes > Applet Class," you get the .java file and a folder that says "components, with two classes in it. I was completely befuddled.http://forum.java.sun.com/thread.jspa?messageID=9783924
-
Reaching the java file outside the package?
Hi how can i reach the java(or class) files outside the packge(i mean one top folder)
For example i have a java file in a folder named tech and i want to reach a java file in the folder named support which is under tech folder is something like that possible if it is how?Then tech should also be in a package.
So it would be..
package tech;
import tech.support.*;and
package tech.support;
import tech.*; -
How to move files from one folder to another folder in webdynpro java for sap portal
Dear Experts,
I wan to move files from one folder to another folder in SAP portal 7.3 programmatically in webdynpro java.
My requirement is in my portal 1000 transport packages is their. Now i want to move 1 to 200 TP's into Archive folder.
Can you please help me how to do in through portal or wd java ...
Regards
ChakriHello,
Do you know what the difference between copying a file this way :
** Fast & simple file copy. */
public static void copy(File source, File dest) throws IOException {
FileChannel in = null, out = null;
try {
in = new FileInputStream(source).getChannel();
out = new FileOutputStream(dest).getChannel();
long size = in.size();
MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size);
out.write(buf);
} finally {
if (in != null) in.close();
if (out != null) out.close();
================SECOND WAY============
AND THIS WAY:
// Move file (src) to File/directory dest.
public static synchronized void move(File src, File dest) throws FileNotFoundException, IOException {
copy(src, dest);
src.delete();
// Copy file (src) to File/directory dest.
public static synchronized void copy(File src, File dest) throws IOException {
InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest);
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
in.close();
out.close();
And which is better? I read up on what each kind of does but still a bit unclear as to when it is good to use which.
Thanks in advance,
JavaGirl -
Creating XML file in Project folder thru Java Program
hi,
i need one help. i need to create XML file in web://<Project Folder> in xmII thru Java Program. i created one java code and i am able to access XML file that is in c drive. i created jar file for this and placed as action block in Transaction and this working fine. but problem arises when i give file path in java code as web://<folder name>/file.xml which is in Web folder of project in xMII.
How to access the file that is inside web folder from java code.
regards
senthilHi Senthil,
you can address the files that inside the MII workbench are viewed as "web://..." like this:
http://<server>:<port>/XMII/CM/<Project>/<Folder>/<Filename>
The workbench helps you find the correct filename:
- open the WEB tab in the workbench
- right-click on the filename
- select "Copy Link" from the pop up
Now you have the correct link in your clipboard.You can use the "web://" only inside MII.
Michael -
Getting error when placing jsp file in tomcat root folder
hello experts,
i have developed an application on netbeans 6.1 for mail.
It is working perfect when i run it from netbeans, but when we copy those jsp files to ROOT folder of tomcat5.5 server, it is showing me following error.
rg.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 14 in the jsp file: /Mailer1.jsp
Session cannot be resolved to a type
11: <%!
12: String nam = null, email = null, suggestion = null;
13: RequestDispatcher disp = null;
14: public static Session sess = null;
15:
16: %>
17: <%
An error occurred at line: 38 in the jsp file: /Mailer1.jsp
sess cannot be resolved
35:
36: //SecurityManager security = System.getSecurityManager();
37:
38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
39: {
40: protected PasswordAuthentication getPasswordAuthentication()
41: {
An error occurred at line: 38 in the jsp file: /Mailer1.jsp
Session cannot be resolved
35:
36: //SecurityManager security = System.getSecurityManager();
37:
38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
39: {
40: protected PasswordAuthentication getPasswordAuthentication()
41: {
An error occurred at line: 38 in the jsp file: /Mailer1.jsp
javax.mail.Authenticator cannot be resolved to a type
35:
36: //SecurityManager security = System.getSecurityManager();
37:
38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
39: {
40: protected PasswordAuthentication getPasswordAuthentication()
41: {
An error occurred at line: 45 in the jsp file: /Mailer1.jsp
sess cannot be resolved
42: return new PasswordAuthentication("[email protected]","ratatouille");
43: }
44: });
45: sess.setDebug(true);
46:
47:
48: //sess = Session.getDefaultInstance(props);
An error occurred at line: 50 in the jsp file: /Mailer1.jsp
Transport cannot be resolved to a type
47:
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
An error occurred at line: 50 in the jsp file: /Mailer1.jsp
sess cannot be resolved
47:
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
An error occurred at line: 51 in the jsp file: /Mailer1.jsp
Message cannot be resolved to a type
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
An error occurred at line: 51 in the jsp file: /Mailer1.jsp
MimeMessage cannot be resolved to a type
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
An error occurred at line: 51 in the jsp file: /Mailer1.jsp
sess cannot be resolved
48: //sess = Session.getDefaultInstance(props);
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
An error occurred at line: 52 in the jsp file: /Mailer1.jsp
Message.RecipientType.TO cannot be resolved to a type
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
55: msg.setContent(suggestion, "text/plain");
An error occurred at line: 52 in the jsp file: /Mailer1.jsp
InternetAddress cannot be resolved to a type
49: //sess.setDebug(true);
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
55: msg.setContent(suggestion, "text/plain");
An error occurred at line: 53 in the jsp file: /Mailer1.jsp
InternetAddress cannot be resolved to a type
50: Transport trans = sess.getTransport();
51: Message msg = new MimeMessage(sess);
52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
53: msg.setFrom(new InternetAddress(this.email));
54: msg.setSubject(this.nam);
55: msg.setContent(suggestion, "text/plain");
56: trans.connect();
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
i m unable to find out the solution,
please help me to resolve it.
thnaks.Hi shams.hq,
I don't understand how you bother to copy an application in your server directories. It's really piece of cake to deploy with Tomcat.
All you have to do :
- with Netbeans, you build the project : a WAR file will be created in the dist directory of your project;
- launch the server, if it's not running;
- with your web browser, connect to the Tomcat Manager;
- from there, you may upload and deploy the WAR file of your project.
Et voilà ! Tomcat will unzip the WAR and install your classes and libraries at the right place. -
Placing file in a folder on FTP
Hi,
Could any body please guide me about the following query:
Can we directly place a file to a folder on the FTP through my ABAP program or i need to use Connect and then FTP_COPY.
Please guide.
Thanks and RegardsHello,
After establishing a connection , first set the path where you want to place the contents of an internal table on the location on the FTP. To change the directory path
CONCATENATE 'cd ' lv_path INTO lv_cmd SEPARATED BY space.
lv_path contains the path on which you need the file.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = lv_handle
command = lv_cmd
TABLES
data = mdata[]
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4
Now the directory is the where you need the file to be placed.
Now call the FM FTP_R3_TO_SERVER . Pass the handle and filename with internal table to this FM
Regards,
Sachin -
Placing the file in the Dynamic folder
Dear All,
We are having the some requirment like.
We developed one Adaptermodule to pick up the Excel sheet and reads and create one file for each sheet. These files are placing in one Target folder.
Here we are developing the one more communication channel to pickup the file from this folder and trying to place the file in the particular folder based on the File name.
Now my requirement is we need to place the file in the Target folder based on the File Name.
For ex if the File name is INT0001.txt then we need to place this file in usr\sap\450\in\INT0001\ folder and
if the file name is HIRING.txt then we need to place the file in usr\sap\450\in\HIRING\
if the file name is INT009.txt then we need to place the file in usr\sap\450\in\INT009\
Here we are not using any IR objects in this development.
Please give any suggistions to solve this problem.
Regards
Goli SridharHi,
Try Variable Substitution method.Refer the link for use of Variable Substitution..
[http://help.sap.com/saphelp_nw70/helpdata/EN/bc/bb79d6061007419a081e58cbeaaf28/content.htm]
In file access parameter you should select create target directory.
you should have read,write access for creating folder.
Regards,
Prakasu -
Hi
I am looking for a column named Commodity Code from the EBS data base. After a lot of investigation, and in one stage we decided to do some customization for the column. But we find that column in the flat file named 'FILE_UNSPSC' in the src files folder. Now If at all I want some column name 'xyz' from EBS, If at all that column is in FLAT FILES format in SRC folder, Is there any process that we can check directly in what flat file this column is in, And I think Data Lineage is not 100 % accurate , Is there any other process.
Thanks in AdvanceNow If at all I want some column name 'xyz' from EBS.If the column is source from eBS table then pull it from table no need to look at the src folder, make sure you are not using Universal folder.
And I think Data Lineage is not 100 % accurate 100% agree with you, to make 100% development suppose to be more accurate as per Informatica standards
Is there any other process.Not clear with Q but Manual process is the best (in general)
If helps mark -
Ant ; how to move nonjava files to the output folder whn i comile java file
Hi when i compile my java file using javac ant task, i want to move non java file to the same output folder where the dot class file are stored. example if a package has 2 java file and a .properties file, when i javac task compile that package .properties file should move where the .class files are moving. can anyone help me please
An ant target can carry out multiple tasks. You need to put the <javac> and <copy> tasks in the same target in your ant file.
-
Zipping files in a folder using java.util.zip
hi guys,
does any body has the java code for
zipping files in a folder
hi guys,
actually i want to zip no of files in a folder .the folder can also have sub folder
and after zipping when i extract the files manually i should
maintain the same folder structure
does any body has the code
please reply me soon its a bit urgenthi smeee
i tried running ur code but its not working
here the command
java c:\abc\ zzz.zip
its saying
no files or directories even though there's the
directory present
what's the solution Hi,
Oops that was because of the error check added at the last moment..
Anyway, You need to use the following command to run it :
java ZipUtility c:\abc c:\zzz.zip
Please use the following corrected code:
Class to zip file(s).
Requires jdk1.3.1.
To run use the following command:
java ZipUtility <directory or file to be zipped> <name of zip file to be created>
Please specify absolute path names as its parameters while running this program.
import java.util.zip.*;
import java.io.*;
public class ZipUtility {
ZipOutputStream cpZipOutputStream = null;
String strSource = "";
String strTarget = "";
String strSubstring = "";
public static void main(String args[]) {
if( args == null || args.length < 2) {
System.out.println("Usage: java ZipUtility <directory or file to be zipped> <name of zip file to be created>");
return;
ZipUtility udZipUtility = new ZipUtility();
udZipUtility.strSource = args[0];
udZipUtility.strTarget = args[1];
udZipUtility.zip();
private void zip(){
try
File cpFile = new File (strSource);
if (!cpFile.isFile() && !cpFile.isDirectory() ) {
System.out.println("\nSource file/directory Not Found!");
return;
if (cpFile.isDirectory()) {
strSubstring = strSource;;
} else {
strSubstring = "";
cpZipOutputStream = new ZipOutputStream(new FileOutputStream(strTarget));
cpZipOutputStream.setLevel(9);
zipFiles( cpFile);
cpZipOutputStream.finish();
cpZipOutputStream.close();
System.out.println("\n Finished creating zip file " + strTarget + " from source " + strSource);
}catch (Exception e){
e.printStackTrace();
private void zipFiles(File cpFile) {
if (cpFile.isDirectory()) {
File [] fList = cpFile.listFiles() ;
for (int i=0; i< fList.length; i++){
zipFiles(fList) ;
} else {
try {
String strAbsPath = cpFile.getAbsolutePath();
String strZipEntryName ="";
if (!strSubstring.equals("") ){
strZipEntryName = strAbsPath.substring(strSource.length()+1, strAbsPath.length());
} else {
strZipEntryName = cpFile.getName();
byte[] b = new byte[ (int)(cpFile.length()) ];
FileInputStream cpFileInputStream = new FileInputStream (cpFile) ;
int i = cpFileInputStream.read(b, 0, (int)cpFile.length());
ZipEntry cpZipEntry = new ZipEntry(strZipEntryName);
cpZipOutputStream.putNextEntry(cpZipEntry );
cpZipOutputStream.write(b, 0, (int)cpFile.length());
cpZipOutputStream.closeEntry() ;
} catch (Exception e) {
e.printStackTrace();
Maybe you are looking for
-
Resize multiple objects at once
How do I set the height of mutliple objects at once? I'm creating a form and the I want to ensure all the text fields are the some height.
-
Best Practice Implementation in landscape
Hi, We had requirement for implementing SAP BP in our landscape on ECC system. Do we require to install Bp's on all three systems (Dev, Qas, Prd). Or the configuration change request movement into QAS and Prod is sufficient with out implementing BP's
-
How local interfaces work in EJBs
How exactly local interfaces work in EJBs and how should I use them ? Thank you.
-
I'm attempting to alter a table from a Master. I can't select the table. I've used the Text tool and tried Table->Select but nothing is available. When I use the Select all option, the table and a few other items on my master are not selected and the
-
I Need Help as I'm a beginner in Creative Cloud
I can't download Lightroom 5 after purchasing it. I need help, anyone please?