Java and windows NT permission

hi,
i work in the IT department of medium business and we have recently created a database of assets in teh company.
i plan to develope a small application that can be used to track the movements of assets through the company.
i would like to have the user login, however i would like that they use their windows domain username and passwords that they use to login.
i am curious about whether java supports a class that allow for such functionality.
my company is using windows 2000 advanced servers with active directory.
please get back to me soon.

The class is java.lang.System. Have a close look at getProperties().

Similar Messages

  • Problem with Java and Windows (Mainly Vista and UAC)

    Hi all,
    I am having a problem with a program that I've devoloped. The program itself is packaged as a jar and I plan to deploy it across multiple platforms eventually however right now i am only concerned about windows based systems. I have made an installer for a windows baised systems using NSIS to install the software files. I made the installer as I need several java packages to be installed so the program would work (JAI, J3D, JAI ImageIO) and I also require the program to have fileassociations on windows.
    I know that this is not what java is about, however the majority of the users will be on windows baised systems so I've decided that OS specific installers is the best option.
    During the process I have noticed that there are several key problem with java for this type of application!
    The first issue that I have come across is getting file associations to work on java. As a .jar is not an excutable it is not possible to directly associate a filetype with it in java so to overcome this I currently run the program from a .bat files and also the program requires large memory so this also allows me to run the program with -xmx. The batch file that I use is :
    <code>
    cd PATH TO PROGRAM
    start javaw -Dsun.java2d.noddraw=true -Xmn100M -Xms500M -Xmx1000M -jar "PATH TO PROGRAM\program.jar" %1 -vram 134217728
    pause;
    </code>
    Ok so all this appears to work fine and allows windows to have file associations and start the program and thats all works perfectly but this is a non-ideal solution. Has anyone got any advice on improving this?
    The next problem that I have appears to be a problem with Vista and UAC (user access control). When a user installs the program and installs the program into the program files directory I found that the program did not work and kept saying that I did not have access to the files in the current directory. This is a problem as I read and write settings files during program execution.
    On a Vista system UAC prevents file write operations into the Program Files directory unless the program has requested elevated status even if the user is a full administrator. The probem is that there appears to be no real way to achieve this under java that I'm aware of...
    Has anyone else had this probem and has a suitable solution?
    Any advice on these issues would realy be appricated.
    Regards
    Joey

    Ok so i've kinda found a solution, its not ideal but its very good. I found this program called Elevate
    A link to the site I got it was
    http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx
    This program allows you start java with a UAC dialog for high access using
    Elevate java -jar myjar.jar
    This then allows you to have full access using java... I guess it could be dangerous but it does the job.

  • Sound problem with java and windows (volume)

    Hello,
    Just wondering if there is any way that java can manipulate the sound volume
    in windows...I've searched through the forums here and ive noticed that this question has come up a number of times, but nothing definitive has really been posted.
    My program is a 'server' side portion of a mobile phone app ive written, that im trying to use as a remote to turn up the volume, skip tracks, etc. on my pc via bluetooth. Basically what im doing is sending a string from the mobile phone app to the pc telling it to increment the volume/decrement the volume by a certain amount. Can java do this natively or am i going to need to use a C++ library through JNI (which i have never done before)
    Any help appreciated!
    Thanks,
    Craig

    Victor,
    I've tried your suggestions and found that the first one only alters the volume of the midi file that is being played through java. I want to be able to alter the volume of the sound that I already have coming out of my speakers, through windows master volume control.
    Your second suggestion I also tried but to no luck...i always get the following exception message:
    "Failed trying to find LINE_IN VOLUME control: exception = java.lang.IllegalArgumentException: Line unsupported: LINE_IN source port"This exception occurs no matter what I change LINE_IN to in this segment of code (I want to control sound output so i assume it should be either SPEAKER or LINE_OUT):
    lineOut = (Port)mixer.getLine(Port.Info.LINE_IN);Any other suggestions?
    I noticed on the j2se sound guide site, they mention a way to get a list of supported mixers and/or lines, but im not exactly sure how to go about doing that (maybe it will be helpful?)
    Thanks for your time,
    Craig

  • Fonts in Java and Windows, TextOut vs drawString

    Hi everyone,
    I need to render documents (standard format, that uses LOGFONT Windows struct.) in my Java App exactly like my Windows App. shows.
    There are several issues:
    1. Font sizes. (I almost resolved the problem)
    2. Font styles. I noted that Java does not work properly with native fonts. Sometimes, it ignores font styles. I did apply workarounds recommended in the bug tracking db. It helps only for some fonts, not for all.
    3. Mapping character sets.
    4. Positioning. TextOut uses left topmost corner. drawString uses the baseline. Also, Windows displays some extra space at the top. I could not calculate its size from FontMetrics. Also, there are issues horizontal positioning when I use Italic.
    5. StrikeOut and Underline - also different look.
    6. Also, I noted when I use some rare font Java draws some garbage along with text.
    If anywone was working on that, your help would be really appreciated.
    Thanks in advance,
    Alex

    Thank you. I did read that. I was not talking about drawing text in 'Hello World' alike applets/programs.
    I should give an example:
    I would like to print 'H' in Tahoma, 72, Bold (Windows format) at (100, 200).
    Font sizes:
    In Windows font size is 72 pixels.
    In Java this is equal to 96 points (72 px * 96 (scr resolution for Toolkit) / 72 (pixels per point).
    Real height in Windows and Java will be 64 px.
    That's fine. For some fonts this does not work.
    Positioning. See example above.
    According to the article you refer to in java we should use y-coordinate 200 + 72 (font size) = 272.
    In fact we have :
    Java text 14 pixels below than expected.
    Similar things happen to other parameters Weight, Styles, etc.
    I do use AttributedString and TextAttribute classes to render text
    Thanks in advance.
    Alex

  • Java and windows authentication

    I've written a little sql server client in java. The thing that
    i really dont like about it is that i have to use sql username
    and password to get into a database and, of course i have to make sure that my username has the proper rights. I really would like to
    rework it to login through the windows login and not have to deal with it. Is that possible?
    If so how do i go about it?
    Thanks for any hints/advice.

    Search the forum, I have seen this before.

  • Linux java and windows oracle

    Hi
    I have a linux server with apache tomcat installed. I want to connect to oracle which is installed in windows 2000 server. Can any one help me how to coonect to the oracle server from the java applicaton or plese tell me what other third party is needed.
    .

    Hi
    Just substitute the hostname (and port if necessary) that you would put in your connection URL for the host/port of the Windows 2000 server.
    I haven't used Oracle for ages now, but I think when you download the driver, it comes with a couple of examples of what the connection URL should look like (and indeed examples of making the connection itself). Make sure the relevant firewall ports are open though or you'll never get them talking ;-)
    Rgds

  • Java and Window Media Player

    How can I put the Window Media Player or other media player (apart from JMF player) which can play the video into JFrame or applet using Java Program.Do anyone know any link for teaching such kind of knowledge or post some knowledge so that I can follow it.Thank you all of you!!!

    How can I put the Window Media Player or other media player (apart from JMF player) which can play the video into JFrame or applet using Java Program.Do anyone know any link for teaching such kind of knowledge or post some knowledge so that I can follow it.Thank you all of you!!!This not easy, integrating native players in swing i.e. JFrame. But yes I know of an open source project DJ Native Swing, try its demo, and then use the api.
    [http://djproject.sourceforge.net/ns/]
    Thanks!

  • Java and Windows XP

    Can someone please tell me why my Java applications written with JDK1.2.1 on my previous Win98 machine don't work on my WinXP machine, using the same JDK1.2.1 ? ( Something about NoClassDefFoundError )

    ( Something about NoClassDefFoundError )
    This error is usually becos of CLASSPATH errors.
    Make sure that your class path is set properly and that your current directory is included( . for current directory).
    cheers

  • Java and Window Task Manager

    Hello,
    Please how can one run java application but will be invisible in the Windows task manager.
    Which method can I use to make this possible.
    Thanks

    bezgodo wrote:
    Hello,
    Please how can one run java application but will be invisible in the Windows task manager.
    Which method can I use to make this possible.
    ThanksYou can't do that in Java. But, there are some tools that wraps your java programs in a executable
    format, some of them even includes the entire/partial JRE so you can run your Java program on any
    Windows machine.
    After you do the wrapping you can use other tools meant for Microsoft PE/NE executable (.exe, .com, etc files)
    in order to make then undetectable in the process list.
    But you loose portability.

  • Java and window-exe

    is it possible to compile java to a MS-windows exe?
    i would like to do this for two reasons:
    1) i hope for a better performance of my desktop-API
    2) i can't be sure that all of my users have JVM installed.
    do i need special programms for that?
    thanks
    gammloop

    1) There are thingys to do that...
    There's one on source forge. Can't remember what it's called.
    The JIT does that any though, so desktop performance isn't an issue.
    2) Oh, they will, they will. Now that evil is spreading across the land like a dark shadow.
    Why don't you ship the JRE with your application. Not the sdk (you're not allowed to do that). [I think you can distribute the JRE - I hope you can, otherwise I'm phoning my solicitor.]

  • Java and Window Vista

    Hello everyone,
    I am developing applications with Java beans2, JEE5 and netbeans 6, using XP. Now
    I would like to purchase a new laptop which has Vista installed. As you already know, PCs are
    not downgradeable to XPs. Is anyone still having problems with developing applications in java using Vista. The main reason I am buying this is to continue my development. And of cause, faster
    laptop. I would appreciate any suggestions.
    Thanking you.
    eve.

    hi,
    Discuss from another forums,
    answer
    From Baker
    i copied the file nsExtensionManager.js from the components folder of the downloaded firefox to the shown path to the file in the current installation. it works now. =)
    From dan
    Sorry about this error, which happens occasionally with the beta of Firefox 2.0 and which we hope will be rectified in the final release of the browser. Which OS are you using?
    A simple workaround for this problem is to save the Zotero file to your hard drive (it's a file that ends in .XPI; right-click to save it rather than a regular click, which would go straight to the file in the browser), and then open the file manually from within Firefox 2.0 (using file->open file...).

  • "Java Applet Window" and keeping PopupMenu inside Applet

    I just added a JPopupMenu to my Applet, and I want to remove the "Java Applet Window" at the bottom. I know this can be done by making sure the PopupMenu stays inside the Applet area. How can I make it stay inside the Applet area?

    Hi Duncan,
    thank you for your answer (on Forms Forum, too :-)
    In the init function I do
    public void init(IHandler handler)
    mHandler = handler;
    super.init(handler);
    // getting the Forms Main class
    formsMain = (Main) mHandler.getApplet();
    // Accessor to the external frame
    formsTopFrame = formsMain.getFrame();
    The constructor does
    optionPane = new JOptionPane( "some text", JOptionPane.INFORMATION_MESSAGE);
    and before the showMessageDialog I put
    formsTopFrame.add(optionPane);
    but with no effect.
    Do you have some more hints?
    Regards,
    Werner

  • Why we have separate azure java SDK for linux and windows

    I saw different links for downloading azure java SDK for linux and windows.
    What difference does it actually have when java is platform independent? Or both are same jars?

    Hi,
    Thank you for your post.
    It contains the same jar files.
    Regards,
    Mekh.

  • Java, Cygwin, and Windows.... oh my.

    So the problem can be summarized as follows. I have a call out to the operating system from Java to obtain the value of “vmstat” which returns a value from every “x” seconds based on the refresh rate. To do This I use a command similar to this
    Runtime rt = Runtime.getRuntime();
    String[] comm = new String[] {"vmstat","1"};
    Process proc = rt.exec(comm);
    I can then loop around capturing the output and parsing it. Simple.... This approach works on Linux, Mac OS, HP-UX, AIX and Solaris however it fails under Windows. It sits there and simply waits. Now this appears to be a common problem based on the number of postings on it. This article(http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html) suggests a number of approaches to solve the problem. I’ve tried them all and the good news is that they appear to work for a single atomic call that returns all of its output then exits. However commands such as “vmstat/iostat/sar” etc. return output periodically based on their refresh rates and don’t seem to work at all.
    There are plenty of hits in google but no one really seems to suggest a solution. Now Im sure this worked in the past and Im almost certain that I haven’t changed the code.
    I’ve tried calling
    java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
    Which returns the first line of the directory and then exits.
    java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
    simply hangs.... whilst
    java myexec cmd /c dir
    Works fine.... So my believe its the combination of java and cygwin and the way io is redirected. If anyone has a chance to look at it.... I’ll be very grateful. Code for simple testcase below.
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread {
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type) {
    this.is = is;
    this.type = type;
    public void run() {
    try {
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while (true) {
    if (is.available() == 0) {
    try {
    Thread.sleep(10);
    } catch (InterruptedException ie) {
    continue;
    line = br.readLine();
    if (line == null) {
    System.out.println("Error");
    } else {
    System.out.println(line);
    } catch (IOException ioe) {
    ioe.printStackTrace();
    public class myexec {
    public static void main(String[] args) {
    try {
    String osName = System.getProperty("os.name");
    System.out.println(osName);
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(args);
    // any error message?
    StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t) {
    t.printStackTrace();
    Edited by: dgiles on Apr 3, 2009 6:27 AM

    Apologies for the code tags.... now included below
    +"I’ve tried calling+
    +java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"+
    +Which returns the first line of the directory and then exits.+
    +java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"+
    +simply hangs"+
    should read
    "I’ve tried calling
    java myexec cmd /c "c:\\cygwin\\bin\\ls.exe"
    Which returns the first line of the directory and then exits.
    *java myexec cmd /c "c:\\cygwin\\bin\\vmstat.exe*"
    simply hangs"
    I agree with the comments about the quality of the example.... it was a quick and dirty hack. It dosen't take away from the issue that it works on every combination except windows and cygwin....
    Any other thoughts?
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread {
      InputStream is;
      String type;
      StreamGobbler(InputStream is, String type) {
        this.is = is;
        this.type = type;
      public void run() {
        try {
          InputStreamReader isr = new InputStreamReader(is);
          BufferedReader br = new BufferedReader(isr);
          String line = null;
          while (true) {
            if (is.available() == 0) {
              try {
                Thread.sleep(10);
              } catch (InterruptedException ie) {
              continue;
            line = br.readLine();
            if (line == null) {
              System.out.println("Error");
            } else {
              System.out.println(line);
        } catch (IOException ioe) {
          ioe.printStackTrace();
    public class myexec {
      public static void main(String[] args) {
        try {
          String osName = System.getProperty("os.name");
          System.out.println(osName);
          Runtime rt = Runtime.getRuntime();
          Process proc = rt.exec(args);
          // any error message?
          StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
          // any output?
          StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
          // kick them off
          errorGobbler.start();
          outputGobbler.start();
          // any error???
          int exitVal = proc.waitFor();
          System.out.println("ExitValue: " + exitVal);
        } catch (Throwable t) {
          t.printStackTrace();
    }

  • A/V capture in java and encoding in windows media 9 format

    Hi,
    Is it possible to capture using java and encode it in windows media 9 format ? If so how would one do it ? Thanks.
    KM

    Hey, I am trying to find out how to do this as well.
    This line throws an exception:
    Player player = Manager.createRealizedPlayer( mediaURL );
    Have either of you gotten further?

Maybe you are looking for

  • Report Logo - Displays on HTML, not on PDF report

    Hello once again Gurus. We have a system environment setup where we have BI Publisher Enterprise and Apex 3.1.2 talking together to create PDF reports on a Oracle 10g database (R2 I think, I'm uncertain). As part of a business requirement, depending

  • HT4436 My daughters have their own iTunes accounts; can we all use the same iCloud?

    Myself and my husband have iPhones, my two daughters have iPods.  We all have separate iTunes accounts (although we all synch onto the same PC).  How will this work with the iCloud?

  • FIle Adapter Receiver - Content Conversion

    I have a xml file as below that I am trying to convert to a simple csv file. All I get is a blank csv file at the ouptput. I tried different setting for the file conversion in the reveiver file adapter. No luck yet. I could write to an output XML fil

  • I am looking to upgrade my entire phone system from 8.5 to 10.5

    I am looking  for just genreal guidance.  I was told by TAC that I needed to Create a Prime licenses Manager server but after this was done found out that 8.5 Callamnager is not compatible.  So any documentaation that you have forund to help with the

  • Need temp tables in Standby Database

    I have created a standby database that is going to be used for reporting as well. I was told that no temp tables can be created for reporting. I have created a temp tablespace on my primary and a tempfile on my standby and I'm able to put it into rea