Unable to compile and run SAP/Rfc on solaris: RfcInstallUnicodeStructureU:
Hi All,
After trying a lot I want to post it here as the last chance.
- I have the unicode version of rfcsdk installed at /usr/sap/rfcsdk
- I downloaded and un-tarred saprfc-0.36. I could create 'saprfc.so' without any error.
- I believe the function call 'RfcInstallUnicodeStructureU' used by saprfc.c is located in a library 'librfcu.a'.
sapscp@moe$ strings librfcu.a | grep RfcInstallUnicodeStructureU
RfcInstallUnicodeStructureU
RfcInstallUnicodeStructureU
I am able to create the library saprfc.so without any issue but I see the following error when I try to execute test.rb.
skarumur@reality$ ruby test.rb
dirs: ["./ext/saprfc", "/usr/local/lib/ruby/site_ruby/1.8", "/usr/local/lib/ruby/site_ruby/1.8/sparc-solaris2.8", "/usr/local/lib/ruby/site_ruby", "/usr/local/lib/ruby/1.8", "/usr/local/lib/ruby/1.8/sparc-solaris2.8", "."]
ld.so.1: ruby: fatal: relocation error: file /usr/local/lib/ruby/site_ruby/1.8/sparc-solaris2.8/saprfc.so: symbol RfcInstallUnicodeStructureU: referenced symbol not found
Killed
NOTE: My LD_LIBRARY_PATH has the directory of librfcu.a
Thanks for any help,
Sri
1. I do have a library librfcum.so. I guess it's not the one.
I changed the rfcum to rfcu in ext/saprfc/extconf.rb and reran clean;config;setup and install. I still have the issue.
2. Not sure if it's related but I see a warning:
ld: warning: file /usr/sap/rfcsdk/lib/librfcu.a(rfcilib.o): wrong ELF class: ELFCLASS64
Was wondering if this is related to 64/32 bit issues. There is no 32 bit unicode version. I tried 32 bit non-unicode version of rfcsdk but it starts pumping hundreds of errors like below during the compile time:
[code]<unknown> 0x40510 /usr/sap/rfcsdk_32_non_unicode/lib/librfc.a(rscpa0lib.o)
<unknown> 0x40520 /usr/sap/rfcsdk_32_non_unicode/lib/librfc.a(rscpa0lib.o)
<unknown> 0x40528 /usr/sap/rfcsdk_32_non_unicode/lib/librfc.a(rscpa0lib.o)
<unknown> 0x40538 /usr/sap/rfcsdk_32_non_unicode/lib/librfc.a(rscpa0lib.o)
<unknown> 0x40540 /usr/sap/rfcsdk_32_non_unicode/lib/librfc.a(rscpa0lib.o)
<unknown> 0x40588 /usr/sap/rfcsdk_32_non_unicode/lib/librfc.a(rscpa0lib.o)
[/code]
3. Probably not related to this issue but I wonder why I see the error about missing libsapu16 though I have libsapu16.so.
<i>checking for main() in -lsapu16... no
DID NOT find libsapu16 - this may cause problems ...
</i>
[code]
List of libraries in my rfcsdk
$ ls -l /usr/sap/rfcsdk/lib
total 31024
-rwxr-xr-x 1 ps8adm sapsys 8947608 Mar 2 14:16 libicudata.so.26
-rwxr-xr-x 1 ps8adm sapsys 1497560 Mar 2 14:16 libicui18n.so.26
-rwxr-xr-x 1 ps8adm sapsys 1244744 Mar 2 14:16 libicuuc.so.26
-rw-rw-r-- 1 ps8adm sapsys 10888632 Mar 4 14:04 librfcu.a
-rwxrwxr-x 1 ps8adm sapsys 8085144 Mar 5 15:29 librfcum.so
-rwxrwxr-x 1 ps8adm sapsys 241344 Mar 2 13:46 libsapu16.so
-rwxrwxr-x 1 ps8adm sapsys 220024 Mar 2 19:58 libsapu16_mt.so
-rwxrwxr-x 1 ps8adm sapsys 550528 Mar 2 20:09 libsapucum.so
END List of libraries in my rfcsdk
[/code]
[code]
BEGIN Output from setup.rb
Script started on Wed May 09 09:25:42 2007
<b>skarumur@reality$ ruby setup.rb config --with-unicode=yes</b>
---> lib
---> lib/SAP
<--- lib/SAP
<--- lib
---> ext
---> ext/saprfc
/usr/local/bin/ruby /export/home/skarumur/tmp/saprfc-0.36/ext/saprfc/extconf.rb --with-unicode=yes
invoking with-unicode ...
Modified CFLAGS: -g -O2 -Wall -DSAPwithUNICODE
Modified CFLAGS: -g -O2 -Wall -DSAPwithUNICODE
Modified CPPFLAGS:
Modified LDFLAGS:
Modified LIBPATH: $(libdir)
checking for saprfc.h... no
adding default rfcsdk location for headers ...
checking for saprfc.h... yes
checking for sapitab.h... yes
checking for main() in -lc... yes
checking for main() in -lm... yes
checking for main() in -ldl... yes
checking for main() in -lpthread... yes
checking for main() in -lstdc++... yes
checking for main() in -lrfcu... yes
checking for main() in -lsapu16... no
DID NOT find libsapu16 - this may cause problems ...
Existing Compile protocol: $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $< ...
/export/home/skarumur/tmp/saprfc-0.36/ext/saprfc/extconf.rb:80: warning: already initialized constant COMPILE_C
modified Compile protocol: $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -E -c $< > $<.ii
perl ../../u16lit.pl -le $<.ii
$(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c $<.i
mv $<.o $(TARGET).o ...
creating Makefile
<--- ext/saprfc
<--- ext
<b>skarumur@reality$ ruby setup.rb setup</b>
---> lib
---> lib/SAP
<--- lib/SAP
<--- lib
---> ext
---> ext/saprfc
make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/sparc-solaris2.8 -I/export/home/skarumur/tmp/saprfc-0.36/ext/saprfc -fPIC -g -O2 -Wall -DSA
PwithUNICODE -I/usr/sap/rfcsdk/include -DHAVE_SAPRFC_H -DHAVE_SAPITAB_H -E -c saprfc.c > saprfc.c.ii
perl ../../u16lit.pl -le saprfc.c.ii
WARNING (u16lit.pl): Overriding autodetected big-endian mode !
gcc -I. -I. -I/usr/local/lib/ruby/1.8/sparc-solaris2.8 -I/export/home/skarumur/tmp/saprfc-0.36/ext/saprfc -fPIC -g -O2 -Wall -DSA
PwithUNICODE -I/usr/sap/rfcsdk/include -DHAVE_SAPRFC_H -DHAVE_SAPITAB_H -c saprfc.c.i
/usr/sap/rfcsdk/include/sapuc.h:844: warning: 'sccsidU16' defined but not used
mv saprfc.c.o saprfc.o
gcc -shared -L'/usr/local/lib' -Wl,-R'/usr/local/lib' -o saprfc.so saprfc.o -lrfcu -lstdc++ -lpthread -ldl -lm -lc -ldl -lcryp
t -lm -lc
ld: warning: file /usr/sap/rfcsdk/lib/librfcu.a(rfcilib.o): wrong ELF class: ELFCLASS64
<--- ext/saprfc
<--- ext
<b>skarumur@reality$ sudo ruby setup.rb install</b>
rm -f InstalledFiles
---> lib
mkdir -p /usr/local/lib/ruby/site_ruby/1.8
---> lib/SAP
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/SAP
install Rfc.rb /usr/local/lib/ruby/site_ruby/1.8/SAP
install Tools.rb /usr/local/lib/ruby/site_ruby/1.8/SAP
install Ticket.rb /usr/local/lib/ruby/site_ruby/1.8/SAP
install Object.rb /usr/local/lib/ruby/site_ruby/1.8/SAP
<--- lib/SAP
<--- lib
---> ext
---> ext/saprfc
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/sparc-solaris2.8
install saprfc.so /usr/local/lib/ruby/site_ruby/1.8/sparc-solaris2.8/.
<--- ext/saprfc
<--- ext
<b>skarumur@reality$ ruby test/test.rb</b>
dirs: ["./ext/saprfc", "/usr/local/lib/ruby/site_ruby/1.8", "/usr/local/lib/ruby/site_ruby/1.8/sparc-solaris2.8", "/usr/local/lib
/ruby/site_ruby", "/usr/local/lib/ruby/1.8", "/usr/local/lib/ruby/1.8/sparc-solaris2.8", "."]
ld.so.1: ruby: fatal: relocation error: file ./ext/saprfc/saprfc.so: symbol RfcInstallUnicodeStructureU: referenced symbol not fo
und
Killed
skarumur@reality$ exit
script done on Wed May 09 09:28:37 2007
END Output from setup.rb
[/code]
Similar Messages
-
How to Compile and run Smart Card Application
hi
any one can help me reagrding Javacard API. i download the JavaCard Development Kit from sun and install on my machine but i didn't get all java files and class files of JavaCard API. where i obtain those files so my application get compile and run.
pls help me i m new in this technology.
Thanks in Advance.My program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
I've given my pgm and the thing I've got when I compiled it.
Test.java
package com.cert;
public class Test
public void display()
System.out.println("Hai");
F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
javac: no source files
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
Plz help me.
thanks in advance
Ambika -
How to compile and run servlets in Eclipse?
Does somebody known how can I compile and run servlets in Eclipse IDE? I've added and configured Tomcat's plugin. I've created a project with my example servlets source, and I don't know what farther. How do I have compile it without main method? I must add web.xml file from Tomcat's directory into projects in Eclipse and modify it?
THX ChudzikTry googling for "eclipse servlet", surely someone has written instructions.
-
How can I compile and run other java classes from within an application?
Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
I have tried using this command to compile:
Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
...and this one to run:
Runtime.getRuntime().exec ("c:\\programs\\java className");
...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
Adrian ( ...in distress!! )public class JavaCompiler{
public static void main(String[] args)throws Exception{ //sorry bout the laziness
if(args == null || args.length != 1){
System.out.println("Usage: java JavaCompiler MyClass.java");
System.exit(0);
String className = args[0];
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("javac " + className); //consider setting cpath for this
p.waitFor();
//now try to run after it is done.
p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
p.waitFor();
//do some other stuff
}This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out. -
How to Set up the variables and others to compile and Run Java Programs
Hello,
I have just downloaded the jdk1.6.0_07 and jre1.6.0_07 and installed it in C:\Program files\Java in my Windows XP ,So please tell me how to sett up the enviroment variables etc to compile and run Java Programs from Command Prompt.
thanksTo set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows on Microsoft Windows:
1. Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System on Windows 2000.
2. Click Advanced > Environment Variables.
3. Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is:
C:\Program Files\Java\jdk1.6.0_<version>\bin -
How to compile and run java files on a mac using command line?
can someone tell me or link me to some article on how to compile and run java files from command line on a mac? I have mac OS X leopard
What do you mean by "where to put them" ? What do you want to put anywhere ?
Have you read Peter's comment in brackets ? Perhaps you have a classpath problem ?
Edited by: Michael_Knight on Aug 31, 2008 4:23 AM -
How to compile and run package programs in Java
Hi,
I want to know how to compile and run the package programs in Java using -d. instead of creating the package folder manually.
eg:
package Test;
class test1
public void disp()
//Any code;
I want to compile this without creating the folder ' Test ' manually. that is if we use -d with javac the Test folder will be created automatically. I need the format of -d
could anyone please help me.
Thanks in Advance ,
AmbikaMy program Test.java in F:\Tomcat5\webapps\Ambika\WEB-INF\Classes. I compiled in the format below. I got like this. What should I do for this? But yesterday I compiled like this only, It compiled and the folder com\cert\Test.class is created. Today again I compiled the pgm after deleting the already created folder 'com\cert', I got the error like this.
I've given my pgm and the thing I've got when I compiled it.
Test.java
package com.cert;
public class Test
public void display()
System.out.println("Hai");
F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>javac -d F:\Tomcat5\webapps\Ambika\WEB-INF\Classes\Test.java
javac: no source files
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
F:\Tomcat5\webapps\Ambika\WEB-INF\Classes>
Plz help me.
thanks in advance
Ambika -
How to develope, compile and run soap service
we want to implement the soap sevice in our concern.So its very diffcult to develope the soap program.I dont know about the soap service.please give me a input about soap and how to develope soap programs.Pls also give some sample programs and how to compile and run those programs.In our concern we are using UNIX operating system.
Thanking you
Yours faithfully
SaranYou should start by posting questions regarding web services on the correct forum ;)
Next go to xml.apache.org and read the documentation regarding Apache Axis.
You could also take a look at the Spring Framework's support for web services.
You could even take a look at the Sun Web Service tutorials.
The above resources have plenty of examples and sample code. -
Compiling and running problems
Dear Friends:
I believe I encountered a very difficult situation when I try to run Fortran
files in Sun Sparc Solaris 8.0.
I would like to describe it, hopefully someone can give me some suggestions.
The the files I try to run is fortran 77 files developed originally for VAX
machine, later on there are Linux and Unix adaptions (but not for Sun
Solaris). The source code is open source from the link:
http://www.webmo.net/support/mopac_linux.html. I have compiled and run
successfully in Redhat 9.0 (means same results as the samples). The linux
dependency is gcc (or egcs) glibc (or libc) f2c.
Also it is compatible with SGI IRIX unix system with the dependency MIPSpro Fortran 77 and MIPSpro C as the link http://www.webmo.net/support/mopac_sgi.html. I havenot tried it yet.
In sun solaris, I have tried g77, but even cannot compiled. With Apogee's
F77 (www.apogee.com), it can be compiled, but cannot run completely (terminate in the middle
process, i.e. without the complete output as the samples).
Could anyone take a time do a analysis and provide me any suggestions?
thanks a lot,
JustinJustin,
I downloaded the mopac tarball and compiled it on Sun Solaris using the Sun Studio 10 compiler. The code compiles successfully with only a small change to the included Makefile.
Change the original unix target as follows:
unix:
f77 -w -O -static *.f -o $(EXE)
becomes
unix:
f90 -f77 -w -O *.f -o $(EXE)
I noticed during the compilation that there were a number of BLAS and LAPACK routines that are being compiled into the application. The Sun Studio compilers include a high performance BLAS/LAPACK library called the Sun Performance Library which provides highly tuned versions of the BLAS/LAPACK routines called by this application. I would be more than happy to help you modify the source and makefile so that you can use these tuned routines and realize increased performance in this application.
I ran several of the data sets in the examples directory and they appeared to complete successfully. Since none of them run for more than a second or so, it's hard to say whether or not the tuned Performance Library will have a large impact on the performance or not.
If you are interested, please contact me : [email protected] -
Compiling and running a package
Hi
Iduring making a project i am facing a problem. I have two files under the directory c:\jdk1.3\ghosh\das, named as ghosh.java and das.java
they are like the folloing:
ghosh.java
package.java.das;
import java.io.*;
import.java.util.*;
public class ghosh
public static void main(String args[])
das dipak = new das();
dipak.prn();
das.java
package ghosh.das;
import java.io.*;
import java.util.*;
public class das
das();
public void prn()
System.out.println("Package");
If you please tell me the way to compile and & run this package, I will be highly thankful to you.
thanx in andvance.
sudiptaThe statement "package.java.das;" won't compile. Do you mean "package java.das;" or do you mean "package ghosh.das;"? The -d option might not give you the result you want. If you mean, ""package java.das;" and you compile with "-d c:\jdk1.3" then the compiler will create a directory named java in the jdk1.3 directory and create a .class file inside the java directory.
Depending on the package statement, you execute the ghosh class with "java java.das.ghosh" or "java ghosh.das.ghosh" -
Compile and run java programs in different directroy
Hi,
I often encounter many problems when I run java programs in the different directories. Like
javac -d dir_name a.java
java -cp dir_name a
Something wired often happens, such as, there is not a.java file in some directory, but javac -d dir_name a.java can still work or "java -cp dir_name a" often doesn't work. Moreover, file_name.jar is also a tough problem and solving compiling problems is often time-consuming.
So I hope to read something about how to compile and run java programs in different directory properly.
Could you pleae give me a detailed description for that or recommend a book or website?
Thanks a lot.Can you post a small amount of code that does not work, including the directory structure, and the error messages? Some one here can likely explain the problem.
-
Error in compiling and running a packaged application
Hi all,
I am new to java and studying alone java from sun's site.Now i am going through sun's step by step programming.From there i got a packaged Application named DiveLog which i wrote and saved in divelog directory in jdk1.2.2which is in C directory.
When i tried to compile it i got the error message as class Resource .java not found.But i have created the file Resource.java and saved in the same divelog directory.
somehow i get rid of the error and looked for the directory but class file is not there.So i understood that Compilation doesn't took place.
Can anyone help me to get rid of the error and compile and run the Application successfully.
Here is the DiveLog application i have written.
package divelog;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DiveLog
private JTabbedPane tabbedPane;
private JFrame dlframe;
public DiveLog()
dlframe = new JFrame("A Java(TM) Technology Dive Log");
dlframe.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0)
tabbedPane = new JTabbedPane(SwingConstants.LEFT);
tabbedPane.setBackground(Color.blue);
tabbedPane.setForeground(Color.white);
populateTabbedPane();
buildMenu();
dlframe.getContentPane().add(tabbedPane);
dlframe.pack();
dlframe.setSize(765,690);
dlframe.setBackground(Color.white);
dlframe.setVisible(true);
private void populateTabbedPane()
tabbedPane.addTab("Welcome",
null,
new Welcome(),
"Welcome to the Dive Log");
tabbedPane.addTab("Diver Data",
null,
new Diver(),
"Click here to enter diver data");
tabbedPane.addTab("Log Dives",
null,
new Dives(),
"Click here to enter dives");
tabbedPane.addTab("Statistics",
null,
new Statistics(),
"Click here to calculate dive statistics");
tabbedPane.addTab("Favorite Web Site",
null,
new WebSite(),
"Click here to see a web site");
tabbedPane.addTab("Resources",
null,
new Resources(),
"Click here to see a list" + "of resources");
private void buildMenu()
JMenuBar mb = new JMenuBar();
JMenu menu = new JMenu("File");
JMenuItem item = new JMenuItem("Exit");
item.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
System.exit(0);
menu.add(item);
mb.add(menu);
dlframe.setJMenuBar(mb);
public static void main(String[] args)
DiveLog dl = new DiveLog();Classpath problem. Read the old threads related to in the classpath problem.
/Sreenivasa Kumar Majji.
Hi all,
I am new to java and studying alone java from sun's
site.Now i am going through sun's step by step
programming.From there i got a packaged Application
named DiveLog which i wrote and saved in divelog
directory in jdk1.2.2which is in C directory.
When i tried to compile it i got the error message as
class Resource .java not found.But i have created the
file Resource.java and saved in the same divelog
directory.
somehow i get rid of the error and looked for the
directory but class file is not there.So i understood
that Compilation doesn't took place.
Can anyone help me to get rid of the error and compile
and run the Application successfully.
Here is the DiveLog application i have written.
package divelog;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class DiveLog
private JTabbedPane tabbedPane;
private JFrame dlframe;
public DiveLog()
dlframe = new JFrame("A Java(TM) Technology Dive
Dive Log");
dlframe.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0)
tabbedPane = new
e = new JTabbedPane(SwingConstants.LEFT);
tabbedPane.setBackground(Color.blue);
tabbedPane.setForeground(Color.white);
populateTabbedPane();
buildMenu();
dlframe.getContentPane().add(tabbedPane);
dlframe.pack();
dlframe.setSize(765,690);
dlframe.setBackground(Color.white);
dlframe.setVisible(true);
private void populateTabbedPane()
tabbedPane.addTab("Welcome",
null,
new Welcome(),
"Welcome to the Dive
"Welcome to the Dive Log");
tabbedPane.addTab("Diver Data",
null,
new Diver(),
"Click here to enter
"Click here to enter diver data");
tabbedPane.addTab("Log Dives",
null,
new Dives(),
"Click here to enter
"Click here to enter dives");
tabbedPane.addTab("Statistics",
null,
new Statistics(),
"Click here to calculate
"Click here to calculate dive statistics");
tabbedPane.addTab("Favorite Web Site",
null,
new WebSite(),
"Click here to see a web
"Click here to see a web site");
tabbedPane.addTab("Resources",
null,
new Resources(),
"Click here to see a
"Click here to see a list" + "of
t" + "of resources");
private void buildMenu()
JMenuBar mb = new JMenuBar();
JMenu menu = new JMenu("File");
JMenuItem item = new JMenuItem("Exit");
item.addActionListener(new
istener(new ActionListener()
public void actionPerformed(ActionEvent
ed(ActionEvent e)
System.exit(0);
menu.add(item);
mb.add(menu);
dlframe.setJMenuBar(mb);
public static void main(String[]
d main(String[] args)
DiveLog dl = new DiveLog(); -
Tutorial Step 8 - Compile and run Client
I have been unsuccessful in getting the client to run from the command prompt.
I have modified the compile and run bat files as follows"
COMPILE.BAT
c:\bea\jdk131_03\bin\javac -classpath ../../WEB-INF/lib/Investigate.jar;../../WEB-INF/lib/webserviceclient.jar;c:\bea\weblogic700\server\lib\webserviceclient.jar
*.java
RUN.BAT
c:\bea\jdk131_03\bin\java -cp .;../../WEB-INF/lib/Investigate.jar;c:\bea\weblogic700\server\lib\webserviceclient.jar;
InvestigClient
What am I missing????
===============
C:\bea\weblogic700\samples\workshop\applications\samples\tutorials\java_client>c
:\bea\jdk131_03\bin\java -cp .;../../WEB-INF/lib/Investigate.jar;c:\bea\weblogic
700\server\lib\webserviceclient.jar; InvestigClient
Exception in thread "main" java.lang.NoClassDefFoundError: InvestigClient (wrong
name: tutorials/java_client/InvestigClient)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
6)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)Craig,
The error suggests the absence of the class file 'InvestigClient.class' in
the CLASSPATH.
Could you please confirm that you were able to compile the client correctly.
Please check that you have the Investig.class file in the
tutorials\java_client directory.
I was able to run the client successfully here.
Regards,
Anurag
Workshop Support
"Craig Hall" <[email protected]> wrote in message
news:[email protected]...
>
I have been unsuccessful in getting the client to run from the commandprompt.
I have modified the compile and run bat files as follows"
COMPILE.BAT
c:\bea\jdk131_03\bin\javac -classpath../../WEB-INF/lib/Investigate.jar;../../WEB-INF/lib/webserviceclient.jar;c:\
bea\weblogic700\server\lib\webserviceclient.jar
*.java
RUN.BAT
c:\bea\jdk131_03\bin\java -cp.;../../WEB-INF/lib/Investigate.jar;c:\bea\weblogic700\server\lib\webservice
client.jar;
InvestigClient
What am I missing????
===============
C:\bea\weblogic700\samples\workshop\applications\samples\tutorials\java_clie
nt>c
:\bea\jdk131_03\bin\java -cp.;../../WEB-INF/lib/Investigate.jar;c:\bea\weblogic
700\server\lib\webserviceclient.jar; InvestigClient
Exception in thread "main" java.lang.NoClassDefFoundError: InvestigClient(wrong
name: tutorials/java_client/InvestigClient)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
atjava.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
6)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310) -
How to compile and run a java program?
I am getting this error message, what to do?
Exception in thread "main" java.lang.NoClassDefFoundError:
Thanks for you help.
AjayHello,
I believe that this error is caused because when you
compile and run a java program, you have to use the
same name that is next to public class. For example,
the program name is next to the word public class.
For example, if a program began like this:
public class Concat
then the name of the program in this case is Concat
and when you compile it you type: javac Concat.java
when you run it type: java Concat
depending on the name of your program.and depending on whether the class is in a package. And depending on what directory you are currently in.
Also depending on if you set your class path you might
have to type the above like this: jdk1.2.1\bin\javac
Concat.java to compile, and to run you would have to
type jdk1.2.1\bin\java Concat where you would replace
Concat with the name of your program and replace
jdk1.2.1 with the name of your version of java, that
is again if you do not have your classpath set. Hope
this helps.Your examples have nothing to do with whether the CLASSPATH is set--only with whether the PATH is set. And, it may not be jdkXXX\bin. The path to the JDK (in this case, to javac and java executables) could be anything. Classpath should be set on the command line. The OP probably did NOT set a classpath on the command line (preferred), or in the environment variables.
Also, make sure you did not forget to put:
public static void main(String[ ] args)
on the line underneath the line where it says "public
class Concat" where Concat is the name of your
program. Again, I hope this helps.Irrelevant (with the info we have from the OP so far). The error says that the JVM can't even find the class--not that the class doesn't have a main. The "main" referred to in the error message is within the JVM itself.
OP: Did you fix your problem? If not, what directory are your files in? Are they in a package? What command are you typing to get that error? That is, please tell us your entire command line. -
How to compile and run a matlab program?
Hi,
I have a college matlab code that i want to compile and run and take an output of. Can anyone guide me with this in xcode?
NeeravHi,
I already googled it and went through that website before posting here and as you can see the software is paid. And thats exactly why I asked in my original post as to whether there is a way to do it with xcode.
And the idea that xcode might be of any help too came after some experimentation. I double clicked the .m file and it opened in xcode. So I guess there must be a way to compile and run it too.
Thanks for you recommendation anyway.
Neerav Kothari
Maybe you are looking for
-
TS3988 when I'm trying to make account on ICloud, I put my applr ID & password
when I'm trying to make account on ICloud, I put my applr ID & password. I have an error ie : "cannot sign In. the operation couldn't be completed. (com.appleaccount error 403.)"
-
Fiori Launchpad Menu Control (most recent version)?
Hi All, Hopefully a really easy question for anyone with the Fiori launchpad sitting in front of them - but I briefly noted how the menu works on the launchpad and want to now implement this in my own app for a menu. Is this a dedicated control, a di
-
Hi, I am trying to pass an arabic value from JSP input text to my action class. I am using JDeveloper 10.1.2. and Struts. Added "*pageEncoding="UTF8"* " in my JSP file and I am getting junk characters in my action class. What more I want t o add to g
-
Adobe Forms:Removing Warning:javascript from messagebox
Hi, We are woking in Adobe Forms. In the form, messageboxes appear on the click of the button or certain radiobutton click. our requirement is that we want to remove the warning:javascript from the messagebox. It just needs to be appearing as Help or
-
Hi, For DR purposes, we want to implement a backup server for Solution Manager. Could someone show me how to go about with it. A diagram of the landscape would be helpful also. We do not want the bakcup server to be idle while the main server is ru