Old 5th April 2007, 10:20   #1
ag.rahul84
Junior Member
 
Join Date: Apr 2007
Location: Bangalore,India
Posts: 1
Java class not running after installation

Hello everyone I am new to this forum and also using NSIS for 1st time.
I has one .nsi script for packing a .class file and some other files along with it.
The installer is working properly but the shortcut which is created is not working saying - "Could not find the main class. The program will exit".

The java program is working fine if I run it directly.

I am attaching the script and writing the the sample java file below.
Please help me with the issue or send me a script to make the java program installable.

/*SAMPLE JAVA PROGRAM*/
import java.awt.*;
public class NSISExampleApplication1 {
public static void main(String[] args)
{
Frame f = new Frame("test");
f.resize(600,400);
f.setVisible(true);
}
}
Attached Files
File Type: nsi createinstaller1.nsi (2.9 KB, 142 views)
ag.rahul84 is offline   Reply With Quote
Old 5th April 2007, 10:42   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
SetoutPath "$INSTDIR" also setting the shortcut parameter 'Start in' to $INSTDIR which is "$PROGRAMFILES\NSIS Example Application 1", however the shortcut is created in $SYSDIR.

You need to SetOutPath "$SYSDIR" just before create the shortcut for javaw.exe and add as parameter "$INSTDIR\NSISExampleApplication1", later, reset the SetOutPath "$INSTDIR" to continue do things into $INSTDIR or SetOutPath "$SYSDIR" and create the referred shortcut at the bottom of your install section.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump