| How to load a resource from an external jar |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- mouse button 2 is always meta-modified?I have a program in which I wanted to allow the user
to use either Alt or Meta to indicate the same
modification of a mouse click. When I look at what's
returned by getModifiersEx(), I am surprised to
discover that an unmodified Button2 event produces a
value of 256, which also happens to be the value of
MouseEvent.META_DOWN_MASK. The result is that a plain
Button2 event looks like a Meta-modified one. This
cannot be right; and there is no analogous problem
with Button1, which produces 0 for an unmodified
event. In fact, if I hold down any combination of
Shift, Control, and Alt when clicking Button2, then the
256 bit is _not_ set but the appropriate combination
of others is set. I am on a PC and I do not actually
have a Meta key; but I wanted folks who do have one to
be able to use it in preference to Alt. What's going
on here? Is there a solution to this problem? (In
the meantime, I have just removed my Meta-modifier
option so that I can successfully detect that a Button2
event is unmodified.)
I am using SDK 1.4 under Windows 98.
Regards,
David V.
- 2
- Eclipse - background processes?Hi,
When I use Eclipse, there seem to be a lot of java.exe background
processes that are created when I run programs from the compiler. But
these background processes are not stopped when the programs are
stopped. Would anyone know how to stop these background processes?
Thanks,
Gil
- 2
- 2
- video lectures on C, C++, Java and other programming and Computer science.Hi Friends,
Check here http://freevideolectures.com/computerscience.html for
video lectures on Programming languages like C, C++, Java, COBOL
etc.., OS, Algorithms, Data Structures, RDBMS,
Web designing, etc..........
It also has amazing collection of video lectures and animations on all
Engineering and Medical Sciences. I am sure you will be surprised to
see such great collection.
Do you like it???
- 3
- Hiding methods from a public APIWe publish a library. Some of the methods in the public classes are
intended for consumption by our customers, but others are just for
internal use. Ok, fine, declare those methods protected.
A difficultly arises when we want to access one of these internal-use
methods from a class in another package. Example:
com.mydomain.foo.MyFoo wants to access a method in
com.mydomain.bar.MyBar
So the method has to be made public, which makes it available to our
customers. Not good.
How do people generally handle this? I've been putting a "Do not use,
for internal use only" in the Javadoc for the method, but that's not ideal.
- 3
- Hibernate: @SecondaryTable causes ORA-00918I have to tables 'first' and 'second':
CREATE TABLE first (
first_id int IDENTITY NOT NULL,
first_value INT NOT NULL,
PRIMARY KEY (first_id)
)
CREATE TABLE second (
second_id int IDENTITY NOT NULL,
first_id int NOT NULL,
second_value INT NOT NULL,
PRIMARY KEY (second_id)
)
I want to join these two tables into one entity using @SecondaryTable.
The columns that are used for joining are named the same in both
tables ('first_id'). Hibernate creates a query like this:
SELECT f_.first_value as first_value_,
s_.secondValue as second_value_
FROM first f_,
second s_
WHERE f_.first_id=s_.first_id(+)
and first_id=?
In the last line Hibernate "forgets" to add a qualifier to 'first_id',
so I get an "ORA-00918: column ambiguously defined" error.
Any ideas?
Thanks,
Ralpe
- 3
- How do I finding the current static type?Dear Java Gurus,
I need to find out what the static type (a.k.a. compile time type) of
a given object is at runtime[1]. What I want to achieve is this:
public interface ClassA { public void f(); }
public interface ClassB extends ClassA {}
ClassA classA;
ClassB classB = new ClassBImpl();
classA = classB;
classB.f(); // does something
classA.f(); // does something else
classB and classA are referencing the exact same object and on this
object f() is called but they should not do the same since the static
types are different (ClassA for classA and ClassB for classB).
So, ClassBImpl should look something like:
public class ClassBImpl implements ClassB {
public void f() {
if (
static type in caller of this
is proper subtype of ClassA
) {
//do something
} else {
//do something else
}
}
}
I'm sure you're wondering now why the heck he wants to do something
stupid like that. The reason is that I'm working on a Eiffel to Java
compiler at the moment and there are situations where the f() from
ClassA denotes a completely different method as the f() in ClassB,
they just have the same signature. I can't convince Java that they are
not the same and Java does therefore always bind dynamically to the
most recent implementation which may be the wrong one in some cases.
I'm thinking about this problem like for two weeks now and I'm
completely stuck. You'll make my month if you have any idea how to
solve it no matter how far fetched the idea may be.
Thanks for your time,
Benno
[1] I know, objects do not have a static type, what I mean is the type
of the last variable that was referencing that object.
- 5
- 6
- Unable to start tomcat serverHi All,
I'm doing tomcat configuration for the first time. I'm unable to start
tomat server.
What are the mandatory configuration steps.
It populated following error
EmbededTomcat: error creating module
org.apache.tomcat.modules.config.PathSetter
java.lang.ClassNotFoundException:
org.apache.tomcat.modules.config.PathSetter
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at
java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:575)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.apache.tomcat.startup.EmbededTomcat.createModule(EmbededTomcat.java:
1062)
at
org.apache.tomcat.startup.EmbededTomcat.addModule(EmbededTomcat.java:
391)
at
org.apache.tomcat.startup.EmbededTomcat.addServerXmlModules(EmbededTomcat.java:
434)
at
org.apache.tomcat.startup.EmbededTomcat.addDefaultModules(EmbededTomcat.java:
455)
at
org.apache.tomcat.startup.EmbededTomcat.initContextManager(EmbededTomcat.java:
598)
at
org.apache.tomcat.startup.EmbededTomcat.execute1(EmbededTomcat.java:
791)
at org.apache.tomcat.startup.EmbededTomcat
$1.run(EmbededTomcat.java:775)
at org.apache.tomcat.util.compat.Jdk12Support
$PrivilegedProxy.run(Jdk12Support.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.tomcat.util.compat.Jdk12Support.doPrivileged(Jdk12Support.java:
76)
at
org.apache.tomcat.startup.EmbededTomcat.execute(EmbededTomcat.java:
773)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:
52)
at org.apache.tomcat.startup.Main.execute(Main.java:272)
at org.apache.tomcat.startup.Main.main(Main.java:98)
EmbededTomcat: exception initializing ContextManager
Thanks in advance
Regards,
Jagadeesh Tata
- 8
- Including a folder's JAR files in CLASSPATHI have a folder C:\DevPrograms\Hibernate\lib which has 33 JAR files. I want
to include them in my CLASSPATH but not hardcoding the name of the jar
files; instead i want some thing like C:\DevPrograms\Hibernate\lib\*.jar so
that it can pick up all jar. I tried doing it but no success. What other
ways I can do it?
Thanks
- 9
- float vs double : speed on P4 machineI'm writing some real-time numerical code which needs to be pretty
nippy. Should I be using float or doubles for my calculations? I
know my P4 is a 32bit processor, but I don't know if the JVM will end
up putting the 32bits of the floats into the 32bits of my processor,
or if it does something else. In C the 64double would take much
longer to run on a 32bit processor -- is this still the case with the
virtual machine?
- 10
- objects (newbie)I learnt to program in the top down procedural system (assembly). Knowing
when to create a new function was easy. If you kept repeating the same task
then you needed to put it in a subroutine. But I'm a bit confused by all
these classes in Java. What criteria should I use to decide to create a new
class instead of just add a method to my existing class. I can see me
writting code thats basically one big class with lots of methods. I know I
should break it up into smaller classes but cant tell what criteria to use.
Can anyone recommend a book or url for an object orientated approach to
programming?
Thanks in advance
- 10
- Trouble with the driver and classes that work with the driver.this first part is the driver. need help with getting them both to work
with each other.
import java.util.Scanner;
public class AbbreviationsandStates
{
public static void main(String[] args)
{
String abbreIn;
String abbreOut;
String theResult;
EnterState es = new EnterState();
System.out.println("Enter Abbreviation the for the State : ");
Scanner in = new Scanner(System.in); //Instantiate Scanner
abbreIn = in.nextLine();
abbreOut = es.getAbbre(abbreIn);
theResult = es.getResult(abbreIn, abbreOut);
System.out.println(theResult);
}
}
this part is the class not sure what I am doing wrong but I do know that I
can not have an int for a string in the driver.
public class EnterState
{
public String getAbbre(String userInput)
{
userInput = userInput;
return userInput;
}
public int getResults(int abbre1, int abbre2)
{
String theResult;
switch (abbre1)
{
case 'A': case 'a':
switch (abbre2)
{
case 'L': case 'l':
System.out.print("Alabama");
break;
case 'K': case 'k':
System.out.print("Alaska");
break;
case 'Z': case 'z':
System.out.print("Arizona");
break;
case 'R': case 'r':
System.out.print("Arkansas");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'C': case 'c':
switch (abbre2)
{
case 'A': case 'a':
System.out.print("California");
break;
case 'O': case 'o':
System.out.print("Colorado");
break;
case 'T': case 't':
System.out.print("Connecticut");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'D': case 'd':
switch (abbre2)
{
case 'E': case 'e':
System.out.print("Delaware");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'F': case 'f':
switch (abbre2)
{
case 'L': case 'l':
System.out.print("Florida");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'G': case 'g':
switch (abbre2)
{
case 'A': case 'a':
System.out.print("Georgia");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'H': case 'h':
switch (abbre2)
{
case 'I': case 'i':
System.out.print("Hawaii");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'I': case 'i':
switch (abbre2)
{
case 'D': case'd':
System.out.print("Idaho");
break;
case 'L': case 'l':
System.out.print("Illinois");
break;
case 'N': case 'n':
System.out.print("Indiana");
break;
case 'A': case 'a':
System.out.print("Iowa");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'K': case 'k':
switch (abbre2)
{
case 'S': case 's':
System.out.print("Kansas");
break;
case 'Y': case 'y':
System.out.print("Kentucky");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'L': case 'l':
switch (abbre2)
{
case 'A': case 'a':
System.out.print("Louisiana");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'M':
switch (abbre2)
{
case 'E':
System.out.print("Maine");
break;
case 'D':
System.out.print("Maryland");
break;
case 'A':
System.out.print("Massachusetts");
break;
case 'I':
System.out.print("Michigan");
break;
case 'N':
System.out.print("Minnesota");
break;
case 'S':
System.out.print("Mississippi");
break;
case 'O':
System.out.print("Missouri");
break;
case 'T':
System.out.print("Montana");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'N':
switch (abbre2)
{
case 'E':
System.out.print ("Nebraska");
break;
case 'V':
System.out.print("Nevada");
break;
case 'H':
System.out.print("New Hampshire");
break;
case 'J':
System.out.print("New Jersey");
break;
case 'M':
System.out.print("New Mexico");
break;
case 'Y':
System.out.print("New York");
break;
case 'C':
System.out.print("North Carolina");
break;
case 'D':
System.out.print("North Dakota");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'O':
switch (abbre2)
{
case 'H':
System.out.print("Ohio");
break;
case 'K':
System.out.print("Oklahoma");
break;
case 'R':
System.out.print("Oregon");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'P':
switch (abbre2)
{
case 'A':
System.out.print("Pennsylvania");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'R':
switch (abbre2)
{
case 'I':
System.out.print("Rhode Island");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'S':
switch (abbre2)
{
case 'C':
System.out.print("South Carolina");
break;
case 'D':
System.out.print("South Dakota");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'T':
switch (abbre2)
{
case 'N':
System.out.print("Tennessee");
break;
case 'X':
System.out.print("Texas");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'U':
switch (abbre2)
{
case 'T':
System.out.print("Utah");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'V':
switch (abbre2)
{
case 'T':
System.out.print("Vermont");
break;
case 'A':
System.out.print("Virginia");
break;
default:
System.out.print("Invalid");
break;
}
break;
case 'W':
switch (abbre2)
{
case 'A':
System.out.print("Washington");
break;
case 'V':
System.out.print("West Virginia");
break;
case 'I':
System.out.print("Wisconsin");
break;
case 'Y':
System.out.print("Wyoming");
break;
default:
System.out.print("Invalid");
break;
}
break;
default:
System.out.print("Invalid");
break;
}
theResult = abbre1 + abbre2 + " The State is" ;
return theResult;
}
}
- 13
- set vm-parameter when converting to jar?!Hello,
I have an application in jbuilder and want to make it into jar file.
my application as an vm-parameter and appearently when i make this jar file
the settings are not set in the jar. how can i do this (in jbuilder)?
thank you very much!!!
Stefan
- 16
- Interesting Java interview questionA friend of mine likes to ask this question when interviewing Java
developers. Thought I'd pass it along because it's sort of interesting.
Why does the following compile, and what does the output look like?
System.out.println(new Object(){{{}}}.toString());
He says he has asked this question of several dozen people, and almost
everyone just stares at it in shock. Only one has answered it
correctly. I wish I had his resume...
dleifker
|
| Author |
Message |
Ahmed Moustafa

|
Posted: 2003-8-25 12:38:00 |
Top |
java-programmer, How to load a resource from an external jar
If a jar file exists in the classpath, how can I load a resource from
that external jar? Is it different from
"this.getClass().getClassLoader().getResource"?
Thanks in advance!
|
| |
|
| |
 |
Harald Hein

|
Posted: 2003-8-25 13:01:00 |
Top |
java-programmer >> How to load a resource from an external jar
"Ahmed Moustafa" wrote:
> Is it different from
> "this.getClass().getClassLoader().getResource"?
>
No, why don't you try it?
|
| |
|
| |
 |
Ahmed Moustafa

|
Posted: 2003-8-25 13:50:00 |
Top |
java-programmer >> How to load a resource from an external jar
Harald Hein wrote:
> "Ahmed Moustafa" wrote:
>
>
>>Is it different from
>>"this.getClass().getClassLoader().getResource"?
>>
>
>
> No, why don't you try it?
Yeah, right! I tried it and it worked fine.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- T-SQL print statement ...Hi all,
I have a java app that connects to Sybase using jConnect 6.05
and calls a stored procedure using the CallableInterface.
Any print statement within the stored procedure becomes a
SQLException on the java side???? e.g.
com.sybase.jdbc3.jdbc.SybSQLWarning: Beginning REORG REBUILD
of ...
why if it is a SQLWarning is being thrown as a SQLException?
how can I disable this (very stupid) Sybase behaviour?
- is there anything like "set showoutput off" or disable output session
parameter? or even a jConnect parameter to disable SQLException on
SQLWarning occurrences or whatever?
- Removing the print statements out of my procedure is not enough as
I call some other internal Sybase procedures that also seem to be
printing crap out.
Many thanks in advance,
Best Regards,
Giovanni
- 2
- Working with JFrameI Have The Following code to measure how far the mouse has move I can get it
to work for JApplet But not for JFrame how can I get it to work for JFrame?
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Odometer extends JApplet implements MouseMotionListener,
ActionListener
{
private int td=0;
private int last_x=0;
private int last_y=0;
private Graphics g;
private JPanel extra=new JPanel();
private JButton btn=new JButton("Reset");
private JLabel lbl=new JLabel("");
private JTextField txt=new JTextField(10);
private Container c = getContentPane();
public void init()
{
btn.addActionListener(this);
extra.add(btn);
extra.add(txt);
extra.add(lbl);
c.add(extra);
this.addMouseMotionListener(this);
}
public void mouseMoved(MouseEvent e)
{
double ld=0;
String str;
int x;
int y;
x=e.getX();
y=e.getY();
ld=Math.sqrt((Math.pow(x-last_x,2))+(Math.pow(y-last_y,2)));
str=Double.toString(ld);
td=td+Double.valueOf(str).intValue();
txt.setText(Integer.toString(td));
last_x=x;
last_y=y;
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==btn)
{
td=0;
txt.setText(Integer.toString(td));
}
}
public void mouseDragged(MouseEvent e){}
}
- 3
- ArrayList Marshalling Question....Hi All,
We are trying to invoke EJB methods on simple stateless session beans
from an Applet running remotely. One of our methods needs to return
an ArrayList of Serializable objects.
We have encoutered the following error: (please see end of post for
stack trace).
Some research has yielded the fact that even though the ArrayList
class in Java implements serializable, the Object[] member is not
serializable, even though the objects that we are putting into the
array are serializable.
Because our applet is REMOTE, we are using RMI-IIOP to access our
Beans which are on iPlanet 6.5.
The beans function properly for all base types and for simple
serilizable objects, but sadly, an ArrayList isn't one of them.
Has anyone else encountered this problem? Suggestions or alternatives
to using the ArrayList class would be appreciated as well.
Thanks in advance...
Omer/John.
--StackTrace--
java.io.IOException: Can't skip sender's custom marshaled class:
RMI:java.util.ArrayList:F655154F32815380:7881D21D99C7619D
at com.sun.corba.se.internal.io.IIOPInputStream.throwExceptionType(Native
Method)
at com.sun.corba.se.internal.io.IIOPInputStream.simpleSkipObject(IIOPInputStream.java:330)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:235)
at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:207)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:1059)
at j2eeguide.converter._Converter_Stub.trouble(_Converter_Stub.java:383)
at j2eeguide.converter.ConverterClient.main(Unknown Source)
Caught an unexpected exception!
java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
org.omg.CORBA.MARSHAL: Unable to read value from underlying
bridge : Can
't skip sender's custom marshaled class:
RMI:java.util.ArrayList:F655154F3281538
0:7881D21D99C7619D minor code: 0 completed: No
org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge :
Can't skip
sender's custom marshaled class:
RMI:java.util.ArrayList:F655154F32815380:7881D2
1D99C7619D minor code: 0 completed: No
at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStre
am.java:1065)
at j2eeguide.converter._Converter_Stub.trouble(_Converter_Stub.java:383)
at j2eeguide.converter.ConverterClient.main(Unknown Source)
- 4
- Converting a string to an integer<Question>
Why does the NumberFormatException get thrown when the String argument
is not empty?
</Question>
<Background>
I was reading the Sun Tutorial and happened across the section on integers:
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html
I saw the bit on octal and hex representations and thought that I might
be able to take a string containing..oh say "O23" and use the
Integer.parseInt method to convert it to an integer. After all, the
tutorial does say
The prefix 0 indicates octal, whereas 0x indicates hexadecimal.
int decVal = 26; // The number 26, in decimal
int octVal = 032; // The number 26, in octal
int hexVal = 0x1a; // The number 26, in hexadecimal
Here's my code:
package just_playing_around;
public class WillThisWork {
public static void main(String [] args) {
String s = "O23";
int x = Integer.parseInt(s.trim());
System.out.println("s as a string is " + s);
System.out.println("s as an integer is " + x);
}
}
And here's the error I get when I run it
Exception in thread "main" java.lang.NumberFormatException: For input
string: "O23"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at just_playing_around.WillThisWork.main(WillThisWork.java:6)
</Background>
<Research>
1) I did a google search on cljp and found the following post
http://groups.google.ca/group/comp.lang.java.programmer/browse_thread/thread/bc297073502432fa/d7610d111ecc7ceb?lnk=st&q=java.lang.Integer.parseInt(Unknown+Source)&rnum=7&hl=en#d7610d111ecc7ceb
If you will notice Patricia's post
I think this is the critical data. It claims that there was an
Integer.parseInt call on line 72 with the empty string as input.
Does that make sense?
Patricia
2) I tried to eliminate the probable causes of the "empty string" in
the following sequence
2a) I removed the parseInt and print for x from my code.
package just_playing_around;
public class WillThisWork {
public static void main(String [] args) {
String s = "O23";
// int x = Integer.parseInt(s.trim());
System.out.println("s as a string is " + s);
// System.out.println("s as an integer is " + x);
}
}
s as a string is O23
2b) In the same program, I did the trim and assigned the value to a new
string so that I could see what the result of the string was without
disturbing the original. I also added a comparison to see if indeed
both strings were the same.
package just_playing_around;
public class WillThisWork {
public static void main(String [] args) {
String s = "O23";
String y = s.trim();
System.out.println("s as a string is " + s);
System.out.println("y as a string is " + y);
if (s.equals(y))
{
System.out.println("They are the same");
}
else
{
System.out.println("They are different");
}
}
}
s as a string is O23
y as a string is O23
They are the same
<Research>
<Theory>
Either the runtime error I am getting is misleading (see Research.1> or
the runtime error is pointing me to something else, something more
insidious.
</Theory>
<Followup>
Where am I going wrong? Did I mis-read something somewhere or is what I
am trying to do just not do-able using the tools I have available to me
right now?
</Followup>
Thanks for your help
- 5
- Ask the Experts Session on Project GlassFish -- Week of Nov. 14Project GlassFish is Sun's Open Source Application Server, as well as
the implementation of Java EE 5. It's also part of a larger effort by
Sun to release major portions of Sun's code into Open Source for use by
the community. The code for Project GlassFish goes into building Sun's
Application Server PE 9, and the Reference Implementation of Java EE 5.
In this Ask the Experts session, you'll have the opportunity to ask
questions about Project GlassFish, and get answers from Project
GlassFish Manager, Jim Driscoll, and Project GlassFish Community Leads,
Carla Mott, and Amy Roh.
You can post questions about Project GlassFish on the Ask the Experts
page (http://java.sun.com/developer/community/askxprt/index.html)
starting November 14. The session runs through November 18.
- 6
- Secure PackagesIs it possible to make packages with non-class files (say, a folder,
or Stuffit archive) that are accessible only to a class file within
the package? Could it be set up so that even a UNIX root user wouldn't
be able to access the files? Would it be necessary to encrypt the
files (and use a Java class to decrypt them) and if so, how? Sorry for
my inexperience here. I'm really kind a beginner at Java programming,
but I need some of these functions for the program I'm writing so...
*shrug* Thanks in advance for any help!
- 7
- InputStream is abstract, but...System has a static data member called in which is an InputStream object,
and has a non-abstract read() method - but the read() method of InputStream
is abstract.
Is the answer something to do with it being native code?
- 8
- Encrypting Java Code
I provide a Web service that is mostly JSP with a few java classes
thrown in. I want to give my customers the ability to down load a
subset of the service's functionality (JSPs) to run offline.
How can I encript the code so that it cannot be reversed engineered?
If it encripted, is there a performance hit?
Thanks
- 9
- jsp:include and servletshello,
I have the following problem:
I would like to evacuate the logic from my jsp files in servlets. servlets
provide database contents prepared in HTML tables, the jsp files are
supposed to offer the graphic structure of the intranet application.
how does the path detail have to look?
thats my current include command:
<%@ include file="/proj/mdswpu/classes/ShowList" flush="true" %>
the whole thing is located in the directory webapps/Root/weave INF/classes.
do the path details cause problems or is it due to the servlet? is it no
matter whether doPost or doGet method is used?
the servlet delivers HTML via printwriter.
thank you for the help in advance ....
- 10
- Export HTML table inside JSP to Excel using JavaWhen I generate this table inside this JSP page, it will offer a
button for user to click if he/she decides to export the HTML table
into an Excel sheet (which get displayed directly back in the
browser), then user can save his/her this Excel spreadsheet into his/
her local file system.
Can someone help me on how I can convert this HTML table to Excel
using XSLT? Sample code would really help also, if there's any URL to
refer me to.
Is it a good idea to generate the Excel file (as temporary file which
to be sent back to browser later if user click the button) at the same
time when the HTML table get generated? Then remove this temporary
Excel file later.
Any comments? Thanks,
Jimmy
- 11
- CMP without entity beans ?Hi everyone,
I will soon be working on a EJB 2.1 legacy application (running on
JBoss), so i've started studying "JBoss at work, a practial guide".
In this book, the CMP chapter uses Hibernate ((using .HAR archives)
instead of Entity Beans. As far as I understand, this feature is
specific to JBoss, maybe because Entity Beans are implemented with
Hibernate.
I have the 2 following questions :
- Is the same behavior possible on other application servers ? (ie :
CMP with Hibernate instead of Entity Beans ?)
- Let's say I want to use another persistence strategy (ex : Ibatis or
straight JDBC), can I still use CMP ?
Thanks for helping !
- 12
- ANT MultipleChoiceInputRequestI have a target that checks if backup directories exist and if so, it
asks the user for input. I'd like to minimize the amount of typing the
user has to do and present the user with a list of choices that they
can just enter the number of the option they want.
Using the default inputhandler works fine, but it's not very elegant.
I've read (very little) about
org.apache.tools.ant.input.MultipleChoiceInputRequest, but I can't
find anything on the Internet or in the manual. I'd like to see how
this works, as I may need to use this elsewhere. Anyone ever tried it?
I'm using Ant 1.5.1 on Windows 2000.
Jon
email***@***.com
--- Begin sample code ---
<target name="restore">
... Code to check for backup goes here ...
<input
message="Please select the backup directory to restore:
backup, backup1, backup2 "
validargs="backup,backup1,backup2"
addproperty="do.backup"
/>
<antcall target="restore-backup" />
</target>
<target name="restore-backup" >
... Code to restore do.backup goes here ...
</target>
--- End sample code ---
- 13
- ports/116082: java/linux-sun-jdk16 jconsole is unable toSynopsis: java/linux-sun-jdk16 jconsole is unable to connect to a local process
Responsible-Changed-From-To: freebsd-ports-bugs->java
Responsible-Changed-By: edwin
Responsible-Changed-When: Tue Sep 4 14:20:07 UTC 2007
Responsible-Changed-Why:
Over to maintainer
http://www.freebsd.org/cgi/query-pr.cgi?pr=116082
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 14
- help my first java programThis is my first attempt at java
here it is
public class Welcome {
public static void main(String[] args){
System.out.println("Welcome to java");
}
}
however when i compile it i get this error
C:\Java>javac Test.java
Test.java:3: package system does not exist
system.out.println("This is a test");
^
1 error
what am i doing wrong
- 15
- Free java source code"Jacob" <email***@***.com> wrote in message news:email***@***.com...
> Initial set of utility source code is
> released (LGPL) at http://geosoft.no/software
>
> Feedback is appreciated.
>
> Thanks.
Never use GNU licenses. They are all viral and
contaminate whatever they touch. Very similar
to the "Bog of Eternal Stench". Look at the
other open source licenses for a better alternative.
|
|
|