How to put path variables into a jar?
Hey,
I'm writing a Java prg, that needs some path variables for the JVM. I used to
pass them over to the JVM each time at start up. Since this solution seems
to me slightly complex I wonder if there's no other solution like e.g. placing
them into a .jar's manifest so that the jar has them already - might this be
possible?
/usr/local/java/current/bin/java
-Djava.library.path=/mnt/.../jdk1.5.0_05/jre/lib/i386/client:/usr/.../jdk1.5.0_05/jre/lib/i386:/usr/local/java/jdk1.5.0_05/jre/../lib/i386:/usr/... -cp /mnt/.../JRI.jar:/mnt/.../apache.poi/poi-2.5.1-final-20040804.jar:/mnt/.../CSV/ostermillerutils_1_06_00.jar mainGUI.FrameMain /mnt/.../workspace/project/In case it might also be possible using just a jar, I would appreciate
some links on how to do that, TIA!!!
Well I thought about that, since I'm working under linux a start.sh script serves
qutie well. I'd like to use the prg also under windows but thought a start.bat
might rather be discouraged?!
I thought about writing an installer or just using one of the already existing installer projects, to set up those paths in the manifest of the jar directly each time it get installed - the problem is I need these absolute paths, since the prg depends on some another prg, which could be situated on a different position depending on the system and installation...
Thus I'd like to know, is it possible to set path variables in a manifest's jar at all?
Is this still a bad idea? why?
Since this is the first time I try to do things like that, what might be an elegant solution for that issue?
Similar Messages
-
How to put restriction/variable in BI 7.0 ? Is there any settings required?
Hello,
I am working on BI 7. I want to know ""How to put restriction/variable in BI 7.0 ? Is there any settings required? I am putting some variables in BI 7.0 while making some query""
amit shetye.Hi Amith,
just create a new query like a previous versions how u create.. and now select particular charecterstic in the left side window itself.. and drill down it.. and create a variable.. and assign all the properties to that variable.. now drag that particular variable.. in to the Rows or filters..
for Restrictions... put any charecterstics into Free charecterstics.. and right clcik that and select Restriction. now you need to give the values.. based on that it will RESTRICT THE VALUES..
BI 7.0 reporting features
http://searchsap.techtarget.com/cgi-bin/rd.pl/ftID-1121728-ctID-1064004?//expert/KnowledgebaseAnswer/0,289625,sid21_gci1064004,00.html
http://help.sap.com/saphelp_nw04s/helpdata/en/9d/24ff4009b8f223e10000000a155106/content.htm
https://www.sdn.sap.com/irj/sdn/developerareas/bi?rid=/webcontent/uuid/ba95531a-0e01-0010-5e9b-891fc040a66c [original link is broken]
http://help.sap.com/saphelp_nw04s/helpdata/en/43/F9D041D6392AE3E10000000A422035/frameset.htm
BI7.0
For greater information on reporting.....
Good Knowledge in BW Reporting
regards
@jay -
Need help: how to make a package into a jar file?
I tried to make a package into a jar file by using:
jar cf a.jar packagedirectory
But when I import one class of this package in an other application, by using:
javac -cp path\a.jar; app.java
the compliler can not find the calss.
The interesting thing is if I do not put the package into the jar file, it works well.
Here is my sample code under path D:\b\b1
package b1;
public class Son
int x = 10;
public Son(){
public int getX(){
return x;
and the application code under path d:\b
import b1.Son;
public class Father
public Father(){
public static void main(String[] args)
Son son = new Son();
System.out.println("Hello World!"+son.getX());
Thanks for any advise.
Xin ChengYou must make sure that you are in the right directory
when you do your jar command to create the archive.
[home/trejkaz/proj/test/classes]% jar -cf a.jar
path/to/package/*.class
Thank you very much.
Yes, I did as what you said, but it does not work.
Here is what I did:
1. Edit Father.java in D:\b
2. Edit Son.java in D:\b\b1
3. Compile Son.java
4. Complie Father.java
5. Make the a.jar by
command jar cf a.jar D:\b\b1\ (I cheked the content of the a.jar, it seems right.)
a.jar is in directory D:\b
6. Delete Son.class in D:\b\b1
7. Run Father.class by
command: java -classpath D:\b\a.jar; Father
error message is: Exception in thread "main" java.lang.NoClassDefFoundError: b1/Son
at Father.main(Father.java:11)
What is the problem?
Thanks again. -
How to put html file into a canevas?
How to put html file into a canevas?
Hi,
would require you to write a JavaBean that interprets the HTML (there are commercial versions of this available)
Frank -
How to put selected videos into one place (File)
How to put selected videos into a File so I can only show on TV the videos in that file
YYou have to describe your issue in more detail. Are you using iTunes? Trying to see it in Apple TV, etc, etc.
-
How to put my podcasts into playlist folders? Can't drag'em.
How to put my podcasts into playlist folders? Can't drag'em.
I've subscribed to a number of podcasts & they appear in my iTunes window under the Podcasts section.
There i have
2 problems:
1st: I can't rearrange or group them so can listen consecutively to different topics.
I must listen to one, then come to the keyboard and select the next to start playing. Now, I know that I can get them to play consecutively once I've placed them into Playlist folders,
but that brings me to my second problem:
2) I can't drag and drop them into separate iTunes FOLDERS (by topics).
(Though I have been able to drag&drop separate items from my 'Music' section into iTunes playlist folders.)
But can't drag from Podcasts section into Playlists,
as everytime I try they just refuse to go in and scurry back to their starting position under Podcasts.
Zupwidiss? This can't be.
I would be grateful for your solution.
And also grateful if I could have easily found the solution explained
before I had to resort to bothering this forum with this question.
Just using my MacMini, Snow Lep.Thanks very much.
You have reminded of the
difference between
Playlists and Playlist Folders:
One can only drag things from the Master list into PLAYLISTS.
And can only drag Playlists into Playlist Folders.
I'm an older man, and easily confused by these things.
Many thanks to my friend in Germany.
P.S. Your English is excellent. -
How to put measures correctly into spreadsheet
Hi expert,
I loaded data into a planning model, and I can see data in BW and BEX, but when I put 'ACCOUNT' into row, and 'TIME' into column, I can't see 'measures' in spreadsheet, eventhough I drag 'measures' into spreadsheet from EPM pane, then update, getting blank for 'measures', it is gone. please tell me how to put measures correctly into spreadsheet.P.S If you are creating report by drag n drop on EPM pan, then same way need to add measure dimension in desired axis.
Share the screen shot.
Shrikant -
How to put 2nd column into 1st column in excel
Hello,
I have a question how to put 2nd column into 1st column in excel. Thank you.
Solved!
Go to Solution.Why the 1 iteration for loops?
Why the two Index Arrays? It is just trying to fix the problem created by the For Loops on the original 1-D arrays.
Both of those things are creating 2-D arrays that are complicating things and can be eliminated.
You can take your 2 1-D arrays, use Build Array and right click to set "Concatenate Inputs".
If you do have a 2-D array, you can use Reshape Array to make it a 1 column by N row 2-D array. -
How to put a dvd into ipod touch
i have no idea how to put my DVDs into my ipod touch! can someone help? i have the new touch, 3g i think? it's a 32GB. i really don't feel like having to buy the movie on itunes when i already own it as a dvd. can someone please help me?
Sorry, but the Apple Forum Terms of Use don't permit us to discuss ripping commercial DVDs. Try Googling for such information.
-
How to put a collection into a Ref Cursor?
Hi,
I am trying to create a procedure (inside a package) which fills a collection and I need to fill a ref cursor (out parameter) with this collection. I can fill the collection but I how can I fill the ref cursor? I am receiving the message "PL/SQL: ORA-00902: invalid datatype" (Highlighted below as comments)
I have a limitation: I am not allowed to create any kind of objects at the database schema level, so I have to create them inside the package. I'm writting it with SQL Tools 1.4, I'm also not allowed to do this in SQL+.
This is the code of the package. The cursors' selects were simplified just because they are not the problem, but their structure is like follows below.
CREATE OR REPLACE PACKAGE U3.PKG_TESTE AS
TYPE REC_TYPE IS RECORD(
COL1 VARCHAR2(50) ,
COL2 VARCHAR2(100) ,
COL3 VARCHAR2(20) ,
COL4 VARCHAR2(30) ,
COL5 VARCHAR2(100) ,
COL6 VARCHAR2(50) ,
COL7 NUMBER(3) ,
COL8 VARCHAR2(30) ,
COL9 VARCHAR2(16) ,
COL10 VARCHAR2(50) ,
COL11 NUMBER(4) ,
COL12 VARCHAR2(40)
TYPE REC_TYPE_LIST IS TABLE OF REC_TYPE
INDEX BY BINARY_INTEGER;
TYPE C_RESULTSET IS REF CURSOR;
VAR_TAB_TESTE REC_TYPE_LIST;
PROCEDURE Z_REC_INSTANCE
pUSER_SYS_CODE VARCHAR2,
pSYS_SEG_CODE VARCHAR2,
pComplFiltro VARCHAR2,
pCodInter NUMBER,
cResultset out C_RESULTSET
END PKG_TESTE ;
CREATE OR REPLACE PACKAGE BODY U3.PKG_TESTE
AS
PROCEDURE Z_REC_INSTANCE
pUSER_SYS_CODE varchar2,
pSYS_SEG_CODE varchar2,
pComplFiltro varchar2,
pCodInter number
AS
cursor cur1 is
select 'A' COL1, 'B' COL2, 'C' COL3, 'D' COL4, 'E' COL5,
'F' COL6, 'G' COL7, 'H' COL8
FROM DUAL;
regCur1 cur1%rowtype;
cursor cur2 is
SELECT 'I' C1, 'J' C2, 'K' C3, 'L' C4
FROM DUAL;
regCur2 cur2%rowtype;
varSQL varchar2(4000);
varCOL10s varchar2(100);
varFiltroAtrib varchar2(100);
varCount number(10);
BEGIN
varCount := 1;
open cur1;
Loop
fetch cur1 into regCur1;
exit when cur1%notfound;
open cur2;
Loop
fetch cur2 into regCur2;
exit when cur2%notfound;
VAR_TAB_TESTE(varCount).COL1 := regCur1.COL1;
VAR_TAB_TESTE(varCount).COL2 := regCur1.COL2;
VAR_TAB_TESTE(varCount).COL3 := regCur1.COL3;
VAR_TAB_TESTE(varCount).COL4 := regCur1.COL4;
VAR_TAB_TESTE(varCount).COL5 := regCur1.COL5;
VAR_TAB_TESTE(varCount).COL6 := regCur1.COL6;
VAR_TAB_TESTE(varCount).COL7 := regCur1.COL7;
VAR_TAB_TESTE(varCount).COL8 := regCur1.COL8;
VAR_TAB_TESTE(varCount).COL9 := regCur2.C1;
VAR_TAB_TESTE(varCount).COL10 := regCur2.C2;
VAR_TAB_TESTE(varCount).COL11 := regCur2.C3;
VAR_TAB_TESTE(varCount).COL12 := regCur2.C4;
varCount := varCount + 1;
end Loop;
end Loop;
-- I'd like to do something like this:
-- c_resultset := select * from var_tab_teste;
-- but i don't know how to put the records of the type on the ref cursor,
-- probably because I don't know how to select them
-- pl/sql: ora-00902: invalid datatype
for varCount in (select COL1 from table( CAST ( VAR_TAB_TESTE AS REC_TYPE_LIST ) ))
loop
dbms_output.put('WORKS');
end loop;
END Z_REC_INSTANCE;
END PKG_TESTE;
SHOW ERR PACKAGE PKG_TESTE;
SHOW ERR PACKAGE BODY PKG_TESTE;
SHOW ERR PROCEDURE PKG_TESTE.Z_REC_INSTANCE;
I'm using:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Thanks in advance.I don't have the exact version but in 9iOK I lied, I found a 9i instance ;-)
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
JServer Release 9.2.0.7.0 - Production
SQL> CREATE TABLE table_name (column_name VARCHAR2 (30));
Table created.
SQL> INSERT INTO table_name VALUES ('value one');
1 row created.
SQL> INSERT INTO table_name VALUES ('value two');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> CREATE OR REPLACE PACKAGE package_name
2 AS
3 TYPE collection_type_name IS TABLE OF table_name%ROWTYPE;
4
5 FUNCTION function_name
6 RETURN collection_type_name PIPELINED;
7 END package_name;
8 /
Package created.
SQL> CREATE OR REPLACE PACKAGE BODY package_name
2 AS
3 FUNCTION function_name
4 RETURN collection_type_name PIPELINED
5 IS
6 BEGIN
7 FOR record_name IN (SELECT column_name
8 FROM table_name) LOOP
9 PIPE ROW (record_name);
10 END LOOP;
11
12 RETURN;
13 END function_name;
14 END package_name;
15 /
Package body created.
SQL> VARIABLE variable_name REFCURSOR;
SQL> BEGIN
2 OPEN :variable_name FOR
3 SELECT column_name
4 FROM TABLE (package_name.function_name);
5 END;
6 /
PL/SQL procedure successfully completed.
SQL> PRINT variable_name;
COLUMN_NAME
value one
value two
SQL>I recommend though that you test this thoroughly. There were bugs with this approach when it was newly introduced that prevented you from dropping the package. -
How to get a variable into another block?
Hello,
(I am from Germany, so be patient due my english please)
We do a project at our University where we have to do with wordfrequencies. The app works fine, but it cannot works with the variable wich contains the information to analyse.
Look, I am more or less new in Java and I found a code and modyfied that. So I had to initalize the variable with the data from another class. I did the following thing.
Thats is the class, where the variable is come from:
class Lesen extends HTMLEditorKit.ParserCallback
String zeile;
String fileName;
Wortfrequenz aha; // name of the class where I need the variable public Lesen (String fileName)
this.fileName = fileName;
public void handleText(char[] data, int pos)
String strom = new String (data);
aha = new Wortfrequenz ();
aha.verb(strom); // "strom" is the variable here in this class which caontains the data
....and within the class "Wortfrequenz" I tryed to do the following thing:
import java.util.*;
import java.io.*;
public class Wortfrequenz
static String flus;
public void verb (String o)
flus = o;
HashMap words = new HashMap();
HashMap stopWords = new HashMap();
String delim = " \t\n.,:;?!-/()[]\"\'";
String file;
String word;
Count count;
try
FileReader kl = new FileReader("stopwords.txt");
BufferedReader mk = new BufferedReader(kl);
String einlesen;
Lesen eins = new Lesen(flus);
while ((einlesen = mk.readLine()) != null)
stopWords.put(einlesen, einlesen);
mk.close(); if I test the app and do a "System.out" direktly after
flus = o;then I can see that the information is within the variable, but when I test the variable within the next block where I need it, for example after
Count count;or anywhere in this block, then I get
null
null
null
null
null
...if anyone tell me how I can get the information of this variable into the nex block, that would be great.
Thanks a lot for helping...
StephanThis: public void verb (String o)
flus = o;
}Is the whole verb method. That's all it does is assign the flus variable. This:{
HashMap words = new HashMap();
// etcIs an initializer, which runs as soon as the object is created, ie before the verb method. -
How to put a String into a byte array
How can i put a String into a byte array byte[]. So that i can send it to the serial port for output to an LCD display. Cheers David
javadocs for String
getBytes
public byte[] getBytes()
Encodes this String into a sequence of bytes using the platform's default charset, storing the result into a new byte array.
Returns:
The resultant byte arraySince:
JDK1.1 -
How to pass a variable into a cfc?
prior to calling the cfinvoke, I have coding that determins a
variable "X"
I need to pass X into a cfc so it can complete the query held
there.
So I tried
<cfinvoke component="A"
method="AList"
returnvariable="AResults">
<cfinvokeargument name="x" value="#X#"
/></cfinvoke>
correct so far?
Now over on the cfc page is where I'm getting stuck
Inside my cffunction I'm adding <cfargument name="X" />
But how do I get the value in?I don't quite understand your question. Can you rephrase?
But before all that, bear in mind that one doesn't pass a
variables into a
*CFC*, one passes it into a function within the CFC. And as
with all
functions, one passes values into the function by passing it
as an
argument. But - of course - the function has to be coded to
expect the
argument.
Your own sample code demonstrates this in action:
<cfinvokeargument name="abbrCode"
value="#companyAbbrCode#" />
(NB: lose the trailing slash: this is CFML, not XML).
So you know how to do that.
Hence me not quite understanding what you're actually asking.
Adam -
How to put a variable column value in a "vlookup"
Hello there,
I am trying to put a variably chosen column value in a "vlookup" function.
Logically this should work, but it does not, and I cannot figger out why.:
"=vloookup("a", B5:Z28, {=MATCH(4, B4:Z4, 0)})" (replaced brackets with {} for this post)
I am trying to look up the letter "a" in whatever column matches the "match" criteria.
The match is matching a specific value of 4 from row B. (This value varies based on other input)
The vlookup is for finding the letter "a" the whole table in whatever column is returned by the MATCH formula.
How can I do this?
(Like I said the formula above is logically correct, but numbers returns a syntax error.)
Thanks from Alaska
Message was edited by: John Boyarsky
Message was edited by: John Boyarsky
Message was edited by: John BoyarskyJohn,
Next get rid of the brackets you referred to; unnecessary. If that doesn't do it, calculate the column number in an auxiliary column and refer to that column in your expression.
Jerry -
How to put iPod 5G into retail mode
How can I put iPod 5G INTO RETAIL MODE AS I RUN A PHONE SHOP
What do you mean by retail mode?
Apple uses their own custom iOS mods to have iOS devices for demonstration in their stores.
You can do some restrictions of use of the iOS device by using Guided Access. See:
http://support.apple.com/kb/ht5509
Maybe you are looking for
-
ALV in Web dynpro ABAP - Export option as HTML
Hi All, I am developing a webdynpro application for which output will be in ALV. Here the requiremnet is to save the file in HTML format. But the Standard ALV in web dynpro has only the option to export the result in Excel and PDF. Could any one sugg
-
Different behaviour on servlet w/o servlet-mapping and init parameters
I was playing around and found, that the init-parameter of a servlet is always null if there is no servlet mapping. I did not define a servlet mapping because I used the servlet only for for (named) dispatching (client usage should not be allowed). w
-
Production Variance to sales order...
Hi Experts, It is possible to settele Production Variance to sales order item(MTO with valuted sales order). The production order is created with reference to sales order.... Please someone tell me how can settele variance to sales order to view the
-
How can I write outside of the targetCompositeChannels.bound?
I want to warp a layer and store the result in the targetCompositeChannels. Because the result may be so large that some pixels are outside the bound of the targetCompositeChannels, the result can not be stored completely. PS: In the sample code "Poo
-
115,000 Addressbook contacts. How do I delete Addressbook data file?
Because of (I think) a synchronization problem, I now have over 115,000 contacts in addressbook. the unwanted entries are blank, and appear as 'no name.' Because the file is so cumbersome now, I haven't been able to delete the 'no names.' I recently